enable lint prefer_equal_for_default_values (#18156)
diff --git a/packages/flutter_tools/lib/runner.dart b/packages/flutter_tools/lib/runner.dart
index 1402982..2154cd3 100644
--- a/packages/flutter_tools/lib/runner.dart
+++ b/packages/flutter_tools/lib/runner.dart
@@ -29,9 +29,9 @@
Future<int> run(
List<String> args,
List<FlutterCommand> commands, {
- bool muteCommandLogging: false,
- bool verbose: false,
- bool verboseHelp: false,
+ bool muteCommandLogging = false,
+ bool verbose = false,
+ bool verboseHelp = false,
bool reportCrashes,
String flutterVersion,
}) {
diff --git a/packages/flutter_tools/lib/src/android/android_device.dart b/packages/flutter_tools/lib/src/android/android_device.dart
index 6332354..447e29b 100644
--- a/packages/flutter_tools/lib/src/android/android_device.dart
+++ b/packages/flutter_tools/lib/src/android/android_device.dart
@@ -352,10 +352,10 @@
String route,
DebuggingOptions debuggingOptions,
Map<String, dynamic> platformArgs,
- bool prebuiltApplication: false,
- bool applicationNeedsRebuild: false,
- bool usesTerminalUi: true,
- bool ipv6: false,
+ bool prebuiltApplication = false,
+ bool applicationNeedsRebuild = false,
+ bool usesTerminalUi = true,
+ bool ipv6 = false,
}) async {
if (!await _checkForSupportedAdbVersion() || !await _checkForSupportedAndroidVersion())
return new LaunchResult.failed();
diff --git a/packages/flutter_tools/lib/src/android/apk.dart b/packages/flutter_tools/lib/src/android/apk.dart
index 1c34cac..4a2af8e 100644
--- a/packages/flutter_tools/lib/src/android/apk.dart
+++ b/packages/flutter_tools/lib/src/android/apk.dart
@@ -12,7 +12,7 @@
Future<Null> buildApk({
String target,
- BuildInfo buildInfo: BuildInfo.debug
+ BuildInfo buildInfo = BuildInfo.debug
}) async {
if (!isProjectUsingGradle()) {
throwToolExit(
diff --git a/packages/flutter_tools/lib/src/android/gradle.dart b/packages/flutter_tools/lib/src/android/gradle.dart
index 155466c..4a81a7d 100644
--- a/packages/flutter_tools/lib/src/android/gradle.dart
+++ b/packages/flutter_tools/lib/src/android/gradle.dart
@@ -141,7 +141,7 @@
}
}
-String _locateProjectGradlew({ bool ensureExecutable: true }) {
+String _locateProjectGradlew({ bool ensureExecutable = true }) {
final String path = fs.path.join(
'android',
platform.isWindows ? 'gradlew.bat' : 'gradlew',
diff --git a/packages/flutter_tools/lib/src/asset.dart b/packages/flutter_tools/lib/src/asset.dart
index b5514e5..ba81d81 100644
--- a/packages/flutter_tools/lib/src/asset.dart
+++ b/packages/flutter_tools/lib/src/asset.dart
@@ -35,15 +35,15 @@
bool wasBuiltOnce();
- bool needsBuild({String manifestPath: _ManifestAssetBundle.defaultManifestPath});
+ bool needsBuild({String manifestPath = _ManifestAssetBundle.defaultManifestPath});
/// Returns 0 for success; non-zero for failure.
Future<int> build({
- String manifestPath: _ManifestAssetBundle.defaultManifestPath,
+ String manifestPath = _ManifestAssetBundle.defaultManifestPath,
String assetDirPath,
String packagesPath,
- bool includeDefaultFonts: true,
- bool reportLicensedPackages: false
+ bool includeDefaultFonts = true,
+ bool reportLicensedPackages = false
});
}
@@ -74,7 +74,7 @@
bool wasBuiltOnce() => _lastBuildTimestamp != null;
@override
- bool needsBuild({String manifestPath: defaultManifestPath}) {
+ bool needsBuild({String manifestPath = defaultManifestPath}) {
if (_lastBuildTimestamp == null)
return true;
@@ -87,11 +87,11 @@
@override
Future<int> build({
- String manifestPath: defaultManifestPath,
+ String manifestPath = defaultManifestPath,
String assetDirPath,
String packagesPath,
- bool includeDefaultFonts: true,
- bool reportLicensedPackages: false
+ bool includeDefaultFonts = true,
+ bool reportLicensedPackages = false
}) async {
assetDirPath ??= getAssetBuildDirectory();
packagesPath ??= fs.path.absolute(PackageMap.globalPackagesPath);
@@ -521,7 +521,7 @@
PackageMap packageMap,
FlutterManifest flutterManifest,
String assetBase, {
- List<String> excludeDirs: const <String>[],
+ List<String> excludeDirs = const <String>[],
String packageName
}) {
final Map<_Asset, List<_Asset>> result = <_Asset, List<_Asset>>{};
@@ -566,7 +566,7 @@
_AssetDirectoryCache cache,
Map<_Asset, List<_Asset>> result,
Uri assetUri, {
- List<String> excludeDirs: const <String>[],
+ List<String> excludeDirs = const <String>[],
String packageName
}) {
final String directoryPath = fs.path.join(
@@ -597,7 +597,7 @@
_AssetDirectoryCache cache,
Map<_Asset, List<_Asset>> result,
Uri assetUri, {
- List<String> excludeDirs: const <String>[],
+ List<String> excludeDirs = const <String>[],
String packageName
}) {
final _Asset asset = _resolveAsset(
diff --git a/packages/flutter_tools/lib/src/base/build.dart b/packages/flutter_tools/lib/src/base/build.dart
index a5394c2..d96be68 100644
--- a/packages/flutter_tools/lib/src/base/build.dart
+++ b/packages/flutter_tools/lib/src/base/build.dart
@@ -41,7 +41,7 @@
@required String packagesPath,
@required String depfilePath,
IOSArch iosArch,
- Iterable<String> additionalArgs: const <String>[],
+ Iterable<String> additionalArgs = const <String>[],
}) {
final List<String> args = <String>[
'--await_is_keyword',
@@ -139,7 +139,7 @@
@required bool previewDart2,
@required bool buildSharedLibrary,
IOSArch iosArch,
- List<String> extraGenSnapshotOptions: const <String>[],
+ List<String> extraGenSnapshotOptions = const <String>[],
}) async {
if (!_isValidAotPlatform(platform, buildMode)) {
printError('${getNameForTargetPlatform(platform)} does not support AOT compilation.');
@@ -361,7 +361,7 @@
@required BuildMode buildMode,
@required String mainPath,
@required String outputPath,
- List<String> extraFrontEndOptions: const <String>[],
+ List<String> extraFrontEndOptions = const <String>[],
}) async {
final Directory outputDir = fs.directory(outputPath);
outputDir.createSync(recursive: true);
diff --git a/packages/flutter_tools/lib/src/base/fingerprint.dart b/packages/flutter_tools/lib/src/base/fingerprint.dart
index d8fee1c..476bb1f 100644
--- a/packages/flutter_tools/lib/src/base/fingerprint.dart
+++ b/packages/flutter_tools/lib/src/base/fingerprint.dart
@@ -27,7 +27,7 @@
@required this.fingerprintPath,
@required Iterable<String> paths,
@required Map<String, String> properties,
- Iterable<String> depfilePaths: const <String>[],
+ Iterable<String> depfilePaths = const <String>[],
FingerprintPathFilter pathFilter,
}) : _paths = paths.toList(),
_properties = new Map<String, String>.from(properties),
diff --git a/packages/flutter_tools/lib/src/base/logger.dart b/packages/flutter_tools/lib/src/base/logger.dart
index 9cdbd09..7248c77 100644
--- a/packages/flutter_tools/lib/src/base/logger.dart
+++ b/packages/flutter_tools/lib/src/base/logger.dart
@@ -25,13 +25,13 @@
/// Display an error level message to the user. Commands should use this if they
/// fail in some way.
- void printError(String message, { StackTrace stackTrace, bool emphasis: false });
+ void printError(String message, { StackTrace stackTrace, bool emphasis = false });
/// Display normal output of the command. This should be used for things like
/// progress messages, success messages, or just normal command output.
void printStatus(
String message,
- { bool emphasis: false, bool newline: true, String ansiAlternative, int indent }
+ { bool emphasis = false, bool newline = true, String ansiAlternative, int indent }
);
/// Use this for verbose tracing output. Users can turn this output on in order
@@ -48,8 +48,8 @@
Status startProgress(
String message, {
String progressId,
- bool expectSlowOperation: false,
- int progressIndicatorPadding: kDefaultStatusPadding,
+ bool expectSlowOperation = false,
+ int progressIndicatorPadding = kDefaultStatusPadding,
});
}
@@ -63,7 +63,7 @@
bool get isVerbose => false;
@override
- void printError(String message, { StackTrace stackTrace, bool emphasis: false }) {
+ void printError(String message, { StackTrace stackTrace, bool emphasis = false }) {
_status?.cancel();
_status = null;
@@ -77,7 +77,7 @@
@override
void printStatus(
String message,
- { bool emphasis: false, bool newline: true, String ansiAlternative, int indent }
+ { bool emphasis = false, bool newline = true, String ansiAlternative, int indent }
) {
_status?.cancel();
_status = null;
@@ -104,8 +104,8 @@
Status startProgress(
String message, {
String progressId,
- bool expectSlowOperation: false,
- int progressIndicatorPadding: 59,
+ bool expectSlowOperation = false,
+ int progressIndicatorPadding = 59,
}) {
if (_status != null) {
// Ignore nested progresses; return a no-op status object.
@@ -154,14 +154,14 @@
String get traceText => _trace.toString();
@override
- void printError(String message, { StackTrace stackTrace, bool emphasis: false }) {
+ void printError(String message, { StackTrace stackTrace, bool emphasis = false }) {
_error.writeln(message);
}
@override
void printStatus(
String message,
- { bool emphasis: false, bool newline: true, String ansiAlternative, int indent }
+ { bool emphasis = false, bool newline = true, String ansiAlternative, int indent }
) {
if (newline)
_status.writeln(message);
@@ -176,8 +176,8 @@
Status startProgress(
String message, {
String progressId,
- bool expectSlowOperation: false,
- int progressIndicatorPadding: kDefaultStatusPadding,
+ bool expectSlowOperation = false,
+ int progressIndicatorPadding = kDefaultStatusPadding,
}) {
printStatus(message);
return new Status();
@@ -205,14 +205,14 @@
bool get isVerbose => true;
@override
- void printError(String message, { StackTrace stackTrace, bool emphasis: false }) {
+ void printError(String message, { StackTrace stackTrace, bool emphasis = false }) {
_emit(_LogType.error, message, stackTrace);
}
@override
void printStatus(
String message,
- { bool emphasis: false, bool newline: true, String ansiAlternative, int indent }
+ { bool emphasis = false, bool newline = true, String ansiAlternative, int indent }
) {
_emit(_LogType.status, message);
}
@@ -226,8 +226,8 @@
Status startProgress(
String message, {
String progressId,
- bool expectSlowOperation: false,
- int progressIndicatorPadding: kDefaultStatusPadding,
+ bool expectSlowOperation = false,
+ int progressIndicatorPadding = kDefaultStatusPadding,
}) {
printStatus(message);
return new Status();
diff --git a/packages/flutter_tools/lib/src/base/os.dart b/packages/flutter_tools/lib/src/base/os.dart
index fe82523..f452b79 100644
--- a/packages/flutter_tools/lib/src/base/os.dart
+++ b/packages/flutter_tools/lib/src/base/os.dart
@@ -68,7 +68,7 @@
return osNames.containsKey(osName) ? osNames[osName] : osName;
}
- List<File> _which(String execName, {bool all: false});
+ List<File> _which(String execName, {bool all = false});
/// Returns the separator between items in the PATH environment variable.
String get pathVarSeparator;
@@ -83,7 +83,7 @@
}
@override
- List<File> _which(String execName, {bool all: false}) {
+ List<File> _which(String execName, {bool all = false}) {
final List<String> command = <String>['which'];
if (all)
command.add('-a');
@@ -159,7 +159,7 @@
}
@override
- List<File> _which(String execName, {bool all: false}) {
+ List<File> _which(String execName, {bool all = false}) {
// `where` always returns all matches, not just the first one.
final ProcessResult result = processManager.runSync(<String>['where', execName]);
if (result.exitCode != 0)
diff --git a/packages/flutter_tools/lib/src/base/process.dart b/packages/flutter_tools/lib/src/base/process.dart
index c01b6f3..992687a 100644
--- a/packages/flutter_tools/lib/src/base/process.dart
+++ b/packages/flutter_tools/lib/src/base/process.dart
@@ -108,7 +108,7 @@
/// directory. Completes when the process has been started.
Future<Process> runCommand(List<String> cmd, {
String workingDirectory,
- bool allowReentrantFlutter: false,
+ bool allowReentrantFlutter = false,
Map<String, String> environment
}) {
_traceCommand(cmd, workingDirectory: workingDirectory);
@@ -123,9 +123,9 @@
/// this process' stdout/stderr. Completes with the process's exit code.
Future<int> runCommandAndStreamOutput(List<String> cmd, {
String workingDirectory,
- bool allowReentrantFlutter: false,
- String prefix: '',
- bool trace: false,
+ bool allowReentrantFlutter = false,
+ String prefix = '',
+ bool trace = false,
RegExp filter,
StringConverter mapFunction,
Map<String, String> environment
@@ -182,7 +182,7 @@
/// the exit code of the child process.
Future<int> runInteractively(List<String> command, {
String workingDirectory,
- bool allowReentrantFlutter: false,
+ bool allowReentrantFlutter = false,
Map<String, String> environment
}) async {
final Process process = await runCommand(
@@ -220,7 +220,7 @@
Future<RunResult> runAsync(List<String> cmd, {
String workingDirectory,
- bool allowReentrantFlutter: false,
+ bool allowReentrantFlutter = false,
Map<String, String> environment
}) async {
_traceCommand(cmd, workingDirectory: workingDirectory);
@@ -236,7 +236,7 @@
Future<RunResult> runCheckedAsync(List<String> cmd, {
String workingDirectory,
- bool allowReentrantFlutter: false,
+ bool allowReentrantFlutter = false,
Map<String, String> environment
}) async {
final RunResult result = await runAsync(
@@ -273,8 +273,8 @@
/// Throws an error if cmd exits with a non-zero value.
String runCheckedSync(List<String> cmd, {
String workingDirectory,
- bool allowReentrantFlutter: false,
- bool hideStdout: false,
+ bool allowReentrantFlutter = false,
+ bool hideStdout = false,
Map<String, String> environment,
}) {
return _runWithLoggingSync(
@@ -291,7 +291,7 @@
/// Run cmd and return stdout.
String runSync(List<String> cmd, {
String workingDirectory,
- bool allowReentrantFlutter: false
+ bool allowReentrantFlutter = false
}) {
return _runWithLoggingSync(
cmd,
@@ -309,12 +309,12 @@
}
String _runWithLoggingSync(List<String> cmd, {
- bool checked: false,
- bool noisyErrors: false,
- bool throwStandardErrorOnError: false,
+ bool checked = false,
+ bool noisyErrors = false,
+ bool throwStandardErrorOnError = false,
String workingDirectory,
- bool allowReentrantFlutter: false,
- bool hideStdout: false,
+ bool allowReentrantFlutter = false,
+ bool hideStdout = false,
Map<String, String> environment,
}) {
_traceCommand(cmd, workingDirectory: workingDirectory);
@@ -352,7 +352,7 @@
}
class ProcessExit implements Exception {
- ProcessExit(this.exitCode, {this.immediate: false});
+ ProcessExit(this.exitCode, {this.immediate = false});
final bool immediate;
final int exitCode;
diff --git a/packages/flutter_tools/lib/src/base/terminal.dart b/packages/flutter_tools/lib/src/base/terminal.dart
index 7990436..03d7d04 100644
--- a/packages/flutter_tools/lib/src/base/terminal.dart
+++ b/packages/flutter_tools/lib/src/base/terminal.dart
@@ -105,7 +105,7 @@
List<String> acceptedCharacters, {
String prompt,
int defaultChoiceIndex,
- bool displayAcceptedCharacters: true,
+ bool displayAcceptedCharacters = true,
Duration timeout,
}) async {
assert(acceptedCharacters != null);
diff --git a/packages/flutter_tools/lib/src/base/utils.dart b/packages/flutter_tools/lib/src/base/utils.dart
index 735ab94..aa1eaa9 100644
--- a/packages/flutter_tools/lib/src/base/utils.dart
+++ b/packages/flutter_tools/lib/src/base/utils.dart
@@ -239,7 +239,7 @@
/// - has a different initial value for the first callback delay
/// - waits for a callback to be complete before it starts the next timer
class Poller {
- Poller(this.callback, this.pollingInterval, { this.initialDelay: Duration.zero }) {
+ Poller(this.callback, this.pollingInterval, { this.initialDelay = Duration.zero }) {
new Future<Null>.delayed(initialDelay, _handleCallback);
}
diff --git a/packages/flutter_tools/lib/src/build_info.dart b/packages/flutter_tools/lib/src/build_info.dart
index 7488d5c..fbcab75 100644
--- a/packages/flutter_tools/lib/src/build_info.dart
+++ b/packages/flutter_tools/lib/src/build_info.dart
@@ -11,8 +11,8 @@
/// Information about a build to be performed or used.
class BuildInfo {
const BuildInfo(this.mode, this.flavor, {
- this.previewDart2: false,
- this.trackWidgetCreation: false,
+ this.previewDart2 = false,
+ this.trackWidgetCreation = false,
this.extraFrontEndOptions,
this.extraGenSnapshotOptions,
this.buildSharedLibrary,
diff --git a/packages/flutter_tools/lib/src/bundle.dart b/packages/flutter_tools/lib/src/bundle.dart
index 1844c67..02a6510 100644
--- a/packages/flutter_tools/lib/src/bundle.dart
+++ b/packages/flutter_tools/lib/src/bundle.dart
@@ -31,19 +31,19 @@
const String _kPlatformKernelKey = 'platform.dill';
Future<void> build({
- String mainPath: defaultMainPath,
- String manifestPath: defaultManifestPath,
+ String mainPath = defaultMainPath,
+ String manifestPath = defaultManifestPath,
String snapshotPath,
String applicationKernelFilePath,
String depfilePath,
- String privateKeyPath: defaultPrivateKeyPath,
+ String privateKeyPath = defaultPrivateKeyPath,
String assetDirPath,
String packagesPath,
- bool previewDart2 : false,
- bool precompiledSnapshot: false,
- bool reportLicensedPackages: false,
- bool trackWidgetCreation: false,
- List<String> extraFrontEndOptions: const <String>[],
+ bool previewDart2 = false,
+ bool precompiledSnapshot = false,
+ bool reportLicensedPackages = false,
+ bool trackWidgetCreation = false,
+ List<String> extraFrontEndOptions = const <String>[],
List<String> fileSystemRoots,
String fileSystemScheme,
}) async {
@@ -119,8 +119,8 @@
String manifestPath,
String assetDirPath,
String packagesPath,
- bool includeDefaultFonts: true,
- bool reportLicensedPackages: false
+ bool includeDefaultFonts = true,
+ bool reportLicensedPackages = false
}) async {
assetDirPath ??= getAssetBuildDirectory();
packagesPath ??= fs.path.absolute(PackageMap.globalPackagesPath);
@@ -145,7 +145,7 @@
DevFSContent kernelContent,
File snapshotFile,
File dylibFile,
- String privateKeyPath: defaultPrivateKeyPath,
+ String privateKeyPath = defaultPrivateKeyPath,
String assetDirPath,
}) async {
assetDirPath ??= getAssetBuildDirectory();
diff --git a/packages/flutter_tools/lib/src/commands/analyze.dart b/packages/flutter_tools/lib/src/commands/analyze.dart
index 4968cbf..42e8a32 100644
--- a/packages/flutter_tools/lib/src/commands/analyze.dart
+++ b/packages/flutter_tools/lib/src/commands/analyze.dart
@@ -10,7 +10,7 @@
import 'analyze_once.dart';
class AnalyzeCommand extends FlutterCommand {
- AnalyzeCommand({bool verboseHelp: false, this.workingDirectory}) {
+ AnalyzeCommand({bool verboseHelp = false, this.workingDirectory}) {
argParser.addFlag('flutter-repo',
negatable: false,
help: 'Include all the examples and tests from the Flutter repository.',
diff --git a/packages/flutter_tools/lib/src/commands/analyze_continuously.dart b/packages/flutter_tools/lib/src/commands/analyze_continuously.dart
index 9d83765..a31eff3 100644
--- a/packages/flutter_tools/lib/src/commands/analyze_continuously.dart
+++ b/packages/flutter_tools/lib/src/commands/analyze_continuously.dart
@@ -20,7 +20,7 @@
class AnalyzeContinuously extends AnalyzeBase {
AnalyzeContinuously(ArgResults argResults, this.repoRoots, this.repoPackages, {
- this.previewDart2: false,
+ this.previewDart2 = false,
}) : super(argResults);
final List<String> repoRoots;
diff --git a/packages/flutter_tools/lib/src/commands/analyze_once.dart b/packages/flutter_tools/lib/src/commands/analyze_once.dart
index acc3c2f..b8840a9 100644
--- a/packages/flutter_tools/lib/src/commands/analyze_once.dart
+++ b/packages/flutter_tools/lib/src/commands/analyze_once.dart
@@ -24,7 +24,7 @@
this.repoRoots,
this.repoPackages, {
this.workingDirectory,
- this.previewDart2: false,
+ this.previewDart2 = false,
}) : super(argResults);
final List<String> repoRoots;
diff --git a/packages/flutter_tools/lib/src/commands/build.dart b/packages/flutter_tools/lib/src/commands/build.dart
index b6c693a..baabf49 100644
--- a/packages/flutter_tools/lib/src/commands/build.dart
+++ b/packages/flutter_tools/lib/src/commands/build.dart
@@ -17,7 +17,7 @@
import 'build_ios.dart';
class BuildCommand extends FlutterCommand {
- BuildCommand({bool verboseHelp: false}) {
+ BuildCommand({bool verboseHelp = false}) {
addSubcommand(new BuildApkCommand(verboseHelp: verboseHelp));
addSubcommand(new BuildAotCommand(verboseHelp: verboseHelp));
addSubcommand(new BuildIOSCommand(verboseHelp: verboseHelp));
diff --git a/packages/flutter_tools/lib/src/commands/build_aot.dart b/packages/flutter_tools/lib/src/commands/build_aot.dart
index 12f8839..2d9fe92 100644
--- a/packages/flutter_tools/lib/src/commands/build_aot.dart
+++ b/packages/flutter_tools/lib/src/commands/build_aot.dart
@@ -17,7 +17,7 @@
import 'build.dart';
class BuildAotCommand extends BuildSubCommand {
- BuildAotCommand({bool verboseHelp: false}) {
+ BuildAotCommand({bool verboseHelp = false}) {
usesTargetOption();
addBuildModeFlags();
usesPubOption();
diff --git a/packages/flutter_tools/lib/src/commands/build_apk.dart b/packages/flutter_tools/lib/src/commands/build_apk.dart
index b00da40..e6e2cc5 100644
--- a/packages/flutter_tools/lib/src/commands/build_apk.dart
+++ b/packages/flutter_tools/lib/src/commands/build_apk.dart
@@ -8,7 +8,7 @@
import 'build.dart';
class BuildApkCommand extends BuildSubCommand {
- BuildApkCommand({bool verboseHelp: false}) {
+ BuildApkCommand({bool verboseHelp = false}) {
usesTargetOption();
addBuildModeFlags();
usesFlavorOption();
diff --git a/packages/flutter_tools/lib/src/commands/build_bundle.dart b/packages/flutter_tools/lib/src/commands/build_bundle.dart
index e999e3a..8114334 100644
--- a/packages/flutter_tools/lib/src/commands/build_bundle.dart
+++ b/packages/flutter_tools/lib/src/commands/build_bundle.dart
@@ -10,7 +10,7 @@
import 'build.dart';
class BuildBundleCommand extends BuildSubCommand {
- BuildBundleCommand({bool verboseHelp: false}) {
+ BuildBundleCommand({bool verboseHelp = false}) {
usesTargetOption();
argParser
..addFlag('precompiled', negatable: false)
diff --git a/packages/flutter_tools/lib/src/commands/build_flx.dart b/packages/flutter_tools/lib/src/commands/build_flx.dart
index eea83b0..14b398a 100644
--- a/packages/flutter_tools/lib/src/commands/build_flx.dart
+++ b/packages/flutter_tools/lib/src/commands/build_flx.dart
@@ -9,7 +9,7 @@
class BuildFlxCommand extends BuildSubCommand {
- BuildFlxCommand({bool verboseHelp: false});
+ BuildFlxCommand({bool verboseHelp = false});
@override
final String name = 'flx';
diff --git a/packages/flutter_tools/lib/src/commands/build_ios.dart b/packages/flutter_tools/lib/src/commands/build_ios.dart
index 397d2fa..5196e1b 100644
--- a/packages/flutter_tools/lib/src/commands/build_ios.dart
+++ b/packages/flutter_tools/lib/src/commands/build_ios.dart
@@ -13,7 +13,7 @@
import 'build.dart';
class BuildIOSCommand extends BuildSubCommand {
- BuildIOSCommand({bool verboseHelp: false}) {
+ BuildIOSCommand({bool verboseHelp = false}) {
usesTargetOption();
usesFlavorOption();
usesPubOption();
diff --git a/packages/flutter_tools/lib/src/commands/channel.dart b/packages/flutter_tools/lib/src/commands/channel.dart
index 95df08d..8161ae8 100644
--- a/packages/flutter_tools/lib/src/commands/channel.dart
+++ b/packages/flutter_tools/lib/src/commands/channel.dart
@@ -12,7 +12,7 @@
import '../version.dart';
class ChannelCommand extends FlutterCommand {
- ChannelCommand({ bool verboseHelp: false }) {
+ ChannelCommand({ bool verboseHelp = false }) {
argParser.addFlag(
'all',
abbr: 'a',
diff --git a/packages/flutter_tools/lib/src/commands/config.dart b/packages/flutter_tools/lib/src/commands/config.dart
index decbb8c..aaf28e6 100644
--- a/packages/flutter_tools/lib/src/commands/config.dart
+++ b/packages/flutter_tools/lib/src/commands/config.dart
@@ -12,7 +12,7 @@
import '../usage.dart';
class ConfigCommand extends FlutterCommand {
- ConfigCommand({ bool verboseHelp: false }) {
+ ConfigCommand({ bool verboseHelp = false }) {
argParser.addFlag('analytics',
negatable: true,
help: 'Enable or disable reporting anonymously tool usage statistics and crash reports.');
diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart
index 4f55cec..01a3259 100644
--- a/packages/flutter_tools/lib/src/commands/create.dart
+++ b/packages/flutter_tools/lib/src/commands/create.dart
@@ -305,8 +305,8 @@
String androidLanguage,
String iosLanguage,
String flutterRoot,
- bool renderDriverTest: false,
- bool withPluginHook: false,
+ bool renderDriverTest = false,
+ bool withPluginHook = false,
}) {
flutterRoot = fs.path.normalize(flutterRoot);
diff --git a/packages/flutter_tools/lib/src/commands/daemon.dart b/packages/flutter_tools/lib/src/commands/daemon.dart
index 6cdb2aa..a675722 100644
--- a/packages/flutter_tools/lib/src/commands/daemon.dart
+++ b/packages/flutter_tools/lib/src/commands/daemon.dart
@@ -37,7 +37,7 @@
/// It can be shutdown with a `daemon.shutdown` command (or by killing the
/// process).
class DaemonCommand extends FlutterCommand {
- DaemonCommand({ this.hidden: false });
+ DaemonCommand({ this.hidden = false });
@override
final String name = 'daemon';
@@ -83,7 +83,7 @@
this.sendCommand, {
this.daemonCommand,
this.notifyingLogger,
- this.logToStdout: false
+ this.logToStdout = false
}) {
// Set up domains.
_registerDomain(daemonDomain = new DaemonDomain(this));
@@ -204,7 +204,7 @@
void _send(Map<String, dynamic> map) => daemon._send(map);
- String _getStringArg(Map<String, dynamic> args, String name, { bool required: false }) {
+ String _getStringArg(Map<String, dynamic> args, String name, { bool required = false }) {
if (required && !args.containsKey(name))
throw '$name is required';
final dynamic val = args[name];
@@ -213,7 +213,7 @@
return val;
}
- bool _getBoolArg(Map<String, dynamic> args, String name, { bool required: false }) {
+ bool _getBoolArg(Map<String, dynamic> args, String name, { bool required = false }) {
if (required && !args.containsKey(name))
throw '$name is required';
final dynamic val = args[name];
@@ -222,7 +222,7 @@
return val;
}
- int _getIntArg(Map<String, dynamic> args, String name, { bool required: false }) {
+ int _getIntArg(Map<String, dynamic> args, String name, { bool required = false }) {
if (required && !args.containsKey(name))
throw '$name is required';
final dynamic val = args[name];
@@ -373,7 +373,7 @@
String projectRootPath,
String packagesFilePath,
String dillOutputPath,
- bool ipv6: false,
+ bool ipv6 = false,
}) async {
if (await device.isLocalEmulator && !options.buildInfo.supportsEmulator) {
throw '${toTitleCase(options.buildInfo.modeName)} mode is not supported for emulators.';
@@ -777,14 +777,14 @@
Stream<LogMessage> get onMessage => _messageController.stream;
@override
- void printError(String message, { StackTrace stackTrace, bool emphasis: false }) {
+ void printError(String message, { StackTrace stackTrace, bool emphasis = false }) {
_messageController.add(new LogMessage('error', message, stackTrace));
}
@override
void printStatus(
String message,
- { bool emphasis: false, bool newline: true, String ansiAlternative, int indent }
+ { bool emphasis = false, bool newline = true, String ansiAlternative, int indent }
) {
_messageController.add(new LogMessage('status', message));
}
@@ -798,8 +798,8 @@
Status startProgress(
String message, {
String progressId,
- bool expectSlowOperation: false,
- int progressIndicatorPadding: kDefaultStatusPadding,
+ bool expectSlowOperation = false,
+ int progressIndicatorPadding = kDefaultStatusPadding,
}) {
printStatus(message);
return new Status();
@@ -820,7 +820,7 @@
_AppRunLogger _logger;
- Future<OperationResult> restart({ bool fullRestart: false, bool pauseAfterRestart: false }) {
+ Future<OperationResult> restart({ bool fullRestart = false, bool pauseAfterRestart = false }) {
return runner.restart(fullRestart: fullRestart, pauseAfterRestart: pauseAfterRestart);
}
@@ -887,7 +887,7 @@
int _nextProgressId = 0;
@override
- void printError(String message, { StackTrace stackTrace, bool emphasis: false }) {
+ void printError(String message, { StackTrace stackTrace, bool emphasis = false }) {
if (parent != null) {
parent.printError(message, stackTrace: stackTrace, emphasis: emphasis);
} else {
@@ -909,7 +909,7 @@
@override
void printStatus(
String message, {
- bool emphasis: false, bool newline: true, String ansiAlternative, int indent
+ bool emphasis = false, bool newline = true, String ansiAlternative, int indent
}) {
if (parent != null) {
parent.printStatus(message, emphasis: emphasis, newline: newline,
@@ -934,8 +934,8 @@
Status startProgress(
String message, {
String progressId,
- bool expectSlowOperation: false,
- int progressIndicatorPadding: 52,
+ bool expectSlowOperation = false,
+ int progressIndicatorPadding = 52,
}) {
// Ignore nested progresses; return a no-op status object.
if (_status != null)
diff --git a/packages/flutter_tools/lib/src/commands/doctor.dart b/packages/flutter_tools/lib/src/commands/doctor.dart
index b441c20..0dd0b80 100644
--- a/packages/flutter_tools/lib/src/commands/doctor.dart
+++ b/packages/flutter_tools/lib/src/commands/doctor.dart
@@ -8,7 +8,7 @@
import '../runner/flutter_command.dart';
class DoctorCommand extends FlutterCommand {
- DoctorCommand({this.verbose: false}) {
+ DoctorCommand({this.verbose = false}) {
argParser.addFlag('android-licenses',
defaultsTo: false,
negatable: false,
diff --git a/packages/flutter_tools/lib/src/commands/fuchsia_reload.dart b/packages/flutter_tools/lib/src/commands/fuchsia_reload.dart
index 47e0323..17723c5 100644
--- a/packages/flutter_tools/lib/src/commands/fuchsia_reload.dart
+++ b/packages/flutter_tools/lib/src/commands/fuchsia_reload.dart
@@ -196,7 +196,7 @@
static const String _bold = '\u001B[0;1m';
static const String _reset = '\u001B[0m';
- String _vmServiceToString(VMService vmService, {int tabDepth: 0}) {
+ String _vmServiceToString(VMService vmService, {int tabDepth = 0}) {
final Uri addr = vmService.httpAddress;
final String embedder = vmService.vm.embedder;
final int numIsolates = vmService.vm.isolates.length;
@@ -237,7 +237,7 @@
return stringBuffer.toString();
}
- String _isolateToString(Isolate isolate, {int tabDepth: 0}) {
+ String _isolateToString(Isolate isolate, {int tabDepth = 0}) {
final Uri vmServiceAddr = isolate.owner.vmService.httpAddress;
final String name = isolate.name;
final String shortName = name.substring(0, name.indexOf('\$'));
diff --git a/packages/flutter_tools/lib/src/commands/ide_config.dart b/packages/flutter_tools/lib/src/commands/ide_config.dart
index 048bebe..ffae001 100644
--- a/packages/flutter_tools/lib/src/commands/ide_config.dart
+++ b/packages/flutter_tools/lib/src/commands/ide_config.dart
@@ -12,7 +12,7 @@
import '../template.dart';
class IdeConfigCommand extends FlutterCommand {
- IdeConfigCommand({this.hidden: false}) {
+ IdeConfigCommand({this.hidden = false}) {
argParser.addFlag(
'overwrite',
negatable: true,
diff --git a/packages/flutter_tools/lib/src/commands/inject_plugins.dart b/packages/flutter_tools/lib/src/commands/inject_plugins.dart
index 6886937..8d8b47c 100644
--- a/packages/flutter_tools/lib/src/commands/inject_plugins.dart
+++ b/packages/flutter_tools/lib/src/commands/inject_plugins.dart
@@ -9,7 +9,7 @@
import '../runner/flutter_command.dart';
class InjectPluginsCommand extends FlutterCommand {
- InjectPluginsCommand({ this.hidden: false }) {
+ InjectPluginsCommand({ this.hidden = false }) {
requiresPubspecYaml();
}
diff --git a/packages/flutter_tools/lib/src/commands/install.dart b/packages/flutter_tools/lib/src/commands/install.dart
index edc6959..c2fcc58 100644
--- a/packages/flutter_tools/lib/src/commands/install.dart
+++ b/packages/flutter_tools/lib/src/commands/install.dart
@@ -45,7 +45,7 @@
}
}
-Future<bool> installApp(Device device, ApplicationPackage package, { bool uninstall: true }) async {
+Future<bool> installApp(Device device, ApplicationPackage package, { bool uninstall = true }) async {
if (package == null)
return false;
diff --git a/packages/flutter_tools/lib/src/commands/run.dart b/packages/flutter_tools/lib/src/commands/run.dart
index 7a21158..2fb8efe 100644
--- a/packages/flutter_tools/lib/src/commands/run.dart
+++ b/packages/flutter_tools/lib/src/commands/run.dart
@@ -79,7 +79,7 @@
@override
final String description = 'Run your Flutter app on an attached device.';
- RunCommand({ bool verboseHelp: false }) {
+ RunCommand({ bool verboseHelp = false }) {
requiresPubspecYaml();
argParser
diff --git a/packages/flutter_tools/lib/src/commands/test.dart b/packages/flutter_tools/lib/src/commands/test.dart
index 88ea238..a9252d2 100644
--- a/packages/flutter_tools/lib/src/commands/test.dart
+++ b/packages/flutter_tools/lib/src/commands/test.dart
@@ -20,7 +20,7 @@
import '../test/watcher.dart';
class TestCommand extends FlutterCommand {
- TestCommand({ bool verboseHelp: false }) {
+ TestCommand({ bool verboseHelp = false }) {
requiresPubspecYaml();
usesPubOption();
argParser
@@ -92,7 +92,7 @@
@override
String get description => 'Run Flutter unit tests for the current project.';
- Future<bool> _collectCoverageData(CoverageCollector collector, { bool mergeCoverageData: false }) async {
+ Future<bool> _collectCoverageData(CoverageCollector collector, { bool mergeCoverageData = false }) async {
final Status status = logger.startProgress('Collecting coverage information...');
final String coverageData = await collector.finalizeCoverage(
timeout: const Duration(seconds: 30),
diff --git a/packages/flutter_tools/lib/src/commands/update_packages.dart b/packages/flutter_tools/lib/src/commands/update_packages.dart
index 4c98e2b..5e4ce4c 100644
--- a/packages/flutter_tools/lib/src/commands/update_packages.dart
+++ b/packages/flutter_tools/lib/src/commands/update_packages.dart
@@ -31,7 +31,7 @@
};
class UpdatePackagesCommand extends FlutterCommand {
- UpdatePackagesCommand({ this.hidden: false }) {
+ UpdatePackagesCommand({ this.hidden = false }) {
argParser
..addFlag(
'force-upgrade',
diff --git a/packages/flutter_tools/lib/src/compile.dart b/packages/flutter_tools/lib/src/compile.dart
index dc065d6..396aa98 100644
--- a/packages/flutter_tools/lib/src/compile.dart
+++ b/packages/flutter_tools/lib/src/compile.dart
@@ -27,7 +27,7 @@
}
class _StdoutHandler {
- _StdoutHandler({this.consumer: printError}) {
+ _StdoutHandler({this.consumer = printError}) {
reset();
}
@@ -71,10 +71,10 @@
String mainPath,
String outputFilePath,
String depFilePath,
- bool linkPlatformKernelIn: false,
- bool aot: false,
+ bool linkPlatformKernelIn = false,
+ bool aot = false,
List<String> entryPointsJsonFiles,
- bool trackWidgetCreation: false,
+ bool trackWidgetCreation = false,
List<String> extraFrontEndOptions,
String incrementalCompilerByteStorePath,
String packagesPath,
@@ -192,9 +192,9 @@
/// The wrapper is intended to stay resident in memory as user changes, reloads,
/// restarts the Flutter app.
class ResidentCompiler {
- ResidentCompiler(this._sdkRoot, {bool trackWidgetCreation: false,
+ ResidentCompiler(this._sdkRoot, {bool trackWidgetCreation = false,
String packagesPath, List<String> fileSystemRoots, String fileSystemScheme ,
- CompilerMessageConsumer compilerMessageConsumer: printError})
+ CompilerMessageConsumer compilerMessageConsumer = printError})
: assert(_sdkRoot != null),
_trackWidgetCreation = trackWidgetCreation,
_packagesPath = packagesPath,
diff --git a/packages/flutter_tools/lib/src/dart/analysis.dart b/packages/flutter_tools/lib/src/dart/analysis.dart
index 09d2425..65e6d10 100644
--- a/packages/flutter_tools/lib/src/dart/analysis.dart
+++ b/packages/flutter_tools/lib/src/dart/analysis.dart
@@ -13,7 +13,7 @@
import '../globals.dart';
class AnalysisServer {
- AnalysisServer(this.sdkPath, this.directories, {this.previewDart2: false});
+ AnalysisServer(this.sdkPath, this.directories, {this.previewDart2 = false});
final String sdkPath;
final List<String> directories;
diff --git a/packages/flutter_tools/lib/src/dart/pub.dart b/packages/flutter_tools/lib/src/dart/pub.dart
index bbbbf92..d633374 100644
--- a/packages/flutter_tools/lib/src/dart/pub.dart
+++ b/packages/flutter_tools/lib/src/dart/pub.dart
@@ -72,10 +72,10 @@
Future<Null> pubGet({
@required PubContext context,
String directory,
- bool skipIfAbsent: false,
- bool upgrade: false,
- bool offline: false,
- bool checkLastModified: true
+ bool skipIfAbsent = false,
+ bool upgrade = false,
+ bool offline = false,
+ bool checkLastModified = true
}) async {
directory ??= fs.currentDirectory.path;
@@ -137,7 +137,7 @@
@required PubContext context,
String directory,
MessageFilter filter,
- String failureMessage: 'pub failed',
+ String failureMessage = 'pub failed',
@required bool retry,
bool showTraceForErrors,
}) async {
diff --git a/packages/flutter_tools/lib/src/devfs.dart b/packages/flutter_tools/lib/src/devfs.dart
index eaf1248..846b7de 100644
--- a/packages/flutter_tools/lib/src/devfs.dart
+++ b/packages/flutter_tools/lib/src/devfs.dart
@@ -403,12 +403,12 @@
String target,
AssetBundle bundle,
DateTime firstBuildTime,
- bool bundleFirstUpload: false,
- bool bundleDirty: false,
+ bool bundleFirstUpload = false,
+ bool bundleDirty = false,
Set<String> fileFilter,
ResidentCompiler generator,
String dillOutputPath,
- bool fullRestart: false,
+ bool fullRestart = false,
String projectRootPath,
}) async {
// Mark all entries as possibly deleted.
@@ -575,7 +575,7 @@
bool _shouldSkip(FileSystemEntity file,
String relativePath,
Uri directoryUriOnDevice, {
- bool ignoreDotFiles: true,
+ bool ignoreDotFiles = true,
}) {
if (file is Directory) {
// Skip non-files.
@@ -609,7 +609,7 @@
Future<bool> _scanFilteredDirectory(Set<String> fileFilter,
Directory directory,
{Uri directoryUriOnDevice,
- bool ignoreDotFiles: true}) async {
+ bool ignoreDotFiles = true}) async {
directoryUriOnDevice =
_directoryUriOnDevice(directoryUriOnDevice, directory);
try {
@@ -640,8 +640,8 @@
/// Scan all files in [directory] that pass various filters (e.g. ignoreDotFiles).
Future<bool> _scanDirectory(Directory directory,
{Uri directoryUriOnDevice,
- bool recursive: false,
- bool ignoreDotFiles: true,
+ bool recursive = false,
+ bool ignoreDotFiles = true,
Set<String> fileFilter}) async {
directoryUriOnDevice = _directoryUriOnDevice(directoryUriOnDevice, directory);
if ((fileFilter != null) && fileFilter.isNotEmpty) {
diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart
index dd7475c..108a439 100644
--- a/packages/flutter_tools/lib/src/device.dart
+++ b/packages/flutter_tools/lib/src/device.dart
@@ -263,10 +263,10 @@
String route,
DebuggingOptions debuggingOptions,
Map<String, dynamic> platformArgs,
- bool prebuiltApplication: false,
- bool applicationNeedsRebuild: false,
- bool usesTerminalUi: true,
- bool ipv6: false,
+ bool prebuiltApplication = false,
+ bool applicationNeedsRebuild = false,
+ bool usesTerminalUi = true,
+ bool ipv6 = false,
});
/// Does this device implement support for hot reloading / restarting?
@@ -339,11 +339,11 @@
class DebuggingOptions {
DebuggingOptions.enabled(this.buildInfo, {
- this.startPaused: false,
- this.enableSoftwareRendering: false,
- this.skiaDeterministicRendering: false,
- this.traceSkia: false,
- this.useTestFonts: false,
+ this.startPaused = false,
+ this.enableSoftwareRendering = false,
+ this.skiaDeterministicRendering = false,
+ this.traceSkia = false,
+ this.useTestFonts = false,
this.observatoryPort,
}) : debuggingEnabled = true;
diff --git a/packages/flutter_tools/lib/src/doctor.dart b/packages/flutter_tools/lib/src/doctor.dart
index 3453216..9d9dc90 100644
--- a/packages/flutter_tools/lib/src/doctor.dart
+++ b/packages/flutter_tools/lib/src/doctor.dart
@@ -132,7 +132,7 @@
}
/// Print information about the state of installed tooling.
- Future<bool> diagnose({ bool androidLicenses: false, bool verbose: true }) async {
+ Future<bool> diagnose({ bool androidLicenses = false, bool verbose = true }) async {
if (androidLicenses)
return AndroidWorkflow.runLicenseManager();
diff --git a/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart b/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
index a664356..f6cb30f 100644
--- a/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
+++ b/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
@@ -64,10 +64,10 @@
String route,
DebuggingOptions debuggingOptions,
Map<String, dynamic> platformArgs,
- bool prebuiltApplication: false,
- bool applicationNeedsRebuild: false,
- bool usesTerminalUi: false,
- bool ipv6: false,
+ bool prebuiltApplication = false,
+ bool applicationNeedsRebuild = false,
+ bool usesTerminalUi = false,
+ bool ipv6 = false,
}) => new Future<Null>.error('unimplemented');
@override
diff --git a/packages/flutter_tools/lib/src/globals.dart b/packages/flutter_tools/lib/src/globals.dart
index f4beb35..b36eb1b 100644
--- a/packages/flutter_tools/lib/src/globals.dart
+++ b/packages/flutter_tools/lib/src/globals.dart
@@ -17,7 +17,7 @@
/// fail in some way.
///
/// Set `emphasis` to true to make the output bold if it's supported.
-void printError(String message, { StackTrace stackTrace, bool emphasis: false }) {
+void printError(String message, { StackTrace stackTrace, bool emphasis = false }) {
logger.printError(message, stackTrace: stackTrace, emphasis: emphasis);
}
@@ -35,7 +35,7 @@
/// whitespaces.
void printStatus(
String message,
- { bool emphasis: false, bool newline: true, String ansiAlternative, int indent }) {
+ { bool emphasis = false, bool newline = true, String ansiAlternative, int indent }) {
logger.printStatus(
message,
emphasis: emphasis,
diff --git a/packages/flutter_tools/lib/src/ios/cocoapods.dart b/packages/flutter_tools/lib/src/ios/cocoapods.dart
index f064319..40b6e2b 100644
--- a/packages/flutter_tools/lib/src/ios/cocoapods.dart
+++ b/packages/flutter_tools/lib/src/ios/cocoapods.dart
@@ -83,8 +83,8 @@
@required Directory appIosDirectory,
// For backward compatibility with previously created Podfile only.
@required String iosEngineDir,
- bool isSwift: false,
- bool dependenciesChanged: true,
+ bool isSwift = false,
+ bool dependenciesChanged = true,
}) async {
if (!(await appIosDirectory.childFile('Podfile').exists())) {
throwToolExit('Podfile missing');
diff --git a/packages/flutter_tools/lib/src/ios/code_signing.dart b/packages/flutter_tools/lib/src/ios/code_signing.dart
index 2e1d5c2..0b3ed8e 100644
--- a/packages/flutter_tools/lib/src/ios/code_signing.dart
+++ b/packages/flutter_tools/lib/src/ios/code_signing.dart
@@ -90,7 +90,7 @@
/// project has a development team set in the project's build settings.
Future<Map<String, String>> getCodeSigningIdentityDevelopmentTeam({
BuildableIOSApp iosApp,
- bool usesTerminalUi: true
+ bool usesTerminalUi = true
}) async{
if (iosApp.buildSettings == null)
return null;
diff --git a/packages/flutter_tools/lib/src/ios/devices.dart b/packages/flutter_tools/lib/src/ios/devices.dart
index 563ef8e..abc212b 100644
--- a/packages/flutter_tools/lib/src/ios/devices.dart
+++ b/packages/flutter_tools/lib/src/ios/devices.dart
@@ -154,10 +154,10 @@
String route,
DebuggingOptions debuggingOptions,
Map<String, dynamic> platformArgs,
- bool prebuiltApplication: false,
- bool applicationNeedsRebuild: false,
- bool usesTerminalUi: true,
- bool ipv6: false,
+ bool prebuiltApplication = false,
+ bool applicationNeedsRebuild = false,
+ bool usesTerminalUi = true,
+ bool ipv6 = false,
}) async {
if (!prebuiltApplication) {
// TODO(chinmaygarde): Use mainPath, route.
diff --git a/packages/flutter_tools/lib/src/ios/mac.dart b/packages/flutter_tools/lib/src/ios/mac.dart
index c4c1453..3d49c80 100644
--- a/packages/flutter_tools/lib/src/ios/mac.dart
+++ b/packages/flutter_tools/lib/src/ios/mac.dart
@@ -190,8 +190,8 @@
BuildInfo buildInfo,
String targetOverride,
bool buildForDevice,
- bool codesign: true,
- bool usesTerminalUi: true,
+ bool codesign = true,
+ bool usesTerminalUi = true,
}) async {
if (!await upgradePbxProjWithFlutterAssets(app.name, app.appDirectory))
return new XcodeBuildResult(success: false);
diff --git a/packages/flutter_tools/lib/src/ios/simulators.dart b/packages/flutter_tools/lib/src/ios/simulators.dart
index 84a5d91..edd3404 100644
--- a/packages/flutter_tools/lib/src/ios/simulators.dart
+++ b/packages/flutter_tools/lib/src/ios/simulators.dart
@@ -274,10 +274,10 @@
String route,
DebuggingOptions debuggingOptions,
Map<String, dynamic> platformArgs,
- bool prebuiltApplication: false,
- bool applicationNeedsRebuild: false,
- bool usesTerminalUi: true,
- bool ipv6: false,
+ bool prebuiltApplication = false,
+ bool applicationNeedsRebuild = false,
+ bool usesTerminalUi = true,
+ bool ipv6 = false,
}) async {
if (!prebuiltApplication) {
printTrace('Building ${package.name} for $id.');
diff --git a/packages/flutter_tools/lib/src/protocol_discovery.dart b/packages/flutter_tools/lib/src/protocol_discovery.dart
index e3320af..a1f849d 100644
--- a/packages/flutter_tools/lib/src/protocol_discovery.dart
+++ b/packages/flutter_tools/lib/src/protocol_discovery.dart
@@ -30,7 +30,7 @@
DeviceLogReader logReader, {
DevicePortForwarder portForwarder,
int hostPort,
- bool ipv6: false,
+ bool ipv6 = false,
}) {
const String kObservatoryService = 'Observatory';
return new ProtocolDiscovery._(
diff --git a/packages/flutter_tools/lib/src/resident_runner.dart b/packages/flutter_tools/lib/src/resident_runner.dart
index 0889174..5265114 100644
--- a/packages/flutter_tools/lib/src/resident_runner.dart
+++ b/packages/flutter_tools/lib/src/resident_runner.dart
@@ -137,7 +137,7 @@
List<Future<Map<String, dynamic>>> reloadSources(
String entryPath, {
- bool pause: false
+ bool pause = false
}) {
final Uri deviceEntryUri = devFS.baseUri.resolveUri(fs.path.toUri(entryPath));
final Uri devicePackagesUri = devFS.baseUri.resolve('.packages');
@@ -313,7 +313,7 @@
Future<int> runCold({
ColdRunner coldRunner,
String route,
- bool shouldBuild: true,
+ bool shouldBuild = true,
}) async {
final TargetPlatform targetPlatform = await device.targetPlatform;
package = await getApplicationPackageForPlatform(
@@ -373,10 +373,10 @@
String target,
AssetBundle bundle,
DateTime firstBuildTime,
- bool bundleFirstUpload: false,
- bool bundleDirty: false,
+ bool bundleFirstUpload = false,
+ bool bundleDirty = false,
Set<String> fileFilter,
- bool fullRestart: false,
+ bool fullRestart = false,
String projectRootPath,
}) async {
final Status devFSStatus = logger.startProgress(
@@ -420,7 +420,7 @@
ResidentRunner(this.flutterDevices, {
this.target,
this.debuggingOptions,
- this.usesTerminalUI: true,
+ this.usesTerminalUI = true,
String projectRootPath,
String packagesFilePath,
this.stayResident,
@@ -460,12 +460,12 @@
Completer<DebugConnectionInfo> connectionInfoCompleter,
Completer<Null> appStartedCompleter,
String route,
- bool shouldBuild: true
+ bool shouldBuild = true
});
bool get supportsRestart => false;
- Future<OperationResult> restart({ bool fullRestart: false, bool pauseAfterRestart: false }) {
+ Future<OperationResult> restart({ bool fullRestart = false, bool pauseAfterRestart = false }) {
throw 'unsupported';
}
diff --git a/packages/flutter_tools/lib/src/run_cold.dart b/packages/flutter_tools/lib/src/run_cold.dart
index 20872b5..9e5958e 100644
--- a/packages/flutter_tools/lib/src/run_cold.dart
+++ b/packages/flutter_tools/lib/src/run_cold.dart
@@ -17,11 +17,11 @@
List<FlutterDevice> devices, {
String target,
DebuggingOptions debuggingOptions,
- bool usesTerminalUI: true,
- this.traceStartup: false,
+ bool usesTerminalUI = true,
+ this.traceStartup = false,
this.applicationBinary,
- bool stayResident: true,
- bool ipv6: false,
+ bool stayResident = true,
+ bool ipv6 = false,
}) : super(devices,
target: target,
debuggingOptions: debuggingOptions,
@@ -37,7 +37,7 @@
Completer<DebugConnectionInfo> connectionInfoCompleter,
Completer<Null> appStartedCompleter,
String route,
- bool shouldBuild: true
+ bool shouldBuild = true
}) async {
final bool prebuiltMode = applicationBinary != null;
if (!prebuiltMode) {
diff --git a/packages/flutter_tools/lib/src/run_hot.dart b/packages/flutter_tools/lib/src/run_hot.dart
index 6c98710..77be01f 100644
--- a/packages/flutter_tools/lib/src/run_hot.dart
+++ b/packages/flutter_tools/lib/src/run_hot.dart
@@ -36,15 +36,15 @@
List<FlutterDevice> devices, {
String target,
DebuggingOptions debuggingOptions,
- bool usesTerminalUI: true,
- this.benchmarkMode: false,
+ bool usesTerminalUI = true,
+ this.benchmarkMode = false,
this.applicationBinary,
- this.hostIsIde: false,
+ this.hostIsIde = false,
String projectRootPath,
String packagesFilePath,
this.dillOutputPath,
- bool stayResident: true,
- bool ipv6: false,
+ bool stayResident = true,
+ bool ipv6 = false,
}) : super(devices,
target: target,
debuggingOptions: debuggingOptions,
@@ -94,7 +94,7 @@
}
Future<Null> _reloadSourcesService(String isolateId,
- { bool force: false, bool pause: false }) async {
+ { bool force = false, bool pause = false }) async {
// TODO(cbernaschina): check that isolateId is the id of the UI isolate.
final OperationResult result = await restart(pauseAfterRestart: pause);
if (!result.isOk) {
@@ -194,7 +194,7 @@
Completer<DebugConnectionInfo> connectionInfoCompleter,
Completer<Null> appStartedCompleter,
String route,
- bool shouldBuild: true
+ bool shouldBuild = true
}) async {
if (!fs.isFileSync(mainPath)) {
String message = 'Tried to run $mainPath, but that file does not exist.';
@@ -256,7 +256,7 @@
return devFSUris;
}
- Future<bool> _updateDevFS({ bool fullRestart: false }) async {
+ Future<bool> _updateDevFS({ bool fullRestart = false }) async {
if (!_refreshDartDependencies()) {
// Did not update DevFS because of a Dart source error.
return false;
@@ -411,7 +411,7 @@
/// Returns [true] if the reload was successful.
/// Prints errors if [printErrors] is [true].
static bool validateReloadReport(Map<String, dynamic> reloadReport,
- { bool printErrors: true }) {
+ { bool printErrors = true }) {
if (reloadReport == null) {
if (printErrors)
printError('Hot reload did not receive reload report.');
@@ -449,7 +449,7 @@
bool get supportsRestart => true;
@override
- Future<OperationResult> restart({ bool fullRestart: false, bool pauseAfterRestart: false }) async {
+ Future<OperationResult> restart({ bool fullRestart = false, bool pauseAfterRestart = false }) async {
if (fullRestart) {
final Status status = logger.startProgress(
'Performing hot restart...',
@@ -498,7 +498,7 @@
return path;
}
- Future<OperationResult> _reloadSources({ bool pause: false }) async {
+ Future<OperationResult> _reloadSources({ bool pause = false }) async {
for (FlutterDevice device in flutterDevices) {
for (FlutterView view in device.views) {
if (view.uiIsolate == null)
diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart
index fb9802d..ad85b9c 100644
--- a/packages/flutter_tools/lib/src/runner/flutter_command.dart
+++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart
@@ -141,7 +141,7 @@
valueHelp: 'x.y.z');
}
- void addBuildModeFlags({bool defaultToRelease: true}) {
+ void addBuildModeFlags({bool defaultToRelease = true}) {
defaultBuildMode = defaultToRelease ? BuildMode.release : BuildMode.debug;
argParser.addFlag('debug',
diff --git a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
index 37567f1..26dcd4f 100644
--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
+++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
@@ -38,7 +38,7 @@
const String kFlutterEnginePackageName = 'sky_engine';
class FlutterCommandRunner extends CommandRunner<Null> {
- FlutterCommandRunner({ bool verboseHelp: false }) : super(
+ FlutterCommandRunner({ bool verboseHelp = false }) : super(
'flutter',
'Manage your Flutter app development.\n'
'\n'
diff --git a/packages/flutter_tools/lib/src/template.dart b/packages/flutter_tools/lib/src/template.dart
index a2fa206..71c47ba 100644
--- a/packages/flutter_tools/lib/src/template.dart
+++ b/packages/flutter_tools/lib/src/template.dart
@@ -65,7 +65,7 @@
int render(
Directory destination,
Map<String, dynamic> context, {
- bool overwriteExisting: true,
+ bool overwriteExisting = true,
}) {
destination.createSync(recursive: true);
int fileCount = 0;
diff --git a/packages/flutter_tools/lib/src/test/flutter_platform.dart b/packages/flutter_tools/lib/src/test/flutter_platform.dart
index d20c1ec..81948ae 100644
--- a/packages/flutter_tools/lib/src/test/flutter_platform.dart
+++ b/packages/flutter_tools/lib/src/test/flutter_platform.dart
@@ -64,16 +64,16 @@
void installHook({
@required String shellPath,
TestWatcher watcher,
- bool enableObservatory: false,
- bool machine: false,
- bool startPaused: false,
- bool previewDart2: false,
- int port: 0,
+ bool enableObservatory = false,
+ bool machine = false,
+ bool startPaused = false,
+ bool previewDart2 = false,
+ int port = 0,
String precompiledDillPath,
- bool trackWidgetCreation: false,
- bool updateGoldens: false,
+ bool trackWidgetCreation = false,
+ bool updateGoldens = false,
int observatoryPort,
- InternetAddressType serverType: InternetAddressType.IP_V4, // ignore: deprecated_member_use
+ InternetAddressType serverType = InternetAddressType.IP_V4, // ignore: deprecated_member_use
}) {
assert(!enableObservatory || (!startPaused && observatoryPort == null));
hack.registerPlatformPlugin(
@@ -114,7 +114,7 @@
@required Uri testUrl,
@required InternetAddress host,
File testConfigFile,
- bool updateGoldens: false,
+ bool updateGoldens = false,
}) {
assert(testUrl != null);
assert(host != null);
@@ -771,8 +771,8 @@
String testPath, {
String packages,
String bundlePath,
- bool enableObservatory: false,
- bool startPaused: false,
+ bool enableObservatory = false,
+ bool startPaused = false,
int observatoryPort,
int serverPort,
}) {
diff --git a/packages/flutter_tools/lib/src/test/runner.dart b/packages/flutter_tools/lib/src/test/runner.dart
index 0805662..384d64c 100644
--- a/packages/flutter_tools/lib/src/test/runner.dart
+++ b/packages/flutter_tools/lib/src/test/runner.dart
@@ -23,15 +23,15 @@
Future<int> runTests(
List<String> testFiles, {
Directory workDir,
- List<String> names: const <String>[],
- List<String> plainNames: const <String>[],
- bool enableObservatory: false,
- bool startPaused: false,
- bool ipv6: false,
- bool machine: false,
- bool previewDart2: false,
- bool trackWidgetCreation: false,
- bool updateGoldens: false,
+ List<String> names = const <String>[],
+ List<String> plainNames = const <String>[],
+ bool enableObservatory = false,
+ bool startPaused = false,
+ bool ipv6 = false,
+ bool machine = false,
+ bool previewDart2 = false,
+ bool trackWidgetCreation = false,
+ bool updateGoldens = false,
TestWatcher watcher,
}) async {
if (trackWidgetCreation && !previewDart2) {
diff --git a/packages/flutter_tools/lib/src/tester/flutter_tester.dart b/packages/flutter_tools/lib/src/tester/flutter_tester.dart
index c318941..53f67fa 100644
--- a/packages/flutter_tools/lib/src/tester/flutter_tester.dart
+++ b/packages/flutter_tools/lib/src/tester/flutter_tester.dart
@@ -94,10 +94,10 @@
String route,
@required DebuggingOptions debuggingOptions,
Map<String, dynamic> platformArgs,
- bool prebuiltApplication: false,
- bool applicationNeedsRebuild: false,
- bool usesTerminalUi: true,
- bool ipv6: false,
+ bool prebuiltApplication = false,
+ bool applicationNeedsRebuild = false,
+ bool usesTerminalUi = true,
+ bool ipv6 = false,
}) async {
final BuildInfo buildInfo = debuggingOptions.buildInfo;
diff --git a/packages/flutter_tools/lib/src/tracing.dart b/packages/flutter_tools/lib/src/tracing.dart
index 0c4b5c0..79ebc69 100644
--- a/packages/flutter_tools/lib/src/tracing.dart
+++ b/packages/flutter_tools/lib/src/tracing.dart
@@ -32,7 +32,7 @@
/// Stops tracing; optionally wait for first frame.
Future<Map<String, dynamic>> stopTracingAndDownloadTimeline({
- bool waitForFirstFrame: false
+ bool waitForFirstFrame = false
}) async {
Map<String, dynamic> timeline;
diff --git a/packages/flutter_tools/lib/src/usage.dart b/packages/flutter_tools/lib/src/usage.dart
index 1202a19..06b2d4b 100644
--- a/packages/flutter_tools/lib/src/usage.dart
+++ b/packages/flutter_tools/lib/src/usage.dart
@@ -22,7 +22,7 @@
class Usage {
/// Create a new Usage instance; [versionOverride] and [configDirOverride] are
/// used for testing.
- Usage({ String settingsName: 'flutter', String versionOverride, String configDirOverride}) {
+ Usage({ String settingsName = 'flutter', String versionOverride, String configDirOverride}) {
final FlutterVersion flutterVersion = FlutterVersion.instance;
final String version = versionOverride ?? flutterVersion.getVersionString(redactUnknownBranches: true);
_analytics = new AnalyticsIO(_kFlutterUA, settingsName, version,
diff --git a/packages/flutter_tools/lib/src/version.dart b/packages/flutter_tools/lib/src/version.dart
index 520ee98..40d3b94 100644
--- a/packages/flutter_tools/lib/src/version.dart
+++ b/packages/flutter_tools/lib/src/version.dart
@@ -170,7 +170,7 @@
static FlutterVersion get instance => context[FlutterVersion];
/// Return a short string for the version (e.g. `master/0.0.59-pre.92`, `scroll_refactor/a76bc8e22b`).
- String getVersionString({bool redactUnknownBranches: false}) {
+ String getVersionString({bool redactUnknownBranches = false}) {
if (frameworkVersion != 'unknown')
return '${getBranchName(redactUnknownBranches: redactUnknownBranches)}/$frameworkVersion';
return '${getBranchName(redactUnknownBranches: redactUnknownBranches)}/$frameworkRevisionShort';
@@ -180,7 +180,7 @@
///
/// If [redactUnknownBranches] is true and the branch is unknown,
/// the branch name will be returned as `'[user-branch]'`.
- String getBranchName({ bool redactUnknownBranches: false }) {
+ String getBranchName({ bool redactUnknownBranches = false }) {
if (redactUnknownBranches || _branch.isEmpty) {
// Only return the branch names we know about; arbitrary branch names might contain PII.
if (!officialChannels.contains(_branch) && !obsoleteBranches.containsKey(_branch))
@@ -429,7 +429,7 @@
///
/// If [lenient] is true and the command fails, returns an empty string.
/// Otherwise, throws a [ToolExit] exception.
-String _runSync(List<String> command, {bool lenient: true}) {
+String _runSync(List<String> command, {bool lenient = true}) {
final ProcessResult results = processManager.runSync(command, workingDirectory: Cache.flutterRoot);
if (results.exitCode == 0)
diff --git a/packages/flutter_tools/lib/src/vmservice.dart b/packages/flutter_tools/lib/src/vmservice.dart
index 642c174..88420de 100644
--- a/packages/flutter_tools/lib/src/vmservice.dart
+++ b/packages/flutter_tools/lib/src/vmservice.dart
@@ -178,7 +178,7 @@
/// See: https://github.com/dart-lang/sdk/commit/df8bf384eb815cf38450cb50a0f4b62230fba217
static Future<VMService> connect(
Uri httpUri, {
- Duration requestTimeout: kDefaultRequestTimeout,
+ Duration requestTimeout = kDefaultRequestTimeout,
ReloadSources reloadSources,
}) async {
final Uri wsUri = httpUri.replace(scheme: 'ws', path: fs.path.join(httpUri.path, 'ws'));
@@ -774,9 +774,9 @@
/// If `timeoutFatal` is false, then a timeout will result in a null return
/// value. Otherwise, it results in an exception.
Future<Map<String, dynamic>> invokeRpcRaw(String method, {
- Map<String, dynamic> params: const <String, dynamic>{},
+ Map<String, dynamic> params = const <String, dynamic>{},
Duration timeout,
- bool timeoutFatal: true,
+ bool timeoutFatal = true,
}) async {
printTrace('$method: $params');
@@ -804,7 +804,7 @@
/// Invoke the RPC and return a [ServiceObject] response.
Future<ServiceObject> invokeRpc(String method, {
- Map<String, dynamic> params: const <String, dynamic>{},
+ Map<String, dynamic> params = const <String, dynamic>{},
Duration timeout,
}) async {
final Map<String, dynamic> response = await invokeRpcRaw(
@@ -1043,7 +1043,7 @@
Future<Map<String, dynamic>> invokeRpcRaw(String method, {
Map<String, dynamic> params,
Duration timeout,
- bool timeoutFatal: true,
+ bool timeoutFatal = true,
}) {
// Inject the 'isolateId' parameter.
if (params == null) {
@@ -1087,7 +1087,7 @@
static const int kIsolateReloadBarred = 1005;
Future<Map<String, dynamic>> reloadSources(
- { bool pause: false,
+ { bool pause = false,
Uri rootLibUri,
Uri packagesUri}) async {
try {
@@ -1178,7 +1178,7 @@
String method, {
Map<String, dynamic> params,
Duration timeout,
- bool timeoutFatal: true,
+ bool timeoutFatal = true,
}
) async {
try {