Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 4d6392b

Browse files
committed
Merge remote-tracking branch 'origin/master' into feature/google-maps-heatmap
2 parents 3928a72 + b89e4fc commit 4d6392b

File tree

333 files changed

+6694
-4316
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

333 files changed

+6694
-4316
lines changed

.ci/flutter_master.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
028c6e29e0ca049ab4b9bc9d966550d2c251050b
1+
0d91c0343bdcb950c9ffadda8051fe44446ec291

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
cd $GITHUB_WORKSPACE
2828
# Checks out a copy of the repo.
2929
- name: Check out code
30-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
30+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
3131
with:
3232
fetch-depth: 0 # Fetch all history so the tool can get all the tags to determine version.
3333
- name: Set up tools

.github/workflows/scorecards-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222

2323
steps:
2424
- name: "Checkout code"
25-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
25+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
2626
with:
2727
persist-credentials: false
2828

2929
- name: "Run analysis"
30-
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d
30+
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86
3131
with:
3232
results_file: results.sarif
3333
results_format: sarif
@@ -50,6 +50,6 @@ jobs:
5050

5151
# Upload the results to GitHub's code scanning dashboard.
5252
- name: "Upload to code-scanning"
53-
uses: github/codeql-action/upload-sarif@b2a92eb56d8cb930006a1c6ed86b0782dd8a4297
53+
uses: github/codeql-action/upload-sarif@959cbb7472c4d4ad70cdfe6f4976053fe48ab394
5454
with:
5555
sarif_file: results.sarif

CODEOWNERS

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ packages/camera/camera_avfoundation/** @hellohuanlin
4545
packages/file_selector/file_selector_ios/** @jmagman
4646
packages/google_maps_flutter/google_maps_flutter_ios/** @cyanglaz
4747
packages/google_sign_in/google_sign_in_ios/** @jmagman
48-
packages/image_picker/image_picker_ios/** @cyanglaz
48+
packages/image_picker/image_picker_ios/** @vashworth
4949
packages/in_app_purchase/in_app_purchase_storekit/** @cyanglaz
5050
packages/ios_platform_images/ios/** @jmagman
5151
packages/local_auth/local_auth_ios/** @hellohuanlin
5252
packages/path_provider/path_provider_ios/** @jmagman
5353
packages/quick_actions/quick_actions_ios/** @hellohuanlin
54-
packages/shared_preferences/shared_preferences_ios/** @cyanglaz
54+
packages/shared_preferences/shared_preferences_foundation/** @cyanglaz
5555
packages/url_launcher/url_launcher_ios/** @jmagman
5656
packages/video_player/video_player_avfoundation/** @hellohuanlin
5757
packages/webview_flutter/webview_flutter_wkwebview/** @cyanglaz
@@ -65,7 +65,6 @@ packages/url_launcher/url_launcher_linux/** @cbracken
6565
# - macOS
6666
packages/file_selector/file_selector_macos/** @cbracken
6767
packages/path_provider/path_provider_macos/** @cbracken
68-
packages/shared_preferences/shared_preferences_macos/** @cbracken
6968
packages/url_launcher/url_launcher_macos/** @cbracken
7069

7170
# - Windows

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ linter:
6868
# - avoid_catching_errors # blocked on https://github.com/dart-lang/linter/issues/3023
6969
- avoid_classes_with_only_static_members
7070
- avoid_double_and_int_checks
71-
# - avoid_dynamic_calls # LOCAL CHANGE - Needs to be enabled and violations fixed.
71+
- avoid_dynamic_calls
7272
- avoid_empty_else
7373
- avoid_equals_and_hash_code_on_mutable_classes
7474
- avoid_escaping_inner_quotes

packages/camera/camera/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.10.1
2+
3+
* Remove usage of deprecated quiver Optional type.
4+
15
## 0.10.0+5
26

37
* Updates code for stricter lint checks.

packages/camera/camera/lib/src/camera_controller.dart

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import 'package:camera_platform_interface/camera_platform_interface.dart';
99
import 'package:flutter/foundation.dart';
1010
import 'package:flutter/material.dart';
1111
import 'package:flutter/services.dart';
12-
import 'package:quiver/core.dart';
1312

1413
import '../camera.dart';
1514

@@ -161,10 +160,10 @@ class CameraValue {
161160
bool? exposurePointSupported,
162161
bool? focusPointSupported,
163162
DeviceOrientation? deviceOrientation,
164-
Optional<DeviceOrientation>? lockedCaptureOrientation,
165-
Optional<DeviceOrientation>? recordingOrientation,
163+
DeviceOrientation? lockedCaptureOrientation,
164+
DeviceOrientation? recordingOrientation,
166165
bool? isPreviewPaused,
167-
Optional<DeviceOrientation>? previewPauseOrientation,
166+
DeviceOrientation? previewPauseOrientation,
168167
}) {
169168
return CameraValue(
170169
isInitialized: isInitialized ?? this.isInitialized,
@@ -181,16 +180,12 @@ class CameraValue {
181180
exposurePointSupported ?? this.exposurePointSupported,
182181
focusPointSupported: focusPointSupported ?? this.focusPointSupported,
183182
deviceOrientation: deviceOrientation ?? this.deviceOrientation,
184-
lockedCaptureOrientation: lockedCaptureOrientation == null
185-
? this.lockedCaptureOrientation
186-
: lockedCaptureOrientation.orNull,
187-
recordingOrientation: recordingOrientation == null
188-
? this.recordingOrientation
189-
: recordingOrientation.orNull,
183+
lockedCaptureOrientation:
184+
lockedCaptureOrientation ?? this.lockedCaptureOrientation,
185+
recordingOrientation: recordingOrientation ?? this.recordingOrientation,
190186
isPreviewPaused: isPreviewPaused ?? this.isPreviewPaused,
191-
previewPauseOrientation: previewPauseOrientation == null
192-
? this.previewPauseOrientation
193-
: previewPauseOrientation.orNull,
187+
previewPauseOrientation:
188+
previewPauseOrientation ?? this.previewPauseOrientation,
194189
);
195190
}
196191

@@ -358,8 +353,8 @@ class CameraController extends ValueNotifier<CameraValue> {
358353
await CameraPlatform.instance.pausePreview(_cameraId);
359354
value = value.copyWith(
360355
isPreviewPaused: true,
361-
previewPauseOrientation: Optional<DeviceOrientation>.of(
362-
value.lockedCaptureOrientation ?? value.deviceOrientation));
356+
previewPauseOrientation:
357+
value.lockedCaptureOrientation ?? value.deviceOrientation);
363358
} on PlatformException catch (e) {
364359
throw CameraException(e.code, e.message);
365360
}
@@ -372,9 +367,7 @@ class CameraController extends ValueNotifier<CameraValue> {
372367
}
373368
try {
374369
await CameraPlatform.instance.resumePreview(_cameraId);
375-
value = value.copyWith(
376-
isPreviewPaused: false,
377-
previewPauseOrientation: const Optional<DeviceOrientation>.absent());
370+
value = value.copyWith(isPreviewPaused: false);
378371
} on PlatformException catch (e) {
379372
throw CameraException(e.code, e.message);
380373
}
@@ -505,8 +498,8 @@ class CameraController extends ValueNotifier<CameraValue> {
505498
value = value.copyWith(
506499
isRecordingVideo: true,
507500
isRecordingPaused: false,
508-
recordingOrientation: Optional<DeviceOrientation>.of(
509-
value.lockedCaptureOrientation ?? value.deviceOrientation));
501+
recordingOrientation:
502+
value.lockedCaptureOrientation ?? value.deviceOrientation);
510503
} on PlatformException catch (e) {
511504
throw CameraException(e.code, e.message);
512505
}
@@ -526,10 +519,7 @@ class CameraController extends ValueNotifier<CameraValue> {
526519
try {
527520
final XFile file =
528521
await CameraPlatform.instance.stopVideoRecording(_cameraId);
529-
value = value.copyWith(
530-
isRecordingVideo: false,
531-
recordingOrientation: const Optional<DeviceOrientation>.absent(),
532-
);
522+
value = value.copyWith(isRecordingVideo: false);
533523
return file;
534524
} on PlatformException catch (e) {
535525
throw CameraException(e.code, e.message);
@@ -747,8 +737,7 @@ class CameraController extends ValueNotifier<CameraValue> {
747737
await CameraPlatform.instance.lockCaptureOrientation(
748738
_cameraId, orientation ?? value.deviceOrientation);
749739
value = value.copyWith(
750-
lockedCaptureOrientation: Optional<DeviceOrientation>.of(
751-
orientation ?? value.deviceOrientation));
740+
lockedCaptureOrientation: orientation ?? value.deviceOrientation);
752741
} on PlatformException catch (e) {
753742
throw CameraException(e.code, e.message);
754743
}
@@ -768,8 +757,7 @@ class CameraController extends ValueNotifier<CameraValue> {
768757
Future<void> unlockCaptureOrientation() async {
769758
try {
770759
await CameraPlatform.instance.unlockCaptureOrientation(_cameraId);
771-
value = value.copyWith(
772-
lockedCaptureOrientation: const Optional<DeviceOrientation>.absent());
760+
value = value.copyWith();
773761
} on PlatformException catch (e) {
774762
throw CameraException(e.code, e.message);
775763
}

packages/camera/camera/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: A Flutter plugin for controlling the camera. Supports previewing
44
Dart.
55
repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera
66
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
7-
version: 0.10.0+5
7+
version: 0.10.1
88

99
environment:
1010
sdk: ">=2.14.0 <3.0.0"

packages/camera/camera/test/camera_preview_test.dart

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import 'package:flutter/material.dart';
88
import 'package:flutter/services.dart';
99
import 'package:flutter/widgets.dart';
1010
import 'package:flutter_test/flutter_test.dart';
11-
import 'package:quiver/core.dart';
1211

1312
class FakeController extends ValueNotifier<CameraValue>
1413
implements CameraController {
@@ -133,11 +132,8 @@ void main() {
133132
isInitialized: true,
134133
isRecordingVideo: true,
135134
deviceOrientation: DeviceOrientation.portraitUp,
136-
lockedCaptureOrientation:
137-
const Optional<DeviceOrientation>.fromNullable(
138-
DeviceOrientation.landscapeRight),
139-
recordingOrientation: const Optional<DeviceOrientation>.fromNullable(
140-
DeviceOrientation.landscapeLeft),
135+
lockedCaptureOrientation: DeviceOrientation.landscapeRight,
136+
recordingOrientation: DeviceOrientation.landscapeLeft,
141137
previewSize: const Size(480, 640),
142138
);
143139

@@ -167,11 +163,8 @@ void main() {
167163
controller.value = controller.value.copyWith(
168164
isInitialized: true,
169165
deviceOrientation: DeviceOrientation.portraitUp,
170-
lockedCaptureOrientation:
171-
const Optional<DeviceOrientation>.fromNullable(
172-
DeviceOrientation.landscapeRight),
173-
recordingOrientation: const Optional<DeviceOrientation>.fromNullable(
174-
DeviceOrientation.landscapeLeft),
166+
lockedCaptureOrientation: DeviceOrientation.landscapeRight,
167+
recordingOrientation: DeviceOrientation.landscapeLeft,
175168
previewSize: const Size(480, 640),
176169
);
177170

@@ -201,8 +194,7 @@ void main() {
201194
controller.value = controller.value.copyWith(
202195
isInitialized: true,
203196
deviceOrientation: DeviceOrientation.portraitUp,
204-
recordingOrientation: const Optional<DeviceOrientation>.fromNullable(
205-
DeviceOrientation.landscapeLeft),
197+
recordingOrientation: DeviceOrientation.landscapeLeft,
206198
previewSize: const Size(480, 640),
207199
);
208200

packages/camera/camera/test/camera_test.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import 'package:flutter/widgets.dart';
1313
import 'package:flutter_test/flutter_test.dart';
1414
import 'package:mockito/mockito.dart';
1515
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
16-
import 'package:quiver/core.dart';
1716

1817
List<CameraDescription> get mockAvailableCameras => <CameraDescription>[
1918
const CameraDescription(
@@ -1191,8 +1190,7 @@ void main() {
11911190
cameraController.value = cameraController.value.copyWith(
11921191
isPreviewPaused: false,
11931192
deviceOrientation: DeviceOrientation.portraitUp,
1194-
lockedCaptureOrientation:
1195-
Optional<DeviceOrientation>.of(DeviceOrientation.landscapeRight));
1193+
lockedCaptureOrientation: DeviceOrientation.landscapeRight);
11961194

11971195
await cameraController.pausePreview();
11981196

0 commit comments

Comments
 (0)