Skip to content

Commit 970db48

Browse files
committed
🔥 Remove the implied system UI overlay manipulations
1 parent 971cdc4 commit 970db48

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ that can be found in the LICENSE file. -->
1414
### Improvements
1515

1616
- Hide the loading widget in the preview until an actual saving process has been invoked.
17+
- Remove the implied system UI overlay manipulations.
1718

1819
## 3.7.0
1920

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ linter:
178178
- provide_deprecation_message
179179
# - public_member_api_docs # enabled on a case-by-case basis; see e.g. packages/analysis_options.yaml
180180
- recursive_getters
181-
# - require_trailing_commas # blocked on https://github.com/dart-lang/sdk/issues/47441
181+
- require_trailing_commas
182182
- secure_pubspec_urls
183183
- sized_box_for_whitespace
184184
# - sized_box_shrink_expand # not yet tested

lib/src/states/camera_picker_state.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Use of this source code is governed by an Apache license that can be found
33
// in the LICENSE file.
44

5-
// ignore_for_file: deprecated_member_use
65
import 'dart:async';
76
import 'dart:io';
87
import 'dart:math' as math;
@@ -187,22 +186,11 @@ class CameraPickerState extends State<CameraPicker>
187186
ambiguate(WidgetsBinding.instance)?.addObserver(this);
188187
Constants.textDelegate = widget.pickerConfig.textDelegate ??
189188
cameraPickerTextDelegateFromLocale(widget.locale);
190-
191-
// TODO(Alex): Currently hide status bar will cause the viewport shaking on Android.
192-
/// Hide system status bar automatically when the platform is not Android.
193-
/// 在非 Android 设备上自动隐藏状态栏
194-
if (!Platform.isAndroid) {
195-
SystemChrome.setEnabledSystemUIOverlays(<SystemUiOverlay>[]);
196-
}
197-
198189
initCameras();
199190
}
200191

201192
@override
202193
void dispose() {
203-
if (!Platform.isAndroid) {
204-
SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);
205-
}
206194
ambiguate(WidgetsBinding.instance)?.removeObserver(this);
207195
innerController?.dispose();
208196
currentExposureOffset.dispose();

0 commit comments

Comments
 (0)