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

Commit cda37d5

Browse files
authored
Uncomments avoid_redundant_argument_values in analysis_options.yaml (#6163)
1 parent ece8788 commit cda37d5

File tree

156 files changed

+300
-512
lines changed

Some content is hidden

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

156 files changed

+300
-512
lines changed

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ linter:
8383
# - avoid_positional_boolean_parameters # would have been nice to enable this but by now there's too many places that break it
8484
# - avoid_print # LOCAL CHANGE - Needs to be enabled and violations fixed.
8585
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
86-
# - avoid_redundant_argument_values # LOCAL CHANGE - Needs to be enabled and violations fixed.
86+
- avoid_redundant_argument_values
8787
- avoid_relative_lib_imports
8888
- avoid_renaming_method_parameters
8989
- avoid_return_types_on_setters

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.0+1
2+
3+
* Fixes avoid_redundant_argument_values lint warnings and minor typos.
4+
15
## 0.10.0
26

37
* **Breaking Change** Bumps default camera_web package version, which updates permission exception code from `cameraPermission` to `CameraAccessDenied`.

packages/camera/camera/example/lib/main.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
159159
Padding(
160160
padding: const EdgeInsets.all(5.0),
161161
child: Row(
162-
mainAxisAlignment: MainAxisAlignment.start,
163162
children: <Widget>[
164163
_cameraTogglesRowWidget(),
165164
_thumbnailWidget(),
@@ -271,7 +270,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
271270
children: <Widget>[
272271
Row(
273272
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
274-
mainAxisSize: MainAxisSize.max,
275273
children: <Widget>[
276274
IconButton(
277275
icon: const Icon(Icons.flash_on),
@@ -325,7 +323,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
325323
child: ClipRect(
326324
child: Row(
327325
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
328-
mainAxisSize: MainAxisSize.max,
329326
children: <Widget>[
330327
IconButton(
331328
icon: const Icon(Icons.flash_off),
@@ -397,7 +394,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
397394
),
398395
Row(
399396
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
400-
mainAxisSize: MainAxisSize.max,
401397
children: <Widget>[
402398
TextButton(
403399
style: styleAuto,
@@ -435,7 +431,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
435431
),
436432
Row(
437433
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
438-
mainAxisSize: MainAxisSize.max,
439434
children: <Widget>[
440435
Text(_minAvailableExposureOffset.toString()),
441436
Slider(
@@ -486,7 +481,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
486481
),
487482
Row(
488483
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
489-
mainAxisSize: MainAxisSize.max,
490484
children: <Widget>[
491485
TextButton(
492486
style: styleAuto,
@@ -523,7 +517,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
523517

524518
return Row(
525519
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
526-
mainAxisSize: MainAxisSize.max,
527520
children: <Widget>[
528521
IconButton(
529522
icon: const Icon(Icons.camera_alt),

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
7+
version: 0.10.0+1
88

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

packages/camera/camera/test/camera_preview_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ void main() {
201201
controller.value = controller.value.copyWith(
202202
isInitialized: true,
203203
deviceOrientation: DeviceOrientation.portraitUp,
204-
lockedCaptureOrientation: null,
205204
recordingOrientation: const Optional<DeviceOrientation>.fromNullable(
206205
DeviceOrientation.landscapeLeft),
207206
previewSize: const Size(480, 640),

packages/camera/camera/test/camera_test.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,6 @@ void main() {
697697
PlatformException(
698698
code: 'TEST_ERROR',
699699
message: 'This is a test error message',
700-
details: null,
701700
),
702701
);
703702

@@ -742,7 +741,6 @@ void main() {
742741
PlatformException(
743742
code: 'TEST_ERROR',
744743
message: 'This is a test error message',
745-
details: null,
746744
),
747745
);
748746

@@ -787,7 +785,6 @@ void main() {
787785
PlatformException(
788786
code: 'TEST_ERROR',
789787
message: 'This is a test error message',
790-
details: null,
791788
),
792789
);
793790

@@ -1219,7 +1216,6 @@ void main() {
12191216
PlatformException(
12201217
code: 'TEST_ERROR',
12211218
message: 'This is a test error message',
1222-
details: null,
12231219
),
12241220
);
12251221

@@ -1285,7 +1281,6 @@ void main() {
12851281
PlatformException(
12861282
code: 'TEST_ERROR',
12871283
message: 'This is a test error message',
1288-
details: null,
12891284
),
12901285
);
12911286

@@ -1339,7 +1334,6 @@ void main() {
13391334
PlatformException(
13401335
code: 'TEST_ERROR',
13411336
message: 'This is a test error message',
1342-
details: null,
13431337
),
13441338
);
13451339

@@ -1385,7 +1379,6 @@ void main() {
13851379
PlatformException(
13861380
code: 'TEST_ERROR',
13871381
message: 'This is a test error message',
1388-
details: null,
13891382
),
13901383
);
13911384

packages/camera/camera/test/camera_value_test.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ void main() {
1818
test('Can be created', () {
1919
const CameraValue cameraValue = CameraValue(
2020
isInitialized: false,
21-
errorDescription: null,
2221
previewSize: Size(10, 10),
2322
isRecordingPaused: false,
2423
isRecordingVideo: false,
@@ -32,7 +31,6 @@ void main() {
3231
lockedCaptureOrientation: DeviceOrientation.portraitUp,
3332
recordingOrientation: DeviceOrientation.portraitUp,
3433
focusPointSupported: true,
35-
isPreviewPaused: false,
3634
previewPauseOrientation: DeviceOrientation.portraitUp,
3735
);
3836

@@ -129,7 +127,6 @@ void main() {
129127
test('toString() works as expected', () {
130128
const CameraValue cameraValue = CameraValue(
131129
isInitialized: false,
132-
errorDescription: null,
133130
previewSize: Size(10, 10),
134131
isRecordingPaused: false,
135132
isRecordingVideo: false,

packages/camera/camera_android/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.10.0+1
2+
3+
* Fixes avoid_redundant_argument_values lint warnings and minor typos.
4+
15
## 0.10.0
26

37
* **Breaking Change** Updates Android camera access permission error codes to be consistent with other platforms. If your app still handles the legacy `cameraPermission` exception, please update it to handle the new permission exception codes that are noted in the README.

packages/camera/camera_android/example/lib/main.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
161161
Padding(
162162
padding: const EdgeInsets.all(5.0),
163163
child: Row(
164-
mainAxisAlignment: MainAxisAlignment.start,
165164
children: <Widget>[
166165
_cameraTogglesRowWidget(),
167166
_thumbnailWidget(),
@@ -274,7 +273,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
274273
children: <Widget>[
275274
Row(
276275
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
277-
mainAxisSize: MainAxisSize.max,
278276
children: <Widget>[
279277
IconButton(
280278
icon: const Icon(Icons.flash_on),
@@ -328,7 +326,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
328326
child: ClipRect(
329327
child: Row(
330328
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
331-
mainAxisSize: MainAxisSize.max,
332329
children: <Widget>[
333330
IconButton(
334331
icon: const Icon(Icons.flash_off),
@@ -400,7 +397,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
400397
),
401398
Row(
402399
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
403-
mainAxisSize: MainAxisSize.max,
404400
children: <Widget>[
405401
TextButton(
406402
style: styleAuto,
@@ -439,7 +435,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
439435
),
440436
Row(
441437
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
442-
mainAxisSize: MainAxisSize.max,
443438
children: <Widget>[
444439
Text(_minAvailableExposureOffset.toString()),
445440
Slider(
@@ -490,7 +485,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
490485
),
491486
Row(
492487
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
493-
mainAxisSize: MainAxisSize.max,
494488
children: <Widget>[
495489
TextButton(
496490
style: styleAuto,
@@ -528,7 +522,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
528522

529523
return Row(
530524
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
531-
mainAxisSize: MainAxisSize.max,
532525
children: <Widget>[
533526
IconButton(
534527
icon: const Icon(Icons.camera_alt),

packages/camera/camera_android/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: camera_android
22
description: Android implementation of the camera plugin.
33
repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera_android
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
5-
version: 0.10.0
5+
version: 0.10.0+1
66

77
environment:
88
sdk: ">=2.14.0 <3.0.0"

0 commit comments

Comments
 (0)