|
|
@@ -21,36 +21,37 @@ class MobileCyberGamesApp extends StatelessWidget {
|
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
|
return StoreProvider(
|
|
|
- store: this.store,
|
|
|
- child: new MaterialApp(
|
|
|
- title: '全民电竞',
|
|
|
- supportedLocales: [
|
|
|
- const Locale('en'), // English
|
|
|
- const Locale('zh'), // China
|
|
|
- ],
|
|
|
- localizationsDelegates: [
|
|
|
- GlobalMaterialLocalizations.delegate,
|
|
|
- GlobalWidgetsLocalizations.delegate,
|
|
|
- ChineseCupertinoLocalizations.delegate,
|
|
|
- ],
|
|
|
- theme: ThemeData(
|
|
|
- cardColor: Color(0xFF2B2B42),
|
|
|
- backgroundColor: Color(0xFF222335),
|
|
|
- primaryColor: Color(0xFFC2524D),
|
|
|
- buttonColor: Color(0xFFC2524D),
|
|
|
+ store: this.store,
|
|
|
+ child: new MaterialApp(
|
|
|
+ title: '全民电竞',
|
|
|
+ supportedLocales: [
|
|
|
+ const Locale('en'), // English
|
|
|
+ const Locale('zh'), // China
|
|
|
+ ],
|
|
|
+ localizationsDelegates: [
|
|
|
+ GlobalMaterialLocalizations.delegate,
|
|
|
+ GlobalWidgetsLocalizations.delegate,
|
|
|
+ ChineseCupertinoLocalizations.delegate,
|
|
|
+ ],
|
|
|
+ theme: ThemeData(
|
|
|
+ cardColor: Color(0xFF2B2B42),
|
|
|
+ backgroundColor: Color(0xFF222335),
|
|
|
+ primaryColor: Color(0xFFC2524D),
|
|
|
+ buttonColor: Color(0xFFC2524D),
|
|
|
// highlightColor: Color(0xFF933E3E),
|
|
|
- accentColor: Color(0xFFC2524D),
|
|
|
- textSelectionColor: Colors.white,
|
|
|
- textTheme: TextTheme(
|
|
|
- subhead: TextStyle(color: Colors.white),
|
|
|
- ),
|
|
|
- buttonTheme: ButtonThemeData(
|
|
|
- buttonColor: Color(0xFFC2524D),
|
|
|
- highlightColor: Color(0xFF9B4040),
|
|
|
- splashColor: Color(0xFF9B4040),
|
|
|
- )),
|
|
|
- home: store.state.isLogin ? HomePage() : LoginFirst(),
|
|
|
- ));
|
|
|
+ accentColor: Color(0xFFC2524D),
|
|
|
+ textSelectionColor: Colors.white,
|
|
|
+ textTheme: TextTheme(
|
|
|
+ subhead: TextStyle(color: Colors.white),
|
|
|
+ ),
|
|
|
+ buttonTheme: ButtonThemeData(
|
|
|
+ buttonColor: Color(0xFFC2524D),
|
|
|
+ highlightColor: Color(0xFF9B4040),
|
|
|
+ splashColor: Color(0xFF9B4040),
|
|
|
+ )),
|
|
|
+ home: store.state.isLogin ? HomePage() : LoginFirst(),
|
|
|
+ ),
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -69,7 +70,6 @@ void main() async {
|
|
|
state.isLogin = true;
|
|
|
UserInfo userInfo = UserInfo.fromJson(result.data);
|
|
|
state.userInfo = userInfo;
|
|
|
- prefs.setString("token", result.token);
|
|
|
} else {
|
|
|
state.isLogin = false;
|
|
|
}
|