Enable use_function_type_syntax_for_parameters lint (#77163)

This commit is contained in:
Michael Goderbauer
2021-03-04 08:59:17 -08:00
committed by GitHub
parent 8f9c6af2dd
commit 7b251f5f37
68 changed files with 119 additions and 119 deletions

View File

@@ -478,7 +478,7 @@ mixin CommandHandlerFactory {
}
// Waits until at the end of a frame the provided [condition] is [true].
Future<void> _waitUntilFrame(bool condition(), [ Completer<void>? completer ]) {
Future<void> _waitUntilFrame(bool Function() condition, [ Completer<void>? completer ]) {
completer ??= Completer<void>();
if (!condition()) {
SchedulerBinding.instance!.addPostFrameCallback((Duration timestamp) {

View File

@@ -656,7 +656,7 @@ abstract class FlutterDriver {
///
/// For [WebFlutterDriver], this is only supported for Chrome.
Future<Timeline> traceAction(
Future<dynamic> action(), {
Future<dynamic> Function() action, {
List<TimelineStream> streams = const <TimelineStream>[TimelineStream.all],
bool retainPriorEvents = false,
}) async {
@@ -691,7 +691,7 @@ abstract class FlutterDriver {
/// With frame sync disabled, it's the responsibility of the test author to
/// ensure that no action is performed while the app is undergoing a
/// transition to avoid flakiness.
Future<T> runUnsynchronized<T>(Future<T> action(), { Duration? timeout }) async {
Future<T> runUnsynchronized<T>(Future<T> Function() action, { Duration? timeout }) async {
await sendCommand(SetFrameSync(false, timeout: timeout));
T result;
try {

View File

@@ -236,7 +236,7 @@ class TimelineSummary {
List<Duration> _extractDurations(
String name,
Duration extractor(TimelineEvent beginEvent, TimelineEvent endEvent),
Duration Function(TimelineEvent beginEvent, TimelineEvent endEvent) extractor,
) {
final List<Duration> result = <Duration>[];
final List<TimelineEvent> events = _extractNamedEvents(name);

View File

@@ -440,7 +440,7 @@ class VMServiceFlutterDriver extends FlutterDriver {
@override
Future<Timeline> traceAction(
Future<dynamic> action(), {
Future<dynamic> Function() action, {
List<TimelineStream> streams = const <TimelineStream>[TimelineStream.all],
bool retainPriorEvents = false,
}) async {
@@ -493,7 +493,7 @@ class VMServiceFlutterDriver extends FlutterDriver {
}
@override
Future<T> runUnsynchronized<T>(Future<T> action(), { Duration? timeout }) async {
Future<T> runUnsynchronized<T>(Future<T> Function() action, { Duration? timeout }) async {
await sendCommand(SetFrameSync(false, timeout: timeout));
T result;
try {