Skip to content

Instantly share code, notes, and snippets.

@swat-cat
Created October 25, 2018 17:07
Show Gist options
  • Select an option

  • Save swat-cat/d107540f042a5eae4e72db3aa053324a to your computer and use it in GitHub Desktop.

Select an option

Save swat-cat/d107540f042a5eae4e72db3aa053324a to your computer and use it in GitHub Desktop.
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