Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ethan
/
appframe
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit cf112417
authored
2026-01-15 14:32:53 +0800
by
tanghuan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
横屏时,隐藏顶部的系统状态栏
1 parent
f9f42622
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
lib/bloc/link_cubit.dart
lib/data/repositories/message/screen_handler.dart
lib/bloc/link_cubit.dart
View file @
cf11241
...
...
@@ -111,12 +111,16 @@ class LinkCubit extends Cubit<LinkState> {
DeviceOrientation
.
landscapeLeft
,
DeviceOrientation
.
landscapeRight
,
]);
// 隐藏状态栏
SystemChrome
.
setEnabledSystemUIMode
(
SystemUiMode
.
immersive
);
}
else
{
// 竖屏模式(默认)
SystemChrome
.
setPreferredOrientations
([
DeviceOrientation
.
portraitUp
,
DeviceOrientation
.
portraitDown
,
]);
// 显示状态栏
SystemChrome
.
setEnabledSystemUIMode
(
SystemUiMode
.
edgeToEdge
);
}
}
...
...
lib/data/repositories/message/screen_handler.dart
View file @
cf11241
...
...
@@ -21,12 +21,16 @@ class ScreenHandler extends MessageHandler {
DeviceOrientation
.
landscapeLeft
,
DeviceOrientation
.
landscapeRight
,
]);
// 隐藏状态栏
SystemChrome
.
setEnabledSystemUIMode
(
SystemUiMode
.
immersive
);
}
else
{
// 竖屏模式(默认)
SystemChrome
.
setPreferredOrientations
([
DeviceOrientation
.
portraitUp
,
DeviceOrientation
.
portraitDown
,
]);
// 显示状态栏
SystemChrome
.
setEnabledSystemUIMode
(
SystemUiMode
.
edgeToEdge
);
}
}
}
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment