-
Notifications
You must be signed in to change notification settings - Fork 845
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zjuwjf
committed
Apr 3, 2019
1 parent
225cea0
commit 1c0a999
Showing
8 changed files
with
61 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
import 'package:fish_redux/fish_redux.dart'; | ||
import 'todo_edit_page/page.dart'; | ||
import 'todo_list_page/page.dart'; | ||
|
||
Widget createApp() { | ||
final AbstractRoutes routes = HybridRoutes(routes: <AbstractRoutes>[ | ||
PageRoutes( | ||
pages: <String, Page<Object, dynamic>>{ | ||
'todo_list': ToDoListPage(), | ||
'todo_edit': TodoEditPage(), | ||
}, | ||
), | ||
]); | ||
|
||
return MaterialApp( | ||
title: 'Fluro', | ||
debugShowCheckedModeBanner: false, | ||
theme: ThemeData( | ||
primarySwatch: Colors.blue, | ||
), | ||
home: routes.buildPage('todo_list', null), | ||
onGenerateRoute: (RouteSettings settings) { | ||
return MaterialPageRoute<Object>(builder: (BuildContext context) { | ||
return routes.buildPage(settings.name, settings.arguments); | ||
}); | ||
}, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,4 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'app.dart'; | ||
|
||
import 'todo_list_page/page.dart'; | ||
|
||
void main() => runApp(MyApp()); | ||
|
||
class MyApp extends StatefulWidget { | ||
@override | ||
_MyAppState createState() => _MyAppState(); | ||
} | ||
|
||
class _MyAppState extends State<MyApp> { | ||
@override | ||
Widget build(BuildContext context) => | ||
MaterialApp(home: ToDoListPage().buildPage(<String, dynamic>{})); | ||
} | ||
void main() => runApp(createApp()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,6 @@ dependencies: | |
path: ../ | ||
flutter: | ||
sdk: flutter | ||
|
||
path_provider: ^0.4.1 | ||
|
||
dev_dependencies: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export 'routes.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters