From 6b3b12ba9fb4a492643bf8d82080a59c0e636039 Mon Sep 17 00:00:00 2001 From: camsim99 Date: Tue, 20 Dec 2022 10:40:04 -0800 Subject: [PATCH 1/6] Remove Optional --- .../camera/lib/src/camera_controller.dart | 31 ++++++++----------- .../camera/test/camera_preview_test.dart | 17 +++------- packages/camera/camera/test/camera_test.dart | 3 +- .../example/lib/camera_controller.dart | 29 ++++++++--------- .../example/lib/camera_controller.dart | 28 +++++++---------- 5 files changed, 44 insertions(+), 64 deletions(-) diff --git a/packages/camera/camera/lib/src/camera_controller.dart b/packages/camera/camera/lib/src/camera_controller.dart index ed1c951925d8..88db8eb3a60c 100644 --- a/packages/camera/camera/lib/src/camera_controller.dart +++ b/packages/camera/camera/lib/src/camera_controller.dart @@ -161,10 +161,10 @@ class CameraValue { bool? exposurePointSupported, bool? focusPointSupported, DeviceOrientation? deviceOrientation, - Optional? lockedCaptureOrientation, - Optional? recordingOrientation, + DeviceOrientation? lockedCaptureOrientation, + DeviceOrientation? recordingOrientation, + DeviceOrientation? previewPauseOrientation, bool? isPreviewPaused, - Optional? previewPauseOrientation, }) { return CameraValue( isInitialized: isInitialized ?? this.isInitialized, @@ -358,8 +358,8 @@ class CameraController extends ValueNotifier { await CameraPlatform.instance.pausePreview(_cameraId); value = value.copyWith( isPreviewPaused: true, - previewPauseOrientation: Optional.of( - value.lockedCaptureOrientation ?? value.deviceOrientation)); + previewPauseOrientation: + value.lockedCaptureOrientation ?? value.deviceOrientation); } on PlatformException catch (e) { throw CameraException(e.code, e.message); } @@ -372,9 +372,8 @@ class CameraController extends ValueNotifier { } try { await CameraPlatform.instance.resumePreview(_cameraId); - value = value.copyWith( - isPreviewPaused: false, - previewPauseOrientation: const Optional.absent()); + value = + value.copyWith(isPreviewPaused: false, previewPauseOrientation: null); } on PlatformException catch (e) { throw CameraException(e.code, e.message); } @@ -505,8 +504,8 @@ class CameraController extends ValueNotifier { value = value.copyWith( isRecordingVideo: true, isRecordingPaused: false, - recordingOrientation: Optional.of( - value.lockedCaptureOrientation ?? value.deviceOrientation)); + recordingOrientation: + value.lockedCaptureOrientation ?? value.deviceOrientation); } on PlatformException catch (e) { throw CameraException(e.code, e.message); } @@ -526,10 +525,8 @@ class CameraController extends ValueNotifier { try { final XFile file = await CameraPlatform.instance.stopVideoRecording(_cameraId); - value = value.copyWith( - isRecordingVideo: false, - recordingOrientation: const Optional.absent(), - ); + value = + value.copyWith(isRecordingVideo: false, recordingOrientation: null); return file; } on PlatformException catch (e) { throw CameraException(e.code, e.message); @@ -747,8 +744,7 @@ class CameraController extends ValueNotifier { await CameraPlatform.instance.lockCaptureOrientation( _cameraId, orientation ?? value.deviceOrientation); value = value.copyWith( - lockedCaptureOrientation: Optional.of( - orientation ?? value.deviceOrientation)); + lockedCaptureOrientation: orientation ?? value.deviceOrientation); } on PlatformException catch (e) { throw CameraException(e.code, e.message); } @@ -768,8 +764,7 @@ class CameraController extends ValueNotifier { Future unlockCaptureOrientation() async { try { await CameraPlatform.instance.unlockCaptureOrientation(_cameraId); - value = value.copyWith( - lockedCaptureOrientation: const Optional.absent()); + value = value.copyWith(lockedCaptureOrientation: null); } on PlatformException catch (e) { throw CameraException(e.code, e.message); } diff --git a/packages/camera/camera/test/camera_preview_test.dart b/packages/camera/camera/test/camera_preview_test.dart index bedb0ea8e01f..1fbb5e606e39 100644 --- a/packages/camera/camera/test/camera_preview_test.dart +++ b/packages/camera/camera/test/camera_preview_test.dart @@ -133,11 +133,8 @@ void main() { isInitialized: true, isRecordingVideo: true, deviceOrientation: DeviceOrientation.portraitUp, - lockedCaptureOrientation: - const Optional.fromNullable( - DeviceOrientation.landscapeRight), - recordingOrientation: const Optional.fromNullable( - DeviceOrientation.landscapeLeft), + lockedCaptureOrientation: DeviceOrientation.landscapeRight, + recordingOrientation: DeviceOrientation.landscapeLeft, previewSize: const Size(480, 640), ); @@ -167,11 +164,8 @@ void main() { controller.value = controller.value.copyWith( isInitialized: true, deviceOrientation: DeviceOrientation.portraitUp, - lockedCaptureOrientation: - const Optional.fromNullable( - DeviceOrientation.landscapeRight), - recordingOrientation: const Optional.fromNullable( - DeviceOrientation.landscapeLeft), + lockedCaptureOrientation: DeviceOrientation.landscapeRight, + recordingOrientation: DeviceOrientation.landscapeLeft, previewSize: const Size(480, 640), ); @@ -201,8 +195,7 @@ void main() { controller.value = controller.value.copyWith( isInitialized: true, deviceOrientation: DeviceOrientation.portraitUp, - recordingOrientation: const Optional.fromNullable( - DeviceOrientation.landscapeLeft), + recordingOrientation: DeviceOrientation.landscapeLeft, previewSize: const Size(480, 640), ); diff --git a/packages/camera/camera/test/camera_test.dart b/packages/camera/camera/test/camera_test.dart index 3c12648f13b9..00d192ab89ed 100644 --- a/packages/camera/camera/test/camera_test.dart +++ b/packages/camera/camera/test/camera_test.dart @@ -1191,8 +1191,7 @@ void main() { cameraController.value = cameraController.value.copyWith( isPreviewPaused: false, deviceOrientation: DeviceOrientation.portraitUp, - lockedCaptureOrientation: - Optional.of(DeviceOrientation.landscapeRight)); + lockedCaptureOrientation: DeviceOrientation.landscapeRight); await cameraController.pausePreview(); diff --git a/packages/camera/camera_android/example/lib/camera_controller.dart b/packages/camera/camera_android/example/lib/camera_controller.dart index 94d8ef6540b1..970fc394dce3 100644 --- a/packages/camera/camera_android/example/lib/camera_controller.dart +++ b/packages/camera/camera_android/example/lib/camera_controller.dart @@ -108,11 +108,12 @@ class CameraValue { FocusMode? focusMode, bool? exposurePointSupported, bool? focusPointSupported, + bool? isPreviewPaused, DeviceOrientation? deviceOrientation, - Optional? lockedCaptureOrientation, - Optional? recordingOrientation, + DeviceOrientation? lockedCaptureOrientation, + DeviceOrientation? recordingOrientation, + DeviceOrientation? previewPauseOrientation, bool? isPreviewPaused, - Optional? previewPauseOrientation, }) { return CameraValue( isInitialized: isInitialized ?? this.isInitialized, @@ -262,16 +263,15 @@ class CameraController extends ValueNotifier { await CameraPlatform.instance.pausePreview(_cameraId); value = value.copyWith( isPreviewPaused: true, - previewPauseOrientation: Optional.of( - value.lockedCaptureOrientation ?? value.deviceOrientation)); + previewPauseOrientation: + value.lockedCaptureOrientation ?? value.deviceOrientation); } /// Resumes the current camera preview Future resumePreview() async { await CameraPlatform.instance.resumePreview(_cameraId); - value = value.copyWith( - isPreviewPaused: false, - previewPauseOrientation: const Optional.absent()); + value = + value.copyWith(isPreviewPaused: false, previewPauseOrientation: null); } /// Captures an image and returns the file where it was saved. @@ -314,8 +314,8 @@ class CameraController extends ValueNotifier { isRecordingVideo: true, isRecordingPaused: false, isStreamingImages: streamCallback != null, - recordingOrientation: Optional.of( - value.lockedCaptureOrientation ?? value.deviceOrientation)); + recordingOrientation: + value.lockedCaptureOrientation ?? value.deviceOrientation); } /// Stops the video recording and returns the file where it was saved. @@ -331,7 +331,7 @@ class CameraController extends ValueNotifier { value = value.copyWith( isRecordingVideo: false, isRecordingPaused: false, - recordingOrientation: const Optional.absent(), + recordingOrientation: null, ); return file; } @@ -400,16 +400,13 @@ class CameraController extends ValueNotifier { Future lockCaptureOrientation() async { await CameraPlatform.instance .lockCaptureOrientation(_cameraId, value.deviceOrientation); - value = value.copyWith( - lockedCaptureOrientation: - Optional.of(value.deviceOrientation)); + value = value.copyWith(lockedCaptureOrientation: value.deviceOrientation); } /// Unlocks the capture orientation. Future unlockCaptureOrientation() async { await CameraPlatform.instance.unlockCaptureOrientation(_cameraId); - value = value.copyWith( - lockedCaptureOrientation: const Optional.absent()); + value = value.copyWith(lockedCaptureOrientation: null); } /// Sets the focus mode for taking pictures. diff --git a/packages/camera/camera_avfoundation/example/lib/camera_controller.dart b/packages/camera/camera_avfoundation/example/lib/camera_controller.dart index 2fcd868934fb..84d315ad009e 100644 --- a/packages/camera/camera_avfoundation/example/lib/camera_controller.dart +++ b/packages/camera/camera_avfoundation/example/lib/camera_controller.dart @@ -109,10 +109,10 @@ class CameraValue { bool? exposurePointSupported, bool? focusPointSupported, DeviceOrientation? deviceOrientation, - Optional? lockedCaptureOrientation, - Optional? recordingOrientation, + DeviceOrientation? lockedCaptureOrientation, + DeviceOrientation? recordingOrientation, + DeviceOrientation? previewPauseOrientation, bool? isPreviewPaused, - Optional? previewPauseOrientation, }) { return CameraValue( isInitialized: isInitialized ?? this.isInitialized, @@ -262,16 +262,15 @@ class CameraController extends ValueNotifier { await CameraPlatform.instance.pausePreview(_cameraId); value = value.copyWith( isPreviewPaused: true, - previewPauseOrientation: Optional.of( - value.lockedCaptureOrientation ?? value.deviceOrientation)); + previewPauseOrientation: + value.lockedCaptureOrientation ?? value.deviceOrientation); } /// Resumes the current camera preview Future resumePreview() async { await CameraPlatform.instance.resumePreview(_cameraId); - value = value.copyWith( - isPreviewPaused: false, - previewPauseOrientation: const Optional.absent()); + value = + value.copyWith(isPreviewPaused: false, previewPauseOrientation: null); } /// Captures an image and returns the file where it was saved. @@ -314,8 +313,8 @@ class CameraController extends ValueNotifier { isRecordingVideo: true, isRecordingPaused: false, isStreamingImages: streamCallback != null, - recordingOrientation: Optional.of( - value.lockedCaptureOrientation ?? value.deviceOrientation)); + recordingOrientation: + value.lockedCaptureOrientation ?? value.deviceOrientation); } /// Stops the video recording and returns the file where it was saved. @@ -330,7 +329,7 @@ class CameraController extends ValueNotifier { await CameraPlatform.instance.stopVideoRecording(_cameraId); value = value.copyWith( isRecordingVideo: false, - recordingOrientation: const Optional.absent(), + recordingOrientation: null, ); return file; } @@ -399,16 +398,13 @@ class CameraController extends ValueNotifier { Future lockCaptureOrientation() async { await CameraPlatform.instance .lockCaptureOrientation(_cameraId, value.deviceOrientation); - value = value.copyWith( - lockedCaptureOrientation: - Optional.of(value.deviceOrientation)); + value = value.copyWith(lockedCaptureOrientation: value.deviceOrientation); } /// Unlocks the capture orientation. Future unlockCaptureOrientation() async { await CameraPlatform.instance.unlockCaptureOrientation(_cameraId); - value = value.copyWith( - lockedCaptureOrientation: const Optional.absent()); + value = value.copyWith(lockedCaptureOrientation: null); } /// Sets the focus mode for taking pictures. From fcf095c2dd6b1da1038ebfb34aadff87ca213b76 Mon Sep 17 00:00:00 2001 From: camsim99 Date: Tue, 20 Dec 2022 10:43:54 -0800 Subject: [PATCH 2/6] Undo accidental order change --- packages/camera/camera/lib/src/camera_controller.dart | 2 +- .../camera/camera_android/example/lib/camera_controller.dart | 2 +- .../camera_avfoundation/example/lib/camera_controller.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/camera/camera/lib/src/camera_controller.dart b/packages/camera/camera/lib/src/camera_controller.dart index 88db8eb3a60c..dab0c2cd940e 100644 --- a/packages/camera/camera/lib/src/camera_controller.dart +++ b/packages/camera/camera/lib/src/camera_controller.dart @@ -163,8 +163,8 @@ class CameraValue { DeviceOrientation? deviceOrientation, DeviceOrientation? lockedCaptureOrientation, DeviceOrientation? recordingOrientation, - DeviceOrientation? previewPauseOrientation, bool? isPreviewPaused, + DeviceOrientation? previewPauseOrientation, }) { return CameraValue( isInitialized: isInitialized ?? this.isInitialized, diff --git a/packages/camera/camera_android/example/lib/camera_controller.dart b/packages/camera/camera_android/example/lib/camera_controller.dart index 970fc394dce3..0350249abff7 100644 --- a/packages/camera/camera_android/example/lib/camera_controller.dart +++ b/packages/camera/camera_android/example/lib/camera_controller.dart @@ -112,8 +112,8 @@ class CameraValue { DeviceOrientation? deviceOrientation, DeviceOrientation? lockedCaptureOrientation, DeviceOrientation? recordingOrientation, - DeviceOrientation? previewPauseOrientation, bool? isPreviewPaused, + DeviceOrientation? previewPauseOrientation, }) { return CameraValue( isInitialized: isInitialized ?? this.isInitialized, diff --git a/packages/camera/camera_avfoundation/example/lib/camera_controller.dart b/packages/camera/camera_avfoundation/example/lib/camera_controller.dart index 84d315ad009e..78f2321df8c9 100644 --- a/packages/camera/camera_avfoundation/example/lib/camera_controller.dart +++ b/packages/camera/camera_avfoundation/example/lib/camera_controller.dart @@ -111,8 +111,8 @@ class CameraValue { DeviceOrientation? deviceOrientation, DeviceOrientation? lockedCaptureOrientation, DeviceOrientation? recordingOrientation, - DeviceOrientation? previewPauseOrientation, bool? isPreviewPaused, + DeviceOrientation? previewPauseOrientation, }) { return CameraValue( isInitialized: isInitialized ?? this.isInitialized, From 4db1858a29136f3fb07a223d94d7e68b6b8d4b7d Mon Sep 17 00:00:00 2001 From: camsim99 Date: Tue, 20 Dec 2022 11:05:12 -0800 Subject: [PATCH 3/6] Fix examples analyze --- .../camera/lib/src/camera_controller.dart | 23 +++++++----------- .../example/lib/camera_controller.dart | 21 +++++----------- .../example/lib/camera_controller.dart | 24 ++++++------------- 3 files changed, 21 insertions(+), 47 deletions(-) diff --git a/packages/camera/camera/lib/src/camera_controller.dart b/packages/camera/camera/lib/src/camera_controller.dart index dab0c2cd940e..b05e61bef9f8 100644 --- a/packages/camera/camera/lib/src/camera_controller.dart +++ b/packages/camera/camera/lib/src/camera_controller.dart @@ -9,7 +9,6 @@ import 'package:camera_platform_interface/camera_platform_interface.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:quiver/core.dart'; import '../camera.dart'; @@ -181,16 +180,12 @@ class CameraValue { exposurePointSupported ?? this.exposurePointSupported, focusPointSupported: focusPointSupported ?? this.focusPointSupported, deviceOrientation: deviceOrientation ?? this.deviceOrientation, - lockedCaptureOrientation: lockedCaptureOrientation == null - ? this.lockedCaptureOrientation - : lockedCaptureOrientation.orNull, - recordingOrientation: recordingOrientation == null - ? this.recordingOrientation - : recordingOrientation.orNull, + lockedCaptureOrientation: + lockedCaptureOrientation ?? this.lockedCaptureOrientation, + recordingOrientation: recordingOrientation ?? this.recordingOrientation, isPreviewPaused: isPreviewPaused ?? this.isPreviewPaused, - previewPauseOrientation: previewPauseOrientation == null - ? this.previewPauseOrientation - : previewPauseOrientation.orNull, + previewPauseOrientation: + previewPauseOrientation ?? this.previewPauseOrientation, ); } @@ -372,8 +367,7 @@ class CameraController extends ValueNotifier { } try { await CameraPlatform.instance.resumePreview(_cameraId); - value = - value.copyWith(isPreviewPaused: false, previewPauseOrientation: null); + value = value.copyWith(isPreviewPaused: false); } on PlatformException catch (e) { throw CameraException(e.code, e.message); } @@ -525,8 +519,7 @@ class CameraController extends ValueNotifier { try { final XFile file = await CameraPlatform.instance.stopVideoRecording(_cameraId); - value = - value.copyWith(isRecordingVideo: false, recordingOrientation: null); + value = value.copyWith(isRecordingVideo: false); return file; } on PlatformException catch (e) { throw CameraException(e.code, e.message); @@ -764,7 +757,7 @@ class CameraController extends ValueNotifier { Future unlockCaptureOrientation() async { try { await CameraPlatform.instance.unlockCaptureOrientation(_cameraId); - value = value.copyWith(lockedCaptureOrientation: null); + value = value.copyWith(); } on PlatformException catch (e) { throw CameraException(e.code, e.message); } diff --git a/packages/camera/camera_android/example/lib/camera_controller.dart b/packages/camera/camera_android/example/lib/camera_controller.dart index 0350249abff7..79bf4e8b01e1 100644 --- a/packages/camera/camera_android/example/lib/camera_controller.dart +++ b/packages/camera/camera_android/example/lib/camera_controller.dart @@ -8,7 +8,6 @@ import 'package:camera_platform_interface/camera_platform_interface.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:quiver/core.dart'; /// The state of a [CameraController]. class CameraValue { @@ -108,7 +107,6 @@ class CameraValue { FocusMode? focusMode, bool? exposurePointSupported, bool? focusPointSupported, - bool? isPreviewPaused, DeviceOrientation? deviceOrientation, DeviceOrientation? lockedCaptureOrientation, DeviceOrientation? recordingOrientation, @@ -126,16 +124,12 @@ class CameraValue { exposureMode: exposureMode ?? this.exposureMode, focusMode: focusMode ?? this.focusMode, deviceOrientation: deviceOrientation ?? this.deviceOrientation, - lockedCaptureOrientation: lockedCaptureOrientation == null - ? this.lockedCaptureOrientation - : lockedCaptureOrientation.orNull, - recordingOrientation: recordingOrientation == null - ? this.recordingOrientation - : recordingOrientation.orNull, + lockedCaptureOrientation: + lockedCaptureOrientation ?? this.lockedCaptureOrientation, + recordingOrientation: recordingOrientation ?? this.recordingOrientation, isPreviewPaused: isPreviewPaused ?? this.isPreviewPaused, - previewPauseOrientation: previewPauseOrientation == null - ? this.previewPauseOrientation - : previewPauseOrientation.orNull, + previewPauseOrientation: + previewPauseOrientation ?? this.previewPauseOrientation, ); } @@ -270,8 +264,7 @@ class CameraController extends ValueNotifier { /// Resumes the current camera preview Future resumePreview() async { await CameraPlatform.instance.resumePreview(_cameraId); - value = - value.copyWith(isPreviewPaused: false, previewPauseOrientation: null); + value = value.copyWith(isPreviewPaused: false); } /// Captures an image and returns the file where it was saved. @@ -331,7 +324,6 @@ class CameraController extends ValueNotifier { value = value.copyWith( isRecordingVideo: false, isRecordingPaused: false, - recordingOrientation: null, ); return file; } @@ -406,7 +398,6 @@ class CameraController extends ValueNotifier { /// Unlocks the capture orientation. Future unlockCaptureOrientation() async { await CameraPlatform.instance.unlockCaptureOrientation(_cameraId); - value = value.copyWith(lockedCaptureOrientation: null); } /// Sets the focus mode for taking pictures. diff --git a/packages/camera/camera_avfoundation/example/lib/camera_controller.dart b/packages/camera/camera_avfoundation/example/lib/camera_controller.dart index 78f2321df8c9..47c1f6f0415b 100644 --- a/packages/camera/camera_avfoundation/example/lib/camera_controller.dart +++ b/packages/camera/camera_avfoundation/example/lib/camera_controller.dart @@ -8,7 +8,6 @@ import 'package:camera_platform_interface/camera_platform_interface.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:quiver/core.dart'; /// The state of a [CameraController]. class CameraValue { @@ -125,16 +124,12 @@ class CameraValue { exposureMode: exposureMode ?? this.exposureMode, focusMode: focusMode ?? this.focusMode, deviceOrientation: deviceOrientation ?? this.deviceOrientation, - lockedCaptureOrientation: lockedCaptureOrientation == null - ? this.lockedCaptureOrientation - : lockedCaptureOrientation.orNull, - recordingOrientation: recordingOrientation == null - ? this.recordingOrientation - : recordingOrientation.orNull, + lockedCaptureOrientation: + lockedCaptureOrientation ?? this.lockedCaptureOrientation, + recordingOrientation: recordingOrientation ?? this.recordingOrientation, isPreviewPaused: isPreviewPaused ?? this.isPreviewPaused, - previewPauseOrientation: previewPauseOrientation == null - ? this.previewPauseOrientation - : previewPauseOrientation.orNull, + previewPauseOrientation: + previewPauseOrientation ?? this.previewPauseOrientation, ); } @@ -269,8 +264,7 @@ class CameraController extends ValueNotifier { /// Resumes the current camera preview Future resumePreview() async { await CameraPlatform.instance.resumePreview(_cameraId); - value = - value.copyWith(isPreviewPaused: false, previewPauseOrientation: null); + value = value.copyWith(isPreviewPaused: false); } /// Captures an image and returns the file where it was saved. @@ -327,10 +321,7 @@ class CameraController extends ValueNotifier { final XFile file = await CameraPlatform.instance.stopVideoRecording(_cameraId); - value = value.copyWith( - isRecordingVideo: false, - recordingOrientation: null, - ); + value = value.copyWith(isRecordingVideo: false); return file; } @@ -404,7 +395,6 @@ class CameraController extends ValueNotifier { /// Unlocks the capture orientation. Future unlockCaptureOrientation() async { await CameraPlatform.instance.unlockCaptureOrientation(_cameraId); - value = value.copyWith(lockedCaptureOrientation: null); } /// Sets the focus mode for taking pictures. From af8f35636e526503d0a7bd53eeca032c016a2d46 Mon Sep 17 00:00:00 2001 From: camsim99 Date: Tue, 20 Dec 2022 11:10:12 -0800 Subject: [PATCH 4/6] Remove unused import --- packages/camera/camera/test/camera_preview_test.dart | 1 - packages/camera/camera/test/camera_test.dart | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/camera/camera/test/camera_preview_test.dart b/packages/camera/camera/test/camera_preview_test.dart index 1fbb5e606e39..546f4e925759 100644 --- a/packages/camera/camera/test/camera_preview_test.dart +++ b/packages/camera/camera/test/camera_preview_test.dart @@ -8,7 +8,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:quiver/core.dart'; class FakeController extends ValueNotifier implements CameraController { diff --git a/packages/camera/camera/test/camera_test.dart b/packages/camera/camera/test/camera_test.dart index 00d192ab89ed..2138f2d055a5 100644 --- a/packages/camera/camera/test/camera_test.dart +++ b/packages/camera/camera/test/camera_test.dart @@ -13,7 +13,6 @@ import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; import 'package:plugin_platform_interface/plugin_platform_interface.dart'; -import 'package:quiver/core.dart'; List get mockAvailableCameras => [ const CameraDescription( From ff8270a7719a93da256e07a0b30792cdee641b84 Mon Sep 17 00:00:00 2001 From: camsim99 Date: Tue, 20 Dec 2022 11:13:27 -0800 Subject: [PATCH 5/6] Bump versions --- packages/camera/camera/CHANGELOG.md | 4 ++++ packages/camera/camera/pubspec.yaml | 2 +- packages/camera/camera_android/CHANGELOG.md | 4 ++++ packages/camera/camera_android/pubspec.yaml | 2 +- packages/camera/camera_avfoundation/CHANGELOG.md | 4 ++++ packages/camera/camera_avfoundation/pubspec.yaml | 2 +- 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/camera/camera/CHANGELOG.md b/packages/camera/camera/CHANGELOG.md index f5d87a60eed7..7924c68a4164 100644 --- a/packages/camera/camera/CHANGELOG.md +++ b/packages/camera/camera/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.10.0+6 + +* Remove usage of deprecated quiver Optional type. + ## 0.10.0+5 * Updates code for stricter lint checks. diff --git a/packages/camera/camera/pubspec.yaml b/packages/camera/camera/pubspec.yaml index a867a5ae8896..7c5ee9d690cf 100644 --- a/packages/camera/camera/pubspec.yaml +++ b/packages/camera/camera/pubspec.yaml @@ -4,7 +4,7 @@ description: A Flutter plugin for controlling the camera. Supports previewing Dart. repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22 -version: 0.10.0+5 +version: 0.10.0+6 environment: sdk: ">=2.14.0 <3.0.0" diff --git a/packages/camera/camera_android/CHANGELOG.md b/packages/camera/camera_android/CHANGELOG.md index 80f03df235a2..173a47fe4944 100644 --- a/packages/camera/camera_android/CHANGELOG.md +++ b/packages/camera/camera_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.10.1+1 + +* Remove usage of deprecated quiver Optional type. + ## 0.10.1 * Implements an option to also stream when recording a video. diff --git a/packages/camera/camera_android/pubspec.yaml b/packages/camera/camera_android/pubspec.yaml index 7ed5077c315e..307a6e45c004 100644 --- a/packages/camera/camera_android/pubspec.yaml +++ b/packages/camera/camera_android/pubspec.yaml @@ -2,7 +2,7 @@ name: camera_android description: Android implementation of the camera plugin. repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22 -version: 0.10.1 +version: 0.10.1+1 environment: sdk: ">=2.14.0 <3.0.0" diff --git a/packages/camera/camera_avfoundation/CHANGELOG.md b/packages/camera/camera_avfoundation/CHANGELOG.md index 641272af2246..0949877a1943 100644 --- a/packages/camera/camera_avfoundation/CHANGELOG.md +++ b/packages/camera/camera_avfoundation/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.9+1 + +* Remove usage of deprecated quiver Optional type. + ## 0.9.9 * Implements option to also stream when recording a video. diff --git a/packages/camera/camera_avfoundation/pubspec.yaml b/packages/camera/camera_avfoundation/pubspec.yaml index e60f5e406aad..cf2576489200 100644 --- a/packages/camera/camera_avfoundation/pubspec.yaml +++ b/packages/camera/camera_avfoundation/pubspec.yaml @@ -2,7 +2,7 @@ name: camera_avfoundation description: iOS implementation of the camera plugin. repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera_avfoundation issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22 -version: 0.9.9 +version: 0.9.9+1 environment: sdk: ">=2.14.0 <3.0.0" From 9921e5978d9bfa7544a3a7b7aa00a35500b1f843 Mon Sep 17 00:00:00 2001 From: camsim99 Date: Tue, 20 Dec 2022 14:51:01 -0800 Subject: [PATCH 6/6] Correct version --- packages/camera/camera/CHANGELOG.md | 2 +- packages/camera/camera/pubspec.yaml | 2 +- packages/camera/camera_android/CHANGELOG.md | 2 +- packages/camera/camera_android/pubspec.yaml | 2 +- packages/camera/camera_avfoundation/CHANGELOG.md | 2 +- packages/camera/camera_avfoundation/pubspec.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/camera/camera/CHANGELOG.md b/packages/camera/camera/CHANGELOG.md index 7924c68a4164..84c7559d391b 100644 --- a/packages/camera/camera/CHANGELOG.md +++ b/packages/camera/camera/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.10.0+6 +## 0.10.1 * Remove usage of deprecated quiver Optional type. diff --git a/packages/camera/camera/pubspec.yaml b/packages/camera/camera/pubspec.yaml index 7c5ee9d690cf..33d704ef651f 100644 --- a/packages/camera/camera/pubspec.yaml +++ b/packages/camera/camera/pubspec.yaml @@ -4,7 +4,7 @@ description: A Flutter plugin for controlling the camera. Supports previewing Dart. repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22 -version: 0.10.0+6 +version: 0.10.1 environment: sdk: ">=2.14.0 <3.0.0" diff --git a/packages/camera/camera_android/CHANGELOG.md b/packages/camera/camera_android/CHANGELOG.md index 173a47fe4944..1b07c3005a4c 100644 --- a/packages/camera/camera_android/CHANGELOG.md +++ b/packages/camera/camera_android/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.10.1+1 +## 0.10.2 * Remove usage of deprecated quiver Optional type. diff --git a/packages/camera/camera_android/pubspec.yaml b/packages/camera/camera_android/pubspec.yaml index 307a6e45c004..6f25af7d61fb 100644 --- a/packages/camera/camera_android/pubspec.yaml +++ b/packages/camera/camera_android/pubspec.yaml @@ -2,7 +2,7 @@ name: camera_android description: Android implementation of the camera plugin. repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22 -version: 0.10.1+1 +version: 0.10.2 environment: sdk: ">=2.14.0 <3.0.0" diff --git a/packages/camera/camera_avfoundation/CHANGELOG.md b/packages/camera/camera_avfoundation/CHANGELOG.md index 0949877a1943..9217f2633322 100644 --- a/packages/camera/camera_avfoundation/CHANGELOG.md +++ b/packages/camera/camera_avfoundation/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.9.9+1 +## 0.9.10 * Remove usage of deprecated quiver Optional type. diff --git a/packages/camera/camera_avfoundation/pubspec.yaml b/packages/camera/camera_avfoundation/pubspec.yaml index cf2576489200..aa1c1106a774 100644 --- a/packages/camera/camera_avfoundation/pubspec.yaml +++ b/packages/camera/camera_avfoundation/pubspec.yaml @@ -2,7 +2,7 @@ name: camera_avfoundation description: iOS implementation of the camera plugin. repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera_avfoundation issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22 -version: 0.9.9+1 +version: 0.9.10 environment: sdk: ">=2.14.0 <3.0.0"