Skip to content

Commit a18bd4f

Browse files
committed
create main page
1 parent 7bfaaff commit a18bd4f

File tree

4 files changed

+33
-7
lines changed

4 files changed

+33
-7
lines changed

lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:flutter/material.dart';
2-
import 'package:flutter_ui_nice/page/navigation/NavigationPageOne.dart';
2+
import 'package:flutter_ui_nice/page/navigation/navigation1/coordinator.dart';
33
import 'package:flutter_ui_nice/page/page_const.dart';
44
import 'const/string_const.dart';
55
import 'const/color_const.dart';
@@ -40,7 +40,7 @@ class MyApp extends StatelessWidget {
4040
SHOPPING_PAGES[17]: (context) => ShopPageEighteen(),
4141
SHOPPING_PAGES[18]: (context) => ShopPageNineteen(),
4242

43-
//NAVIGATION_PAGES[0]: (context) => ,
43+
NAVIGATION_PAGES[0]: (context) => NavigationOneCoordinator(),
4444
//FIXME there are other pages to jump with 'page_str_const.dart',there should be make by manager
4545
},
4646
onUnknownRoute: (setting) =>
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
import 'package:flutter/material.dart';
2+
import 'package:flutter_ui_nice/page/navigation/navigation1/widgets/main_page.dart';
23

3-
class Coordinator extends StatefulWidget {
4+
class NavigationOneCoordinator extends StatefulWidget {
45
@override
56
_Coordinator createState() => _Coordinator();
67
}
78

8-
class _Coordinator extends State<Coordinator> {
9+
class _Coordinator extends State<NavigationOneCoordinator> {
910

1011
@override
1112
void initState() {
1213
super.initState();
1314
}
15+
1416
@override
15-
Widget build(BuildContext context) {
16-
return null;
17-
}
17+
Widget build(BuildContext context) => MainPage();
18+
19+
@override
20+
void dispose() {
21+
super.dispose();
22+
}
1823
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_ui_nice/const/color_const.dart';
3+
4+
class MainPage extends StatelessWidget {
5+
6+
@override
7+
Widget build(BuildContext context) => Container(
8+
decoration: BoxDecoration(
9+
gradient: LinearGradient(
10+
begin: Alignment.topLeft,
11+
end: Alignment.bottomRight,
12+
colors: [YELLOW, GREEN, BLUE],
13+
)
14+
),
15+
child: Stack(
16+
children: <Widget>[
17+
18+
],
19+
),
20+
);
21+
}

0 commit comments

Comments
 (0)