更新样式
This commit is contained in:
107
lib/main.dart
107
lib/main.dart
@@ -22,6 +22,7 @@ import 'package:vbvs_app/common/util/DailyLogUtils.dart';
|
||||
import 'package:vbvs_app/common/util/Dio.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/JPushUtil.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
||||
import 'package:vbvs_app/controller/date/CalendarController.dart';
|
||||
import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart';
|
||||
@@ -82,7 +83,7 @@ import 'package:vbvs_app/pages/mh_page/user/controller/bind_tel_controller.dart'
|
||||
import 'package:vbvs_app/pages/mh_page/user/controller/mht_login_controller.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/user/controller/mht_register_controller.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/user/controller/update_password_controller.dart';
|
||||
import 'package:vbvs_app/routers/mh_routers.dart';
|
||||
import 'package:vbvs_app/routers/mh_routers.dart' as mh_routers_themecontroller;
|
||||
|
||||
import 'controller/mh_controller/apply_repair_controller.dart';
|
||||
import 'controller/user_info_controller.dart';
|
||||
@@ -846,7 +847,7 @@ class MyApp extends StatelessWidget {
|
||||
Locale('zh', 'CN'),
|
||||
],
|
||||
initialRoute: "/mianPageBottomChange",
|
||||
onGenerateRoute: mhonGenerateRoute,
|
||||
onGenerateRoute: mh_routers_themecontroller.mhonGenerateRoute,
|
||||
initialBinding: BindingsBuilder(() => [
|
||||
// Get.lazyPut(() => UserInfoController()),
|
||||
Get.put(GlobalController()),
|
||||
@@ -906,55 +907,59 @@ class MyApp extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget buildth(BuildContext context, BoxConstraints cons) {
|
||||
return GetMaterialApp(
|
||||
translations: AppLanguage(),
|
||||
// locale: const Locale("zh", "CN"),
|
||||
locale: AppLanguage().currentLocale, // ✅ 动态读取当前语言
|
||||
fallbackLocale: const Locale("zh", "CN"),
|
||||
localizationsDelegates: [
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
SfGlobalLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: [
|
||||
const Locale('zh', 'CN'), // 中文
|
||||
const Locale('en', 'US'), // ⚠️ 添加你支持的语言
|
||||
],
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: '太和e护',
|
||||
theme: themeController.currentTheme,
|
||||
// home: const MyHomePage(title: '智慧眠花糖 Home Page'),
|
||||
initialRoute: "/mianPageBottomChange",
|
||||
onGenerateRoute: onGenerateRoute,
|
||||
initialBinding: BindingsBuilder(() => [
|
||||
// Get.lazyPut(() => UserInfoController()),
|
||||
Get.put(GlobalController()),
|
||||
Get.put(WeatherModelController()),
|
||||
Get.lazyPut(() => ApplyRepairController()),
|
||||
Get.lazyPut(() => MainPageController()),
|
||||
Get.lazyPut(() => BlueteethBindController()),
|
||||
Get.lazyPut(() => PersonController()),
|
||||
Get.lazyPut(() => CountdownController()),
|
||||
Get.lazyPut(() => LoginController()),
|
||||
Get.lazyPut(() => DeviceTypeController()),
|
||||
Get.lazyPut(() => BodyDeviceController()),
|
||||
Get.lazyPut(() => HomeController()),
|
||||
Get.lazyPut(() => DeviceShareController()),
|
||||
Get.lazyPut(() => DeviceShareListController()),
|
||||
Get.lazyPut(() => DeviceCalibrationController()),
|
||||
Get.lazyPut(() => RepairController()),
|
||||
Get.lazyPut(() => UserPdfController()),
|
||||
Get.lazyPut(() => PrivacyPdfController()),
|
||||
Get.lazyPut(() => CalendarController()),
|
||||
Get.lazyPut(() => SleepReportController()),
|
||||
Get.lazyPut(() => MessageReviewController()),
|
||||
Get.lazyPut(() => MessageSettingController()),
|
||||
Get.lazyPut(() => CommonMessageSettingController()),
|
||||
Get.lazyPut(() => AuthBindTelController()),
|
||||
Get.lazyPut(() => MHTLoginController()),
|
||||
Get.lazyPut(() => MHTRegisterController()),
|
||||
]));
|
||||
return Obx(() {
|
||||
var aa = languageController.appLocale.value;
|
||||
return GetMaterialApp(
|
||||
translations: AppLanguage(),
|
||||
// locale: const Locale("zh", "CN"),
|
||||
locale: AppLanguage().currentLocale, // ✅ 动态读取当前语言
|
||||
// locale:languageController.appLocale.value, // ✅ 动态读取当前语言
|
||||
fallbackLocale: const Locale("zh", "CN"),
|
||||
localizationsDelegates: [
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
SfGlobalLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: [
|
||||
const Locale('zh', 'CN'), // 中文
|
||||
const Locale('en', 'US'), // ⚠️ 添加你支持的语言
|
||||
],
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: '太和e护',
|
||||
theme: themeController.currentTheme,
|
||||
// home: const MyHomePage(title: '智慧眠花糖 Home Page'),
|
||||
initialRoute: "/mianPageBottomChange",
|
||||
onGenerateRoute: onGenerateRoute,
|
||||
initialBinding: BindingsBuilder(() => [
|
||||
// Get.lazyPut(() => UserInfoController()),
|
||||
Get.put(GlobalController()),
|
||||
Get.put(WeatherModelController()),
|
||||
Get.lazyPut(() => ApplyRepairController()),
|
||||
Get.lazyPut(() => MainPageController()),
|
||||
Get.lazyPut(() => BlueteethBindController()),
|
||||
Get.lazyPut(() => PersonController()),
|
||||
Get.lazyPut(() => CountdownController()),
|
||||
Get.lazyPut(() => LoginController()),
|
||||
Get.lazyPut(() => DeviceTypeController()),
|
||||
Get.lazyPut(() => BodyDeviceController()),
|
||||
Get.lazyPut(() => HomeController()),
|
||||
Get.lazyPut(() => DeviceShareController()),
|
||||
Get.lazyPut(() => DeviceShareListController()),
|
||||
Get.lazyPut(() => DeviceCalibrationController()),
|
||||
Get.lazyPut(() => RepairController()),
|
||||
Get.lazyPut(() => UserPdfController()),
|
||||
Get.lazyPut(() => PrivacyPdfController()),
|
||||
Get.lazyPut(() => CalendarController()),
|
||||
Get.lazyPut(() => SleepReportController()),
|
||||
Get.lazyPut(() => MessageReviewController()),
|
||||
Get.lazyPut(() => MessageSettingController()),
|
||||
Get.lazyPut(() => CommonMessageSettingController()),
|
||||
Get.lazyPut(() => AuthBindTelController()),
|
||||
Get.lazyPut(() => MHTLoginController()),
|
||||
Get.lazyPut(() => MHTRegisterController()),
|
||||
]));
|
||||
});
|
||||
}
|
||||
|
||||
int selectapp = AppConstants().ent_type;
|
||||
|
||||
Reference in New Issue
Block a user