Skip to content

Commit 185e7fe

Browse files
committed
⚗️ Experimenting status bar hidden on iOS.
1 parent 639e03f commit 185e7fe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/src/widget/asset_picker_viewer.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,12 @@ class AssetPickerViewerState extends State<AssetPickerViewer>
175175
void initState() {
176176
super.initState();
177177

178-
// TODO(Alex): Currently hide status bar will cause the viewport shaking. So commented out.
178+
// TODO(Alex): Currently hide status bar will cause the viewport shaking on Android.
179179
/// Hide system status bar automatically on iOS.
180180
/// 在iOS设备上自动隐藏状态栏
181-
// if (Platform.isIOS) {
182-
// SystemChrome.setEnabledSystemUIOverlays(<SystemUiOverlay>[]);
183-
// }
181+
if (Platform.isIOS) {
182+
SystemChrome.setEnabledSystemUIOverlays(<SystemUiOverlay>[]);
183+
}
184184
_doubleTapAnimationController = AnimationController(
185185
duration: const Duration(milliseconds: 200),
186186
vsync: this,
@@ -198,7 +198,7 @@ class AssetPickerViewerState extends State<AssetPickerViewer>
198198

199199
@override
200200
void dispose() {
201-
// SystemChrome.restoreSystemUIOverlays();
201+
SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);
202202
_doubleTapAnimationController?.dispose();
203203
pageStreamController?.close();
204204
super.dispose();

0 commit comments

Comments
 (0)