Skip to content

Commit

Permalink
Uncomments avoid_redundant_argument_values in analysis_options.yaml (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
cofirazak authored and yutaaraki-toydium committed Aug 12, 2022
1 parent e3bf176 commit f162a3c
Show file tree
Hide file tree
Showing 156 changed files with 300 additions and 512 deletions.
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ linter:
# - avoid_positional_boolean_parameters # would have been nice to enable this but by now there's too many places that break it
# - avoid_print # LOCAL CHANGE - Needs to be enabled and violations fixed.
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
# - avoid_redundant_argument_values # LOCAL CHANGE - Needs to be enabled and violations fixed.
- avoid_redundant_argument_values
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
- avoid_return_types_on_setters
Expand Down
4 changes: 4 additions & 0 deletions packages/camera/camera/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.10.0+1

* Fixes avoid_redundant_argument_values lint warnings and minor typos.

## 0.10.0

* **Breaking Change** Bumps default camera_web package version, which updates permission exception code from `cameraPermission` to `CameraAccessDenied`.
Expand Down
7 changes: 0 additions & 7 deletions packages/camera/camera/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
Padding(
padding: const EdgeInsets.all(5.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
_cameraTogglesRowWidget(),
_thumbnailWidget(),
Expand Down Expand Up @@ -271,7 +270,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
IconButton(
icon: const Icon(Icons.flash_on),
Expand Down Expand Up @@ -325,7 +323,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
child: ClipRect(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
IconButton(
icon: const Icon(Icons.flash_off),
Expand Down Expand Up @@ -397,7 +394,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
TextButton(
style: styleAuto,
Expand Down Expand Up @@ -435,7 +431,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Text(_minAvailableExposureOffset.toString()),
Slider(
Expand Down Expand Up @@ -486,7 +481,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
TextButton(
style: styleAuto,
Expand Down Expand Up @@ -523,7 +517,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>

return Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
IconButton(
icon: const Icon(Icons.camera_alt),
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
version: 0.10.0+1

environment:
sdk: ">=2.14.0 <3.0.0"
Expand Down
1 change: 0 additions & 1 deletion packages/camera/camera/test/camera_preview_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ void main() {
controller.value = controller.value.copyWith(
isInitialized: true,
deviceOrientation: DeviceOrientation.portraitUp,
lockedCaptureOrientation: null,
recordingOrientation: const Optional<DeviceOrientation>.fromNullable(
DeviceOrientation.landscapeLeft),
previewSize: const Size(480, 640),
Expand Down
7 changes: 0 additions & 7 deletions packages/camera/camera/test/camera_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,6 @@ void main() {
PlatformException(
code: 'TEST_ERROR',
message: 'This is a test error message',
details: null,
),
);

Expand Down Expand Up @@ -742,7 +741,6 @@ void main() {
PlatformException(
code: 'TEST_ERROR',
message: 'This is a test error message',
details: null,
),
);

Expand Down Expand Up @@ -787,7 +785,6 @@ void main() {
PlatformException(
code: 'TEST_ERROR',
message: 'This is a test error message',
details: null,
),
);

Expand Down Expand Up @@ -1219,7 +1216,6 @@ void main() {
PlatformException(
code: 'TEST_ERROR',
message: 'This is a test error message',
details: null,
),
);

Expand Down Expand Up @@ -1285,7 +1281,6 @@ void main() {
PlatformException(
code: 'TEST_ERROR',
message: 'This is a test error message',
details: null,
),
);

Expand Down Expand Up @@ -1339,7 +1334,6 @@ void main() {
PlatformException(
code: 'TEST_ERROR',
message: 'This is a test error message',
details: null,
),
);

Expand Down Expand Up @@ -1385,7 +1379,6 @@ void main() {
PlatformException(
code: 'TEST_ERROR',
message: 'This is a test error message',
details: null,
),
);

Expand Down
3 changes: 0 additions & 3 deletions packages/camera/camera/test/camera_value_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ void main() {
test('Can be created', () {
const CameraValue cameraValue = CameraValue(
isInitialized: false,
errorDescription: null,
previewSize: Size(10, 10),
isRecordingPaused: false,
isRecordingVideo: false,
Expand All @@ -32,7 +31,6 @@ void main() {
lockedCaptureOrientation: DeviceOrientation.portraitUp,
recordingOrientation: DeviceOrientation.portraitUp,
focusPointSupported: true,
isPreviewPaused: false,
previewPauseOrientation: DeviceOrientation.portraitUp,
);

Expand Down Expand Up @@ -129,7 +127,6 @@ void main() {
test('toString() works as expected', () {
const CameraValue cameraValue = CameraValue(
isInitialized: false,
errorDescription: null,
previewSize: Size(10, 10),
isRecordingPaused: false,
isRecordingVideo: false,
Expand Down
4 changes: 4 additions & 0 deletions packages/camera/camera_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.10.0+1

* Fixes avoid_redundant_argument_values lint warnings and minor typos.

## 0.10.0

* **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.
Expand Down
7 changes: 0 additions & 7 deletions packages/camera/camera_android/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
Padding(
padding: const EdgeInsets.all(5.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
_cameraTogglesRowWidget(),
_thumbnailWidget(),
Expand Down Expand Up @@ -274,7 +273,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
IconButton(
icon: const Icon(Icons.flash_on),
Expand Down Expand Up @@ -328,7 +326,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
child: ClipRect(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
IconButton(
icon: const Icon(Icons.flash_off),
Expand Down Expand Up @@ -400,7 +397,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
TextButton(
style: styleAuto,
Expand Down Expand Up @@ -439,7 +435,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Text(_minAvailableExposureOffset.toString()),
Slider(
Expand Down Expand Up @@ -490,7 +485,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
TextButton(
style: styleAuto,
Expand Down Expand Up @@ -528,7 +522,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>

return Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
IconButton(
icon: const Icon(Icons.camera_alt),
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.0
version: 0.10.0+1

environment:
sdk: ">=2.14.0 <3.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,6 @@ void main() {
'setZoomLevel': PlatformException(
code: 'ZOOM_ERROR',
message: 'Illegal zoom error',
details: null,
)
},
);
Expand Down
3 changes: 2 additions & 1 deletion packages/camera/camera_avfoundation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 0.9.8+3

* Fixes avoid_redundant_argument_values lint warnings and minor typos.
* Ignores missing return warnings in preparation for [upcoming analysis changes](https://github.com/flutter/flutter/issues/105750).

## 0.9.8+2
Expand Down
7 changes: 0 additions & 7 deletions packages/camera/camera_avfoundation/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
Padding(
padding: const EdgeInsets.all(5.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
_cameraTogglesRowWidget(),
_thumbnailWidget(),
Expand Down Expand Up @@ -274,7 +273,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
IconButton(
icon: const Icon(Icons.flash_on),
Expand Down Expand Up @@ -328,7 +326,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
child: ClipRect(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
IconButton(
icon: const Icon(Icons.flash_off),
Expand Down Expand Up @@ -400,7 +397,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
TextButton(
style: styleAuto,
Expand Down Expand Up @@ -439,7 +435,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Text(_minAvailableExposureOffset.toString()),
Slider(
Expand Down Expand Up @@ -490,7 +485,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
TextButton(
style: styleAuto,
Expand Down Expand Up @@ -528,7 +522,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>

return Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
IconButton(
icon: const Icon(Icons.camera_alt),
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_avfoundation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.8+2
version: 0.9.8+3

environment:
sdk: ">=2.14.0 <3.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,6 @@ void main() {
'setZoomLevel': PlatformException(
code: 'ZOOM_ERROR',
message: 'Illegal zoom error',
details: null,
)
},
);
Expand Down
1 change: 1 addition & 0 deletions packages/camera/camera_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT

* Fixes avoid_redundant_argument_values lint warnings and minor typos.
* Ignores unnecessary import warnings in preparation for [upcoming Flutter changes](https://github.com/flutter/flutter/pull/104231).
* Ignores missing return warnings in preparation for [upcoming analysis changes](https://github.com/flutter/flutter/issues/105750).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,6 @@ void main() {
'setZoomLevel': PlatformException(
code: 'ZOOM_ERROR',
message: 'Illegal zoom error',
details: null,
)
},
);
Expand Down
1 change: 1 addition & 0 deletions packages/camera/camera_web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT

* Fixes avoid_redundant_argument_values lint warnings and minor typos.
* Ignores unnecessary import warnings in preparation for [upcoming Flutter changes](https://github.com/flutter/flutter/pull/106316).

## 0.3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void main() {
testWidgets('supports value equality', (WidgetTester tester) async {
expect(
CameraOptions(
audio: const AudioConstraints(enabled: false),
audio: const AudioConstraints(),
video: VideoConstraints(
facingMode: FacingModeConstraint(CameraType.environment),
width:
Expand All @@ -42,7 +42,7 @@ void main() {
),
equals(
CameraOptions(
audio: const AudioConstraints(enabled: false),
audio: const AudioConstraints(),
video: VideoConstraints(
facingMode: FacingModeConstraint(CameraType.environment),
width: const VideoSizeConstraint(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

group('CameraService', () {
const int cameraId = 0;
const int cameraId = 1;

late Window window;
late Navigator navigator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

group('CameraPlugin', () {
const int cameraId = 0;
const int cameraId = 1;

late Window window;
late Navigator navigator;
Expand Down Expand Up @@ -593,7 +593,7 @@ void main() {
(Camera camera) => camera.options,
'options',
CameraOptions(
audio: const AudioConstraints(enabled: false),
audio: const AudioConstraints(),
video: VideoConstraints(
facingMode: FacingModeConstraint(CameraType.user),
width: VideoSizeConstraint(
Expand Down
Loading

0 comments on commit f162a3c

Please sign in to comment.