Skip to content

Commit 3df7416

Browse files
committed
🚨 Fix lint issues on Flutter 2.10
1 parent 680cb2d commit 3df7416

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/src/widgets/camera_picker.dart

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/// [Author] Alex (https://github.com/AlexV525)
33
/// [Date] 2020/7/13 11:08
44
///
5+
// ignore_for_file: deprecated_member_use
56
import 'dart:async';
67
import 'dart:io';
78
import 'dart:math' as math;
@@ -235,7 +236,6 @@ class CameraPicker extends StatefulWidget {
235236
static ThemeData themeData(Color themeColor) {
236237
return ThemeData.dark().copyWith(
237238
primaryColor: Colors.grey[900],
238-
primaryColorBrightness: Brightness.dark,
239239
primaryColorLight: Colors.grey[900],
240240
primaryColorDark: Colors.grey[900],
241241
canvasColor: Colors.grey[850],
@@ -438,7 +438,6 @@ class CameraPickerState extends State<CameraPicker>
438438
/// Hide system status bar automatically when the platform is not Android.
439439
/// 在非 Android 设备上自动隐藏状态栏
440440
if (!Platform.isAndroid) {
441-
// ignore: deprecated_member_use
442441
SystemChrome.setEnabledSystemUIOverlays(<SystemUiOverlay>[]);
443442
}
444443

@@ -448,7 +447,6 @@ class CameraPickerState extends State<CameraPicker>
448447
@override
449448
void dispose() {
450449
if (!Platform.isAndroid) {
451-
// ignore: deprecated_member_use
452450
SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);
453451
}
454452
WidgetsBinding.instance?.removeObserver(this);
@@ -941,12 +939,14 @@ class CameraPickerState extends State<CameraPicker>
941939
if (enableRecording && !enableTapRecording) {
942940
return recordDetectionCancel;
943941
}
942+
return null;
944943
}
945944

946945
PointerMoveEventListener? onPointerMove(BoxConstraints c) {
947946
if (enablePullToZoomInRecord) {
948947
return (PointerMoveEvent e) => onShootingButtonMove(e, c);
949948
}
949+
return null;
950950
}
951951

952952
GestureTapCallback? get onTap {
@@ -964,6 +964,7 @@ class CameraPickerState extends State<CameraPicker>
964964
if (!onlyEnableRecording) {
965965
return takePicture;
966966
}
967+
return null;
967968
}
968969

969970
String? get onTapHint {
@@ -976,18 +977,21 @@ class CameraPickerState extends State<CameraPicker>
976977
if (!onlyEnableRecording) {
977978
return _textDelegate.sActionShootHint;
978979
}
980+
return null;
979981
}
980982

981983
GestureLongPressCallback? get onLongPress {
982984
if (enableRecording && !enableTapRecording) {
983985
return recordDetection;
984986
}
987+
return null;
985988
}
986989

987990
String? get onLongPressHint {
988991
if (enableRecording && !enableTapRecording) {
989992
return _textDelegate.sActionRecordHint;
990993
}
994+
return null;
991995
}
992996

993997
////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)