Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
laki_icu_app
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张宏
laki_icu_app
Commits
907782b8
Commit
907782b8
authored
Jun 27, 2026
by
张宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1111
parent
b5abe691
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
35 deletions
+14
-35
main.dart
lib/main.dart
+14
-35
No files found.
lib/main.dart
View file @
907782b8
...
...
@@ -188,42 +188,21 @@ class _MyAppState extends State<MyApp> {
),
// BlocProvider<CounterBloc>(create: (_) => CounterBloc()),
],
child:
MultiBlocListener
(
listeners:
[
// // AuthBloc 监听器 - 处理登录/Token 过期/登出
// BlocListener<AuthBloc, AuthState>(
// listener: (context, state) {
// if (state is AuthSuccess) {
// _appRouter.replaceAll([const DefaultLayoutRoute()]);
// }
// if (state is AuthTokenExpired) {
// _silentLogin();
// }
// if (state is AuthLoggedOut) {
// _silentLogin();
// }
// },
// ),
// 未来在这里添加其他 Bloc 的监听器:
// BlocListener<UserBloc, UserState>(listener: ...),
// BlocListener<SettingsBloc, SettingsState>(listener: ...),
child:
Stack
(
children:
[
MaterialApp
.
router
(
scaffoldMessengerKey:
_scaffoldMessengerKey
,
routerConfig:
_appRouter
.
config
(),
debugShowCheckedModeBanner:
false
,
builder:
(
context
,
child
)
{
// 每次页面重建时重新隐藏状态栏,防止路由切换后状态栏重新出现
SystemChrome
.
setEnabledSystemUIMode
(
SystemUiMode
.
manual
,
overlays:
[]);
return
child
??
const
SizedBox
.
shrink
();
},
),
if
(
_isInitializing
)
_buildSplash
(),
],
child:
Stack
(
children:
[
MaterialApp
.
router
(
scaffoldMessengerKey:
_scaffoldMessengerKey
,
routerConfig:
_appRouter
.
config
(),
debugShowCheckedModeBanner:
false
,
builder:
(
context
,
child
)
{
// 每次页面重建时重新隐藏状态栏,防止路由切换后状态栏重新出现
SystemChrome
.
setEnabledSystemUIMode
(
SystemUiMode
.
manual
,
overlays:
[]);
return
child
??
const
SizedBox
.
shrink
();
},
),
if
(
_isInitializing
)
_buildSplash
(),
],
),
),
);
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment