Unverified Commit 275fb028 authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Fix avoid_redundant_argument_values analyzer warnings enabled in the latest Dart SDK (#103734)

See https://github.com/flutter/flutter/pull/103719
parent 708c3639
...@@ -275,7 +275,6 @@ class _LeaveBehindListItem extends StatelessWidget { ...@@ -275,7 +275,6 @@ class _LeaveBehindListItem extends StatelessWidget {
Future<bool?> _showConfirmationDialog(BuildContext context, String action) { Future<bool?> _showConfirmationDialog(BuildContext context, String action) {
return showDialog<bool>( return showDialog<bool>(
context: context, context: context,
barrierDismissible: true,
builder: (BuildContext context) { builder: (BuildContext context) {
return AlertDialog( return AlertDialog(
title: Text('Do you want to $action this item?'), title: Text('Do you want to $action this item?'),
......
...@@ -41,7 +41,6 @@ Future<R> compute<Q, R>(isolates.ComputeCallback<Q, R> callback, Q message, { St ...@@ -41,7 +41,6 @@ Future<R> compute<Q, R>(isolates.ComputeCallback<Q, R> callback, Q message, { St
debugLabel, debugLabel,
flow.id, flow.id,
), ),
errorsAreFatal: true,
onExit: port.sendPort, onExit: port.sendPort,
onError: port.sendPort, onError: port.sendPort,
debugName: debugLabel, debugName: debugLabel,
......
...@@ -500,7 +500,6 @@ class SystemChrome { ...@@ -500,7 +500,6 @@ class SystemChrome {
if (callback != null) { if (callback != null) {
await SystemChannels.platform.invokeMethod<void>( await SystemChannels.platform.invokeMethod<void>(
'SystemChrome.setSystemUIChangeListener', 'SystemChrome.setSystemUIChangeListener',
null,
); );
} }
} }
...@@ -517,7 +516,6 @@ class SystemChrome { ...@@ -517,7 +516,6 @@ class SystemChrome {
static Future<void> restoreSystemUIOverlays() async { static Future<void> restoreSystemUIOverlays() async {
await SystemChannels.platform.invokeMethod<void>( await SystemChannels.platform.invokeMethod<void>(
'SystemChrome.restoreSystemUIOverlays', 'SystemChrome.restoreSystemUIOverlays',
null,
); );
} }
......
...@@ -5268,7 +5268,7 @@ class _NamedRestorationInformation extends _RestorationInformation { ...@@ -5268,7 +5268,7 @@ class _NamedRestorationInformation extends _RestorationInformation {
@override @override
Route<dynamic> createRoute(NavigatorState navigator) { Route<dynamic> createRoute(NavigatorState navigator) {
final Route<dynamic> route = navigator._routeNamed<dynamic>(name, arguments: arguments, allowNull: false)!; final Route<dynamic> route = navigator._routeNamed<dynamic>(name, arguments: arguments)!;
assert(route != null); assert(route != null);
return route; return route;
} }
......
...@@ -1635,7 +1635,6 @@ void main() { ...@@ -1635,7 +1635,6 @@ void main() {
await showCupertinoModalPopup<void>( await showCupertinoModalPopup<void>(
context: context, context: context,
builder: (BuildContext context) => const Text('Visible'), builder: (BuildContext context) => const Text('Visible'),
barrierDismissible: true,
); );
}, },
child: const Text('tap'), child: const Text('tap'),
......
...@@ -218,7 +218,6 @@ void main() { ...@@ -218,7 +218,6 @@ void main() {
showModalBottomSheet<void>( showModalBottomSheet<void>(
context: savedContext, context: savedContext,
isDismissible: false, isDismissible: false,
enableDrag: true,
builder: (BuildContext context) { builder: (BuildContext context) {
numBuilderCalls++; numBuilderCalls++;
return const Text('BottomSheet'); return const Text('BottomSheet');
...@@ -323,7 +322,6 @@ void main() { ...@@ -323,7 +322,6 @@ void main() {
showModalBottomSheet<void>( showModalBottomSheet<void>(
context: savedContext, context: savedContext,
builder: (BuildContext context) => const Text('BottomSheet'), builder: (BuildContext context) => const Text('BottomSheet'),
isDismissible: true,
).then<void>((void value) { ).then<void>((void value) {
showBottomSheetThenCalled = true; showBottomSheetThenCalled = true;
}); });
...@@ -498,7 +496,6 @@ void main() { ...@@ -498,7 +496,6 @@ void main() {
showModalBottomSheet<void>( showModalBottomSheet<void>(
context: savedContext, context: savedContext,
isDismissible: false, isDismissible: false,
enableDrag: true,
builder: (BuildContext context) => const Text('BottomSheet'), builder: (BuildContext context) => const Text('BottomSheet'),
).then<void>((void value) { ).then<void>((void value) {
showBottomSheetThenCalled = true; showBottomSheetThenCalled = true;
...@@ -531,7 +528,6 @@ void main() { ...@@ -531,7 +528,6 @@ void main() {
showModalBottomSheet<void>( showModalBottomSheet<void>(
context: savedContext, context: savedContext,
isDismissible: false, isDismissible: false,
enableDrag: true,
builder: (BuildContext context) { builder: (BuildContext context) {
numBuilderCalls++; numBuilderCalls++;
return const Text('BottomSheet'); return const Text('BottomSheet');
......
...@@ -1648,7 +1648,6 @@ void main() { ...@@ -1648,7 +1648,6 @@ void main() {
Future<bool?> confirmDismiss (DismissDirection dismissDirection) async { Future<bool?> confirmDismiss (DismissDirection dismissDirection) async {
return showDialog<bool>( return showDialog<bool>(
context: scaffoldKey.currentContext!, context: scaffoldKey.currentContext!,
barrierDismissible: true, // showDialog() returns null if tapped outside the dialog
builder: (BuildContext context) { builder: (BuildContext context) {
return AlertDialog( return AlertDialog(
actions: <Widget>[ actions: <Widget>[
......
...@@ -1019,7 +1019,6 @@ void main() { ...@@ -1019,7 +1019,6 @@ void main() {
onPressed: () { onPressed: () {
showGeneralDialog<void>( showGeneralDialog<void>(
context: context, context: context,
barrierDismissible: false,
transitionDuration: Duration.zero, transitionDuration: Duration.zero,
pageBuilder: (BuildContext innerContext, _, __) { pageBuilder: (BuildContext innerContext, _, __) {
return const SizedBox(); return const SizedBox();
...@@ -1097,7 +1096,6 @@ void main() { ...@@ -1097,7 +1096,6 @@ void main() {
onPressed: () { onPressed: () {
showGeneralDialog<void>( showGeneralDialog<void>(
context: context, context: context,
barrierDismissible: false,
transitionDuration: Duration.zero, transitionDuration: Duration.zero,
pageBuilder: (BuildContext innerContext, _, __) { pageBuilder: (BuildContext innerContext, _, __) {
return const SizedBox(); return const SizedBox();
...@@ -1135,7 +1133,6 @@ void main() { ...@@ -1135,7 +1133,6 @@ void main() {
showGeneralDialog<void>( showGeneralDialog<void>(
useRootNavigator: false, useRootNavigator: false,
context: context, context: context,
barrierDismissible: false,
transitionDuration: Duration.zero, transitionDuration: Duration.zero,
pageBuilder: (BuildContext innerContext, _, __) { pageBuilder: (BuildContext innerContext, _, __) {
return const SizedBox(); return const SizedBox();
......
...@@ -402,12 +402,12 @@ class AndroidLicenseValidator extends DoctorValidator { ...@@ -402,12 +402,12 @@ class AndroidLicenseValidator extends DoctorValidator {
.transform<String>(const Utf8Decoder(reportErrors: false)) .transform<String>(const Utf8Decoder(reportErrors: false))
.transform<String>(const LineSplitter()) .transform<String>(const LineSplitter())
.listen(handleLine) .listen(handleLine)
.asFuture<void>(null); .asFuture<void>();
final Future<void> errors = process.stderr final Future<void> errors = process.stderr
.transform<String>(const Utf8Decoder(reportErrors: false)) .transform<String>(const Utf8Decoder(reportErrors: false))
.transform<String>(const LineSplitter()) .transform<String>(const LineSplitter())
.listen(handleLine) .listen(handleLine)
.asFuture<void>(null); .asFuture<void>();
await Future.wait<void>(<Future<void>>[output, errors]); await Future.wait<void>(<Future<void>>[output, errors]);
return status ?? LicensesAccepted.unknown; return status ?? LicensesAccepted.unknown;
} on ProcessException catch (e) { } on ProcessException catch (e) {
......
...@@ -295,11 +295,11 @@ class _DefaultProcessUtils implements ProcessUtils { ...@@ -295,11 +295,11 @@ class _DefaultProcessUtils implements ProcessUtils {
final Future<void> stdoutFuture = process.stdout final Future<void> stdoutFuture = process.stdout
.transform<String>(const Utf8Decoder(reportErrors: false)) .transform<String>(const Utf8Decoder(reportErrors: false))
.listen(stdoutBuffer.write) .listen(stdoutBuffer.write)
.asFuture<void>(null); .asFuture<void>();
final Future<void> stderrFuture = process.stderr final Future<void> stderrFuture = process.stderr
.transform<String>(const Utf8Decoder(reportErrors: false)) .transform<String>(const Utf8Decoder(reportErrors: false))
.listen(stderrBuffer.write) .listen(stderrBuffer.write)
.asFuture<void>(null); .asFuture<void>();
int? exitCode; int? exitCode;
exitCode = await process.exitCode.then<int?>((int x) => x).timeout(timeout, onTimeout: () { exitCode = await process.exitCode.then<int?>((int x) => x).timeout(timeout, onTimeout: () {
......
...@@ -93,7 +93,7 @@ void main() { ...@@ -93,7 +93,7 @@ void main() {
PluginEventChannel<String>('test3'); PluginEventChannel<String>('test3');
final StreamController<String> controller = StreamController<String>( final StreamController<String> controller = StreamController<String>(
onListen: expectAsync0<void>(() {}, count: 1)); onListen: expectAsync0<void>(() {}));
sendingChannel.setController(controller); sendingChannel.setController(controller);
expect(listeningChannel.receiveBroadcastStream(), expect(listeningChannel.receiveBroadcastStream(),
...@@ -109,7 +109,7 @@ void main() { ...@@ -109,7 +109,7 @@ void main() {
PluginEventChannel<String>('test3'); PluginEventChannel<String>('test3');
final StreamController<String> controller = StreamController<String>( final StreamController<String> controller = StreamController<String>(
onListen: expectAsync0<void>(() {}, count: 1)); onListen: expectAsync0<void>(() {}));
sendingChannel.setController(controller); sendingChannel.setController(controller);
expect(listeningChannel.receiveBroadcastStream(), expect(listeningChannel.receiveBroadcastStream(),
......
...@@ -73,7 +73,6 @@ class IOCallbackManager implements CallbackManager { ...@@ -73,7 +73,6 @@ class IOCallbackManager implements CallbackManager {
assert(!_isSurfaceRendered, 'Surface already converted to an image'); assert(!_isSurfaceRendered, 'Surface already converted to an image');
await integrationTestChannel.invokeMethod<void>( await integrationTestChannel.invokeMethod<void>(
'convertFlutterSurfaceToImage', 'convertFlutterSurfaceToImage',
null,
); );
_isSurfaceRendered = true; _isSurfaceRendered = true;
...@@ -81,7 +80,6 @@ class IOCallbackManager implements CallbackManager { ...@@ -81,7 +80,6 @@ class IOCallbackManager implements CallbackManager {
assert(_isSurfaceRendered, 'Surface is not an image'); assert(_isSurfaceRendered, 'Surface is not an image');
await integrationTestChannel.invokeMethod<void>( await integrationTestChannel.invokeMethod<void>(
'revertFlutterImage', 'revertFlutterImage',
null,
); );
_isSurfaceRendered = false; _isSurfaceRendered = false;
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment