forked from firka/flutter
Enable use_function_type_syntax_for_parameters lint (#77163)
This commit is contained in:
committed by
GitHub
parent
8f9c6af2dd
commit
7b251f5f37
@@ -136,7 +136,7 @@ class AppContext {
|
||||
/// name. This is useful for debugging purposes and is analogous to naming a
|
||||
/// thread in Java.
|
||||
Future<V> run<V>({
|
||||
@required FutureOr<V> body(),
|
||||
@required FutureOr<V> Function() body,
|
||||
String name,
|
||||
Map<Type, Generator> overrides,
|
||||
Map<Type, Generator> fallbacks,
|
||||
|
||||
@@ -123,8 +123,8 @@ class FileSystemUtils {
|
||||
void copyDirectory(
|
||||
Directory srcDir,
|
||||
Directory destDir, {
|
||||
bool shouldCopyFile(File srcFile, File destFile),
|
||||
void onFileCopied(File srcFile, File destFile),
|
||||
bool Function(File srcFile, File destFile) shouldCopyFile,
|
||||
void Function(File srcFile, File destFile) onFileCopied,
|
||||
}) {
|
||||
if (!srcDir.existsSync()) {
|
||||
throw Exception('Source directory "${srcDir.path}" does not exist, nothing to copy');
|
||||
|
||||
@@ -205,7 +205,7 @@ abstract class Target {
|
||||
}
|
||||
|
||||
/// Performs a fold across this target and its dependencies.
|
||||
T fold<T>(T initialValue, T combine(T previousValue, Target target)) {
|
||||
T fold<T>(T initialValue, T Function(T previousValue, Target target) combine) {
|
||||
final T dependencyResult = dependencies.fold(
|
||||
initialValue, (T prev, Target t) => t.fold(prev, combine));
|
||||
return combine(dependencyResult, this);
|
||||
|
||||
@@ -1075,7 +1075,7 @@ class AppInstance {
|
||||
_logger.close();
|
||||
}
|
||||
|
||||
Future<T> _runInZone<T>(AppDomain domain, FutureOr<T> method()) async {
|
||||
Future<T> _runInZone<T>(AppDomain domain, FutureOr<T> Function() method) async {
|
||||
return method();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1398,7 +1398,7 @@ class PubDependencyTree {
|
||||
|
||||
// Produces a 16-bit checksum from the codePoints of the package name and
|
||||
// version strings using Fletcher's algorithm.
|
||||
String _computeChecksum(Iterable<String> names, String getVersion(String name)) {
|
||||
String _computeChecksum(Iterable<String> names, String Function(String name) getVersion) {
|
||||
int lowerCheck = 0;
|
||||
int upperCheck = 0;
|
||||
final List<String> sortedNames = names.toList()..sort();
|
||||
|
||||
@@ -62,7 +62,7 @@ import 'windows/visual_studio_validator.dart';
|
||||
import 'windows/windows_workflow.dart';
|
||||
|
||||
Future<T> runInContext<T>(
|
||||
FutureOr<T> runner(), {
|
||||
FutureOr<T> Function() runner, {
|
||||
Map<Type, Generator> overrides,
|
||||
}) async {
|
||||
|
||||
|
||||
@@ -650,7 +650,7 @@ class XcodeProjectInfo {
|
||||
return 'Release';
|
||||
}
|
||||
|
||||
static String _uniqueMatch(Iterable<String> strings, bool matches(String s)) {
|
||||
static String _uniqueMatch(Iterable<String> strings, bool Function(String s) matches) {
|
||||
final List<String> options = strings.where(matches).toList();
|
||||
if (options.length == 1) {
|
||||
return options.first;
|
||||
|
||||
@@ -136,7 +136,7 @@ class CrashReportSender {
|
||||
Future<void> sendReport({
|
||||
@required dynamic error,
|
||||
@required StackTrace stackTrace,
|
||||
@required String getFlutterVersion(),
|
||||
@required String Function() getFlutterVersion,
|
||||
@required String command,
|
||||
}) async {
|
||||
// Only send one crash report per run.
|
||||
|
||||
@@ -272,7 +272,7 @@ class FlutterTesterTestDevice extends TestDevice {
|
||||
|
||||
void _pipeStandardStreamsToConsole({
|
||||
@required Process process,
|
||||
@required Future<void> reportObservatoryUri(Uri uri),
|
||||
@required Future<void> Function(Uri uri) reportObservatoryUri,
|
||||
}) {
|
||||
const String observatoryString = 'Observatory listening on ';
|
||||
for (final Stream<List<int>> stream in <Stream<List<int>>>[
|
||||
|
||||
Reference in New Issue
Block a user