|
|
@@ -23,24 +23,21 @@ import 'data/const/constants.dart';
|
|
|
import 'di/get_it.dart';
|
|
|
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
|
|
|
|
|
-void main() {
|
|
|
- FlutterBugly.postCatchedException(() async {
|
|
|
- WidgetsFlutterBinding.ensureInitialized();
|
|
|
+void main() async {
|
|
|
+ WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
|
|
- //必要初始化
|
|
|
- await initRequired();
|
|
|
+ //必要初始化
|
|
|
+ await initRequired();
|
|
|
|
|
|
- //非隐私相关
|
|
|
- initCommon();
|
|
|
+ //非隐私相关
|
|
|
+ initCommon();
|
|
|
|
|
|
- runApp(const MyApp());
|
|
|
+ runApp(const MyApp());
|
|
|
|
|
|
- //檢查地址
|
|
|
- checkEnv();
|
|
|
- });
|
|
|
+ //檢查地址
|
|
|
+ checkEnv();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
Future<void> initRequired() async {
|
|
|
//Log
|
|
|
AtmobLog.setLogLevel(
|
|
|
@@ -58,8 +55,6 @@ void initCommon() {
|
|
|
smartConfig();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
void smartConfig() {
|
|
|
SmartDialog.config.custom =
|
|
|
SmartConfigCustom(animationType: SmartAnimationType.fade);
|
|
|
@@ -71,8 +66,6 @@ void checkEnv() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
class MyApp extends StatelessWidget {
|
|
|
const MyApp({super.key});
|
|
|
|
|
|
@@ -162,14 +155,14 @@ class AppCommonConfig {
|
|
|
|
|
|
// 本地化配置
|
|
|
static const localizations = (
|
|
|
- delegates: [
|
|
|
- GlobalMaterialLocalizations.delegate,
|
|
|
- GlobalWidgetsLocalizations.delegate,
|
|
|
- GlobalCupertinoLocalizations.delegate,
|
|
|
- ],
|
|
|
- supportedLocales: [Locale('en', 'US')],
|
|
|
- locale: Locale('en', 'US'),
|
|
|
- fallbackLocale: Locale('en', 'US'),
|
|
|
+ delegates: [
|
|
|
+ GlobalMaterialLocalizations.delegate,
|
|
|
+ GlobalWidgetsLocalizations.delegate,
|
|
|
+ GlobalCupertinoLocalizations.delegate,
|
|
|
+ ],
|
|
|
+ supportedLocales: [Locale('en', 'US')],
|
|
|
+ locale: Locale('en', 'US'),
|
|
|
+ fallbackLocale: Locale('en', 'US'),
|
|
|
);
|
|
|
|
|
|
// 多语言配置
|