Created
October 25, 2018 17:07
-
-
Save swat-cat/d107540f042a5eae4e72db3aa053324a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import 'package:flutter/material.dart'; | |
| import 'package:redux/redux.dart'; | |
| ... | |
| void main() async{ | |
| SystemChrome.setPreferredOrientations([ | |
| DeviceOrientation.portraitDown, | |
| DeviceOrientation.portraitUp, | |
| ]); | |
| var store = await createStore(); | |
| runApp(new App(store)); | |
| } | |
| class App extends StatefulWidget { | |
| final Store<AppState> store; | |
| App(this.store); | |
| @override | |
| _AppState createState() => _AppState(); | |
| } | |
| class _AppState extends State<App> { | |
| @override | |
| Widget build(BuildContext context) { | |
| return new StoreProvider<AppState>( | |
| store: widget.store, | |
| child: new MaterialApp( | |
| theme: new ThemeData( | |
| brightness: Brightness.dark, | |
| // ignore: strong_mode_invalid_cast_new_expr | |
| primaryColor: const Color(0xFF000000), | |
| accentColor: const Color(primaryPink), | |
| ), | |
| home: SignIn(), | |
| navigatorKey: Keys.navKey, | |
| routes: <String, WidgetBuilder>{ | |
| "/signin": (BuildContext context) => new SignIn(), | |
| "/signup": (BuildContext context) => new SignUp(), | |
| } | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment