diff --git a/lib/widget/viewer.dart b/lib/widget/viewer.dart index 9eca4c71..a4f7b3a6 100644 --- a/lib/widget/viewer.dart +++ b/lib/widget/viewer.dart @@ -86,6 +86,12 @@ class _ViewerState extends State { ); } + @override + dispose() { + super.dispose(); + SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values); + } + Widget _buildWebContent(BuildContext context) { assert(platform_k.isWeb); // support switching pages with keyboard on web @@ -661,6 +667,11 @@ class _ViewerState extends State { void _setShowActionBar(bool flag) { _isShowAppBar = flag; + if (flag) { + SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values); + } else { + SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]); + } } void _openDetailPane(int index, {bool shouldAnimate = false}) {