Trivial nit fixes (#12285)
diff --git a/packages/flutter_tools/lib/src/base/terminal.dart b/packages/flutter_tools/lib/src/base/terminal.dart index aace3b0..3ec32e9f 100644 --- a/packages/flutter_tools/lib/src/base/terminal.dart +++ b/packages/flutter_tools/lib/src/base/terminal.dart
@@ -118,11 +118,7 @@ } String choice; singleCharMode = true; - while( - isEmpty(choice) - || choice.length != 1 - || !acceptedCharacters.contains(choice) - ) { + while (isEmpty(choice) || choice.length != 1 || !acceptedCharacters.contains(choice)) { if (isNotEmpty(prompt)) { printStatus(prompt, emphasis: true, newline: false); if (displayAcceptedCharacters)
diff --git a/packages/flutter_tools/lib/src/commands/analyze_base.dart b/packages/flutter_tools/lib/src/commands/analyze_base.dart index fc8c8b5..daebe97 100644 --- a/packages/flutter_tools/lib/src/commands/analyze_base.dart +++ b/packages/flutter_tools/lib/src/commands/analyze_base.dart
@@ -53,8 +53,8 @@ bool get isBenchmarking => argResults['benchmark']; } -/// Return `true` if [fileList] contains a path that resides inside the Flutter repository. -/// If [fileList] is empty, then return `true` if the current directory resides inside the Flutter repository. +/// Return true if [fileList] contains a path that resides inside the Flutter repository. +/// If [fileList] is empty, then return true if the current directory resides inside the Flutter repository. bool inRepo(List<String> fileList) { if (fileList == null || fileList.isEmpty) fileList = <String>[fs.path.current];
diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart index 6e31fa9..432b971 100644 --- a/packages/flutter_tools/lib/src/commands/create.dart +++ b/packages/flutter_tools/lib/src/commands/create.dart
@@ -383,7 +383,7 @@ final FileSystemEntityType type = fs.typeSync(dirPath); if (type != FileSystemEntityType.NOT_FOUND) { - switch(type) { + switch (type) { case FileSystemEntityType.FILE: // Do not overwrite files. return "Invalid project name: '$dirPath' - file exists.";
diff --git a/packages/flutter_tools/lib/src/compile.dart b/packages/flutter_tools/lib/src/compile.dart index 1052805..961c5a6 100644 --- a/packages/flutter_tools/lib/src/compile.dart +++ b/packages/flutter_tools/lib/src/compile.dart
@@ -109,7 +109,7 @@ /// Otherwise, [mainPath] is ignored, but [invalidatedFiles] is recompiled /// into new binary. /// Binary file name is returned if compilation was successful, otherwise - /// `null` is returned. + /// null is returned. Future<String> recompile(String mainPath, List<String> invalidatedFiles) async { stdoutHandler.reset();
diff --git a/packages/flutter_tools/lib/src/devfs.dart b/packages/flutter_tools/lib/src/devfs.dart index 938d5de..65a5b71 100644 --- a/packages/flutter_tools/lib/src/devfs.dart +++ b/packages/flutter_tools/lib/src/devfs.dart
@@ -30,7 +30,7 @@ abstract class DevFSContent { bool _exists = true; - /// Return `true` if this is the first time this method is called + /// Return true if this is the first time this method is called /// or if the entry has been modified since this method was last called. bool get isModified; @@ -125,7 +125,7 @@ _isModified = true; } - /// Return `true` only once so that the content is written to the device only once. + /// Return true only once so that the content is written to the device only once. @override bool get isModified { final bool modified = _isModified;
diff --git a/packages/flutter_tools/lib/src/ios/simulators.dart b/packages/flutter_tools/lib/src/ios/simulators.dart index 75b5ccb..3376d75 100644 --- a/packages/flutter_tools/lib/src/ios/simulators.dart +++ b/packages/flutter_tools/lib/src/ios/simulators.dart
@@ -668,12 +668,12 @@ final List<int> v2Fragments = v2.split('.').map(int.parse).toList(); int i = 0; - while(i < v1Fragments.length && i < v2Fragments.length) { + while (i < v1Fragments.length && i < v2Fragments.length) { final int v1Fragment = v1Fragments[i]; final int v2Fragment = v2Fragments[i]; if (v1Fragment != v2Fragment) return v1Fragment.compareTo(v2Fragment); - i++; + i += 1; } return v1Fragments.length.compareTo(v2Fragments.length); }
diff --git a/packages/flutter_tools/lib/src/version.dart b/packages/flutter_tools/lib/src/version.dart index 9cc6a77..8d74a29 100644 --- a/packages/flutter_tools/lib/src/version.dart +++ b/packages/flutter_tools/lib/src/version.dart
@@ -395,7 +395,7 @@ /// Runs [command] and returns the standard output as a string. /// -/// If [lenient] is `true` and the command fails, returns an empty string. +/// 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}) { final ProcessResult results = processManager.runSync(command, workingDirectory: Cache.flutterRoot);