Enable use_function_type_syntax_for_parameters lint (#77163)
This commit is contained in:
committed by
GitHub
parent
8f9c6af2dd
commit
7b251f5f37
@@ -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) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user