mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
update 1.0.7
This commit is contained in:
@@ -10,6 +10,7 @@ import 'package:logger/logger.dart';
|
||||
import 'package:qinglong_app/base/theme.dart';
|
||||
import 'package:qinglong_app/module/login/login_page.dart';
|
||||
import 'package:qinglong_app/utils/sp_utils.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
|
||||
import 'base/routes.dart';
|
||||
import 'base/userinfo_viewmodel.dart';
|
||||
@@ -34,8 +35,7 @@ void main() async {
|
||||
),
|
||||
);
|
||||
if (Platform.isAndroid) {
|
||||
SystemUiOverlayStyle style =
|
||||
const SystemUiOverlayStyle(statusBarColor: Colors.transparent);
|
||||
SystemUiOverlayStyle style = const SystemUiOverlayStyle(statusBarColor: Colors.transparent);
|
||||
SystemChrome.setSystemUIOverlayStyle(style);
|
||||
}
|
||||
}
|
||||
@@ -56,14 +56,22 @@ class QlAppState extends ConsumerState<QlApp> {
|
||||
FocusScope.of(context).requestFocus(FocusNode());
|
||||
},
|
||||
child: MediaQuery(
|
||||
data:
|
||||
MediaQueryData.fromWindow(WidgetsBinding.instance!.window).copyWith(
|
||||
data: MediaQueryData.fromWindow(WidgetsBinding.instance!.window).copyWith(
|
||||
textScaleFactor: 1,
|
||||
),
|
||||
child: MaterialApp(
|
||||
title: "青龙",
|
||||
locale: const Locale('zh', 'CN'),
|
||||
navigatorKey: navigatorState,
|
||||
localizationsDelegates: const [
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: const [
|
||||
Locale('zh', 'CN'),
|
||||
Locale('en', 'US'),
|
||||
],
|
||||
theme: ref.watch<ThemeViewModel>(themeProvider).currentTheme,
|
||||
onGenerateRoute: (setting) {
|
||||
return Routes.generateRoute(setting);
|
||||
@@ -73,9 +81,7 @@ class QlAppState extends ConsumerState<QlApp> {
|
||||
if (!kReleaseMode) {
|
||||
showDebugBtn(context);
|
||||
}
|
||||
return getIt<UserInfoViewModel>().isLogined()
|
||||
? const HomePage()
|
||||
: const LoginPage();
|
||||
return getIt<UserInfoViewModel>().isLogined() ? const HomePage() : const LoginPage();
|
||||
},
|
||||
),
|
||||
// home: LoginPage(),
|
||||
|
||||
Reference in New Issue
Block a user