|
|
@ -2,8 +2,10 @@ import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:bot_toast/bot_toast.dart';
|
|
|
|
import 'package:bot_toast/bot_toast.dart';
|
|
|
|
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
|
|
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
|
|
|
import 'package:flutter_picker/flutter_picker.dart';
|
|
|
|
import 'package:flutter_picker/flutter_picker.dart';
|
|
|
|
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:fluwx/fluwx.dart';
|
|
|
|
import 'package:fluwx/fluwx.dart';
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
import 'package:jpush_flutter/jpush_flutter.dart';
|
|
|
|
import 'package:jpush_flutter/jpush_flutter.dart';
|
|
|
@ -20,6 +22,9 @@ import 'package:akuCommunity/utils/developer_util.dart';
|
|
|
|
|
|
|
|
|
|
|
|
void main() async {
|
|
|
|
void main() async {
|
|
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
|
|
|
|
SystemChrome.setSystemUIOverlayStyle(
|
|
|
|
|
|
|
|
SystemUiOverlayStyle(statusBarColor: Colors.transparent),
|
|
|
|
|
|
|
|
);
|
|
|
|
JPush jpush = new JPush();
|
|
|
|
JPush jpush = new JPush();
|
|
|
|
jpush.addEventHandler(
|
|
|
|
jpush.addEventHandler(
|
|
|
|
// 接收通知回调方法。
|
|
|
|
// 接收通知回调方法。
|
|
|
@ -80,23 +85,27 @@ class _MyAppState extends State<MyApp> {
|
|
|
|
FocusManager.instance.primaryFocus.unfocus();
|
|
|
|
FocusManager.instance.primaryFocus.unfocus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: GetMaterialApp(
|
|
|
|
child: ScreenUtilInit(
|
|
|
|
title: '智慧社区',
|
|
|
|
designSize: Size(750, 1334),
|
|
|
|
debugShowCheckedModeBanner: false,
|
|
|
|
allowFontScaling: true,
|
|
|
|
theme: AppTheme.theme,
|
|
|
|
builder: () => GetMaterialApp(
|
|
|
|
home: SplashPage(),
|
|
|
|
title: '智慧社区',
|
|
|
|
//国际化支持
|
|
|
|
debugShowCheckedModeBanner: false,
|
|
|
|
localizationsDelegates: [
|
|
|
|
theme: AppTheme.theme,
|
|
|
|
PickerLocalizationsDelegate.delegate,
|
|
|
|
home: SplashPage(),
|
|
|
|
RefreshLocalizations.delegate,
|
|
|
|
//国际化支持
|
|
|
|
GlobalMaterialLocalizations.delegate,
|
|
|
|
localizationsDelegates: [
|
|
|
|
GlobalWidgetsLocalizations.delegate,
|
|
|
|
PickerLocalizationsDelegate.delegate,
|
|
|
|
GlobalCupertinoLocalizations.delegate,
|
|
|
|
RefreshLocalizations.delegate,
|
|
|
|
],
|
|
|
|
GlobalMaterialLocalizations.delegate,
|
|
|
|
supportedLocales: [const Locale('zh', 'CH')],
|
|
|
|
GlobalWidgetsLocalizations.delegate,
|
|
|
|
locale: Locale('zh'),
|
|
|
|
GlobalCupertinoLocalizations.delegate,
|
|
|
|
builder: BotToastInit(),
|
|
|
|
],
|
|
|
|
navigatorObservers: [BotToastNavigatorObserver()],
|
|
|
|
supportedLocales: [const Locale('zh', 'CH')],
|
|
|
|
|
|
|
|
locale: Locale('zh'),
|
|
|
|
|
|
|
|
builder: BotToastInit(),
|
|
|
|
|
|
|
|
navigatorObservers: [BotToastNavigatorObserver()],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|