|
@@ -10,9 +10,10 @@ import './Localizations.dart';
|
|
|
import 'model/UserInfo.dart';
|
|
import 'model/UserInfo.dart';
|
|
|
import 'net/HttpManager.dart';
|
|
import 'net/HttpManager.dart';
|
|
|
import 'net/Result.dart';
|
|
import 'net/Result.dart';
|
|
|
-import 'pages/HomePage.dart';
|
|
|
|
|
import 'pages/loginFirst.dart';
|
|
import 'pages/loginFirst.dart';
|
|
|
import 'redux/AppState.dart';
|
|
import 'redux/AppState.dart';
|
|
|
|
|
+import 'pages/Home.dart';
|
|
|
|
|
+import './styles/colors.dart';
|
|
|
|
|
|
|
|
class MobileCyberGamesApp extends StatelessWidget {
|
|
class MobileCyberGamesApp extends StatelessWidget {
|
|
|
const MobileCyberGamesApp(this.store);
|
|
const MobileCyberGamesApp(this.store);
|
|
@@ -35,21 +36,21 @@ class MobileCyberGamesApp extends StatelessWidget {
|
|
|
ChineseCupertinoLocalizations.delegate,
|
|
ChineseCupertinoLocalizations.delegate,
|
|
|
],
|
|
],
|
|
|
theme: ThemeData(
|
|
theme: ThemeData(
|
|
|
- cardColor: Color(0xFF2B2B42),
|
|
|
|
|
- backgroundColor: Color(0xFF222335),
|
|
|
|
|
- primaryColor: Color(0xFFC2524D),
|
|
|
|
|
- buttonColor: Color(0xFFC2524D),
|
|
|
|
|
- accentColor: Color(0xFFC2524D),
|
|
|
|
|
- textSelectionColor: Colors.white,
|
|
|
|
|
- textTheme: TextTheme(
|
|
|
|
|
- subhead: TextStyle(color: Colors.white),
|
|
|
|
|
- ),
|
|
|
|
|
- buttonTheme: ButtonThemeData(
|
|
|
|
|
- buttonColor: Color(0xFFC2524D),
|
|
|
|
|
- highlightColor: Color(0xFF9B4040),
|
|
|
|
|
- splashColor: Color(0xFF9B4040),
|
|
|
|
|
- shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(0))),
|
|
|
|
|
- )),
|
|
|
|
|
|
|
+ cardColor: Color(0xFF2B2B42),
|
|
|
|
|
+ backgroundColor: Color(0xFF222335),
|
|
|
|
|
+ primaryColor: PRIMARY_COLOR,
|
|
|
|
|
+ buttonColor: PRIMARY_COLOR,
|
|
|
|
|
+ accentColor: PRIMARY_COLOR,
|
|
|
|
|
+ textSelectionColor: Colors.white,
|
|
|
|
|
+ textTheme: TextTheme(
|
|
|
|
|
+ subhead: TextStyle(color: Colors.white),
|
|
|
|
|
+ ),
|
|
|
|
|
+ buttonTheme: ButtonThemeData(
|
|
|
|
|
+ buttonColor: PRIMARY_COLOR,
|
|
|
|
|
+ splashColor: PRIMARY_COLOR,
|
|
|
|
|
+ shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(0))),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
home: store.state.userInfo != null ? HomePage() : LoginFirst(),
|
|
home: store.state.userInfo != null ? HomePage() : LoginFirst(),
|
|
|
routes: {'/home': (BuildContext context) => HomePage()},
|
|
routes: {'/home': (BuildContext context) => HomePage()},
|
|
|
),
|
|
),
|
|
@@ -78,7 +79,9 @@ Future<void> main() async {
|
|
|
if (result.success && result.data != null) {
|
|
if (result.success && result.data != null) {
|
|
|
UserInfo userInfo = UserInfo.fromJson(result.data);
|
|
UserInfo userInfo = UserInfo.fromJson(result.data);
|
|
|
state.userInfo = userInfo;
|
|
state.userInfo = userInfo;
|
|
|
- jpush.setAlias(userInfo.id.toString()).then((map) {});
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ // jpush.setAlias(userInfo.id.toString()).then((map) {});
|
|
|
|
|
+ } catch (e) {}
|
|
|
}
|
|
}
|
|
|
Store<AppState> store = Store<AppState>(appReducer, initialState: state);
|
|
Store<AppState> store = Store<AppState>(appReducer, initialState: state);
|
|
|
runApp(MobileCyberGamesApp(store));
|
|
runApp(MobileCyberGamesApp(store));
|