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 {
Future<bool?> _showConfirmationDialog(BuildContext context, String action) {
return showDialog<bool>(
context: context,
barrierDismissible: true,
builder: (BuildContext context) {
return AlertDialog(
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
debugLabel,
flow.id,
),
errorsAreFatal: true,
onExit: port.sendPort,
onError: port.sendPort,
debugName: debugLabel,
......
......@@ -500,7 +500,6 @@ class SystemChrome {
if (callback != null) {
await SystemChannels.platform.invokeMethod<void>(
'SystemChrome.setSystemUIChangeListener',
null,
);
}
}
......@@ -517,7 +516,6 @@ class SystemChrome {
static Future<void> restoreSystemUIOverlays() async {
await SystemChannels.platform.invokeMethod<void>(
'SystemChrome.restoreSystemUIOverlays',
null,
);
}
......
......@@ -5268,7 +5268,7 @@ class _NamedRestorationInformation extends _RestorationInformation {
@override
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);
return route;
}
......
......@@ -1635,7 +1635,6 @@ void main() {
await showCupertinoModalPopup<void>(
context: context,
builder: (BuildContext context) => const Text('Visible'),
barrierDismissible: true,
);
},
child: const Text('tap'),
......
......@@ -218,7 +218,6 @@ void main() {
showModalBottomSheet<void>(
context: savedContext,
isDismissible: false,
enableDrag: true,
builder: (BuildContext context) {
numBuilderCalls++;
return const Text('BottomSheet');
......@@ -323,7 +322,6 @@ void main() {
showModalBottomSheet<void>(
context: savedContext,
builder: (BuildContext context) => const Text('BottomSheet'),
isDismissible: true,
).then<void>((void value) {
showBottomSheetThenCalled = true;
});
......@@ -498,7 +496,6 @@ void main() {
showModalBottomSheet<void>(
context: savedContext,
isDismissible: false,
enableDrag: true,
builder: (BuildContext context) => const Text('BottomSheet'),
).then<void>((void value) {
showBottomSheetThenCalled = true;
......@@ -531,7 +528,6 @@ void main() {
showModalBottomSheet<void>(
context: savedContext,
isDismissible: false,
enableDrag: true,
builder: (BuildContext context) {
numBuilderCalls++;
return const Text('BottomSheet');
......
......@@ -1648,7 +1648,6 @@ void main() {
Future<bool?> confirmDismiss (DismissDirection dismissDirection) async {
return showDialog<bool>(
context: scaffoldKey.currentContext!,
barrierDismissible: true, // showDialog() returns null if tapped outside the dialog
builder: (BuildContext context) {
return AlertDialog(
actions: <Widget>[
......
......@@ -1019,7 +1019,6 @@ void main() {
onPressed: () {
showGeneralDialog<void>(
context: context,
barrierDismissible: false,
transitionDuration: Duration.zero,
pageBuilder: (BuildContext innerContext, _, __) {
return const SizedBox();
......@@ -1097,7 +1096,6 @@ void main() {
onPressed: () {
showGeneralDialog<void>(
context: context,
barrierDismissible: false,
transitionDuration: Duration.zero,
pageBuilder: (BuildContext innerContext, _, __) {
return const SizedBox();
......@@ -1135,7 +1133,6 @@ void main() {
showGeneralDialog<void>(
useRootNavigator: false,
context: context,
barrierDismissible: false,
transitionDuration: Duration.zero,
pageBuilder: (BuildContext innerContext, _, __) {
return const SizedBox();
......
......@@ -402,12 +402,12 @@ class AndroidLicenseValidator extends DoctorValidator {
.transform<String>(const Utf8Decoder(reportErrors: false))
.transform<String>(const LineSplitter())
.listen(handleLine)
.asFuture<void>(null);
.asFuture<void>();
final Future<void> errors = process.stderr
.transform<String>(const Utf8Decoder(reportErrors: false))
.transform<String>(const LineSplitter())
.listen(handleLine)
.asFuture<void>(null);
.asFuture<void>();
await Future.wait<void>(<Future<void>>[output, errors]);
return status ?? LicensesAccepted.unknown;
} on ProcessException catch (e) {
......
......@@ -295,11 +295,11 @@ class _DefaultProcessUtils implements ProcessUtils {
final Future<void> stdoutFuture = process.stdout
.transform<String>(const Utf8Decoder(reportErrors: false))
.listen(stdoutBuffer.write)
.asFuture<void>(null);
.asFuture<void>();
final Future<void> stderrFuture = process.stderr
.transform<String>(const Utf8Decoder(reportErrors: false))
.listen(stderrBuffer.write)
.asFuture<void>(null);
.asFuture<void>();
int? exitCode;
exitCode = await process.exitCode.then<int?>((int x) => x).timeout(timeout, onTimeout: () {
......
......@@ -93,7 +93,7 @@ void main() {
PluginEventChannel<String>('test3');
final StreamController<String> controller = StreamController<String>(
onListen: expectAsync0<void>(() {}, count: 1));
onListen: expectAsync0<void>(() {}));
sendingChannel.setController(controller);
expect(listeningChannel.receiveBroadcastStream(),
......@@ -109,7 +109,7 @@ void main() {
PluginEventChannel<String>('test3');
final StreamController<String> controller = StreamController<String>(
onListen: expectAsync0<void>(() {}, count: 1));
onListen: expectAsync0<void>(() {}));
sendingChannel.setController(controller);
expect(listeningChannel.receiveBroadcastStream(),
......
......@@ -73,7 +73,6 @@ class IOCallbackManager implements CallbackManager {
assert(!_isSurfaceRendered, 'Surface already converted to an image');
await integrationTestChannel.invokeMethod<void>(
'convertFlutterSurfaceToImage',
null,
);
_isSurfaceRendered = true;
......@@ -81,7 +80,6 @@ class IOCallbackManager implements CallbackManager {
assert(_isSurfaceRendered, 'Surface is not an image');
await integrationTestChannel.invokeMethod<void>(
'revertFlutterImage',
null,
);
_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