Enable avoid_redundant_argument_values lint (#91409)

This commit is contained in:
Ian Hickson
2021-10-07 20:13:02 -07:00
committed by GitHub
parent 4bf7179e51
commit 5fd259be24
667 changed files with 1693 additions and 3385 deletions

View File

@@ -10,8 +10,7 @@ import 'test_step.dart';
Future<TestStepResult> methodCallJsonSuccessHandshake(dynamic payload) async {
const MethodChannel channel =
MethodChannel('json-method', JSONMethodCodec());
return _methodCallSuccessHandshake(
'JSON success($payload)', channel, payload);
return _methodCallSuccessHandshake('JSON success($payload)', channel, payload);
}
Future<TestStepResult> methodCallJsonErrorHandshake(dynamic payload) async {
@@ -32,8 +31,7 @@ Future<TestStepResult> methodCallStandardSuccessHandshake(
'std-method',
StandardMethodCodec(ExtendedStandardMessageCodec()),
);
return _methodCallSuccessHandshake(
'Standard success($payload)', channel, payload);
return _methodCallSuccessHandshake('Standard success($payload)', channel, payload);
}
Future<TestStepResult> methodCallStandardErrorHandshake(dynamic payload) async {
@@ -41,8 +39,7 @@ Future<TestStepResult> methodCallStandardErrorHandshake(dynamic payload) async {
'std-method',
StandardMethodCodec(ExtendedStandardMessageCodec()),
);
return _methodCallErrorHandshake(
'Standard error($payload)', channel, payload);
return _methodCallErrorHandshake('Standard error($payload)', channel, payload);
}
Future<TestStepResult> methodCallStandardNotImplementedHandshake() async {
@@ -50,8 +47,7 @@ Future<TestStepResult> methodCallStandardNotImplementedHandshake() async {
'std-method',
StandardMethodCodec(ExtendedStandardMessageCodec()),
);
return _methodCallNotImplementedHandshake(
'Standard notImplemented()', channel);
return _methodCallNotImplementedHandshake('Standard notImplemented()', channel);
}
Future<TestStepResult> _methodCallSuccessHandshake(
@@ -89,8 +85,7 @@ Future<TestStepResult> _methodCallErrorHandshake(
final List<dynamic> received = <dynamic>[];
channel.setMethodCallHandler((MethodCall call) async {
received.add(call.arguments);
throw PlatformException(
code: 'error', message: null, details: arguments);
throw PlatformException(code: 'error', details: arguments);
});
dynamic errorDetails = nothing;
dynamic error = nothing;