Skip to content

Commit 2cee13f

Browse files
authored
Merge pull request #9 from wisnuwiry/feat/migrate-and-add-more-cleary-example-usage
feat: Migrate to Latest Flutter Version and Add More Cleary Example App Usage
2 parents 51a29bc + 66a16bc commit 2cee13f

18 files changed

+382
-115
lines changed

CHANGELOG.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
## [0.0.1] - 08/04/2021
1+
## [1.0.0] - 06/07/2023
2+
3+
* Migrate to latest flutter
4+
* Enhance example app
5+
6+
## [0.0.3] - 18/05/2022
27

3-
* Initial release.
8+
* Migrate to support Flutter 3
9+
* Add clip behavior
410

511
## [0.0.2] - 08/04/2021
612

713
* Fix typo
814

9-
## [0.0.3] - 18/05/2022
15+
## [0.0.1] - 08/04/2021
1016

11-
* Migrate to support Flutter 3
12-
* Add clip behavior
17+
* Initial release.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class MyAp extends StatelessWidget {
3535
return MaterialApp(
3636
home: Scaffold(
3737
appBar: AppBar(
38-
title: Text('Title '),
38+
title: Text('Flutter Web Frame'),
3939
),
4040
body: Center(
4141
child: Text('Body Text'),

analisys

Whitespace-only changes.

example/.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
**/doc/api/
26+
**/ios/Flutter/.last_build_id
27+
.dart_tool/
28+
.flutter-plugins
29+
.flutter-plugins-dependencies
30+
.packages
31+
.pub-cache/
32+
.pub/
33+
/build/
34+
35+
# Symbolication related
36+
app.*.symbols
37+
38+
# Obfuscation related
39+
app.*.map.json
40+
41+
# Android Studio will place build artifacts here
42+
/android/app/debug
43+
/android/app/profile
44+
/android/app/release

example/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# example
2+
3+
A new Flutter project.
4+
5+
## Getting Started
6+
7+
This project is a starting point for a Flutter application.
8+
9+
A few resources to get you started if this is your first Flutter project:
10+
11+
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12+
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13+
14+
For help getting started with Flutter development, view the
15+
[online documentation](https://docs.flutter.dev/), which offers tutorials,
16+
samples, guidance on mobile development, and a full API reference.

example/lib/main.dart

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
import 'package:flutter/foundation.dart';
2+
import 'package:flutter/material.dart';
3+
import 'package:flutter_web_frame/flutter_web_frame.dart';
4+
5+
void main() {
6+
runApp(MyApp());
7+
}
8+
9+
class MyApp extends StatelessWidget {
10+
@override
11+
Widget build(BuildContext context) {
12+
return FlutterWebFrame(
13+
builder: (context) {
14+
return MaterialApp(
15+
home: FirstScreen(),
16+
);
17+
},
18+
clipBehavior: Clip.hardEdge,
19+
maximumSize: Size(475.0, 812.0),
20+
enabled: kIsWeb,
21+
backgroundColor: Colors.grey,
22+
);
23+
}
24+
}
25+
26+
class FirstScreen extends StatelessWidget {
27+
const FirstScreen({Key? key}) : super(key: key);
28+
29+
@override
30+
Widget build(BuildContext context) {
31+
return Scaffold(
32+
appBar: AppBar(
33+
title: Text('Flutter Web Frame'),
34+
),
35+
body: Stack(
36+
children: [
37+
Positioned(
38+
child: _buildButton(context),
39+
left: 0,
40+
top: 20,
41+
),
42+
Positioned(
43+
child: _buildButton(context),
44+
right: 0,
45+
top: 20,
46+
),
47+
Positioned(
48+
child: _buildButton(context),
49+
left: 0,
50+
bottom: 20,
51+
),
52+
Positioned(
53+
child: _buildButton(context),
54+
right: 0,
55+
bottom: 20,
56+
),
57+
Center(child: _buildButton(context)),
58+
],
59+
),
60+
);
61+
}
62+
63+
Widget _buildButton(BuildContext context) {
64+
return ElevatedButton.icon(
65+
onPressed: () {
66+
Navigator.of(context).push(
67+
MaterialPageRoute(
68+
builder: (_) => SomeScreen(number: 1),
69+
),
70+
);
71+
},
72+
icon: Icon(Icons.next_plan),
73+
label: Text('Next Page'),
74+
);
75+
}
76+
}
77+
78+
class SomeScreen extends StatelessWidget {
79+
const SomeScreen({Key? key, required this.number}) : super(key: key);
80+
81+
final int number;
82+
83+
@override
84+
Widget build(BuildContext context) {
85+
return Scaffold(
86+
appBar: AppBar(
87+
title: Text('Screen $number'),
88+
),
89+
body: Column(
90+
mainAxisAlignment: MainAxisAlignment.center,
91+
children: [
92+
ElevatedButton(
93+
onPressed: () {
94+
Navigator.of(context).pop();
95+
},
96+
child: Text('Back'),
97+
),
98+
SizedBox(height: 20, width: double.infinity),
99+
ElevatedButton(
100+
onPressed: () {
101+
Navigator.of(context).push(
102+
MaterialPageRoute(
103+
builder: (_) => SomeScreen(number: number + 1),
104+
),
105+
);
106+
},
107+
child: Text('Next To Screen ${number + 1}'),
108+
),
109+
SizedBox(height: 20, width: double.infinity),
110+
TextField(
111+
decoration: InputDecoration(hintText: 'Input some text'),
112+
),
113+
],
114+
),
115+
);
116+
}
117+
}

example/main.dart

Lines changed: 0 additions & 30 deletions
This file was deleted.

example/pubspec.lock

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,20 @@ packages:
55
dependency: transitive
66
description:
77
name: characters
8-
url: "https://pub.dartlang.org"
8+
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
9+
url: "https://pub.dev"
910
source: hosted
10-
version: "1.2.0"
11+
version: "1.2.1"
1112
collection:
1213
dependency: transitive
1314
description:
1415
name: collection
15-
url: "https://pub.dartlang.org"
16+
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
17+
url: "https://pub.dev"
1618
source: hosted
17-
version: "1.15.0"
19+
version: "1.17.0"
1820
flutter:
19-
dependency: transitive
21+
dependency: "direct main"
2022
description: flutter
2123
source: sdk
2224
version: "0.0.0"
@@ -26,40 +28,44 @@ packages:
2628
path: ".."
2729
relative: true
2830
source: path
29-
version: "0.0.3"
31+
version: "1.0.0"
32+
js:
33+
dependency: transitive
34+
description:
35+
name: js
36+
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
37+
url: "https://pub.dev"
38+
source: hosted
39+
version: "0.6.5"
3040
material_color_utilities:
3141
dependency: transitive
3242
description:
3343
name: material_color_utilities
34-
url: "https://pub.dartlang.org"
44+
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
45+
url: "https://pub.dev"
3546
source: hosted
36-
version: "0.1.3"
47+
version: "0.2.0"
3748
meta:
3849
dependency: transitive
3950
description:
4051
name: meta
41-
url: "https://pub.dartlang.org"
52+
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
53+
url: "https://pub.dev"
4254
source: hosted
43-
version: "1.7.0"
55+
version: "1.8.0"
4456
sky_engine:
4557
dependency: transitive
4658
description: flutter
4759
source: sdk
4860
version: "0.0.99"
49-
typed_data:
50-
dependency: transitive
51-
description:
52-
name: typed_data
53-
url: "https://pub.dartlang.org"
54-
source: hosted
55-
version: "1.3.0"
5661
vector_math:
5762
dependency: transitive
5863
description:
5964
name: vector_math
60-
url: "https://pub.dartlang.org"
65+
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
66+
url: "https://pub.dev"
6167
source: hosted
62-
version: "2.1.1"
68+
version: "2.1.4"
6369
sdks:
64-
dart: ">=2.14.0 <3.0.0"
70+
dart: ">=2.18.0 <3.0.0"
6571
flutter: ">=1.17.0"

example/pubspec.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
name: example
2-
32
environment:
4-
sdk: ">=2.12.0-0 <3.0.0"
3+
sdk: ">=2.12.0 <3.0.0"
4+
flutter: ">=1.17.0"
55

66
dependencies:
7+
flutter:
8+
sdk: flutter
79
flutter_web_frame:
8-
path: ../
10+
path: ../
11+
12+
flutter:
13+
uses-material-design: true

example/web/favicon.png

917 Bytes
Loading

0 commit comments

Comments
 (0)