diff --git a/packages/flutter_tools/lib/runner.dart b/packages/flutter_tools/lib/runner.dart index 9f8e2611ffb..7d41db41bf3 100644 --- a/packages/flutter_tools/lib/runner.dart +++ b/packages/flutter_tools/lib/runner.dart @@ -258,7 +258,7 @@ Future _exit(int code) async { globals.printTrace('exiting with code $code'); exit(code); completer.complete(); - // This catches all exceptions becauce the error is propagated on the + // This catches all exceptions because the error is propagated on the // completer. } catch (error, stackTrace) { // ignore: avoid_catches_without_on_clauses completer.completeError(error, stackTrace); diff --git a/packages/flutter_tools/lib/src/android/android_device.dart b/packages/flutter_tools/lib/src/android/android_device.dart index 2c134532601..cc2cae98f96 100644 --- a/packages/flutter_tools/lib/src/android/android_device.dart +++ b/packages/flutter_tools/lib/src/android/android_device.dart @@ -49,7 +49,7 @@ const Map kKnownHardware = { /// A physical Android device or emulator. /// /// While [isEmulator] attempts to distinguish between the device categories, -/// this is a best effort process and not a guarantee; certain phyiscal devices +/// this is a best effort process and not a guarantee; certain physical devices /// identify as emulators. These device identifiers may be added to the [kKnownHardware] /// map to specify that they are actually physical devices. class AndroidDevice extends Device { diff --git a/packages/flutter_tools/lib/src/android/gradle.dart b/packages/flutter_tools/lib/src/android/gradle.dart index b75cb5f33b9..11a59b6254e 100644 --- a/packages/flutter_tools/lib/src/android/gradle.dart +++ b/packages/flutter_tools/lib/src/android/gradle.dart @@ -410,7 +410,7 @@ Future buildGradleApp({ if (exitCode != 0) { if (detectedGradleError == null) { - BuildEvent('gradle-unkown-failure', flutterUsage: globals.flutterUsage).send(); + BuildEvent('gradle-unknown-failure', flutterUsage: globals.flutterUsage).send(); throwToolExit( 'Gradle task $assembleTask failed with exit code $exitCode', exitCode: exitCode, @@ -608,7 +608,7 @@ Future buildGradleAar({ } if (buildInfo.dartObfuscation) { if (buildInfo.mode == BuildMode.debug || buildInfo.mode == BuildMode.profile) { - globals.printStatus('Dart obfuscation is not supported in ${toTitleCase(buildInfo.friendlyModeName)} mode, building as unobfuscated.'); + globals.printStatus('Dart obfuscation is not supported in ${toTitleCase(buildInfo.friendlyModeName)} mode, building as un-obfuscated.'); } else { command.add('-Pdart-obfuscation=true'); } diff --git a/packages/flutter_tools/lib/src/aot.dart b/packages/flutter_tools/lib/src/aot.dart index 26dd3e96ed2..0390ce16908 100644 --- a/packages/flutter_tools/lib/src/aot.dart +++ b/packages/flutter_tools/lib/src/aot.dart @@ -117,10 +117,10 @@ class AotBuilder { PerformanceMeasurement aot; if (expectSo) { aot = result.performance.values.firstWhere( - (PerformanceMeasurement measurement) => measurement.analyicsName == 'android_aot'); + (PerformanceMeasurement measurement) => measurement.analyticsName == 'android_aot'); } else { aot = result.performance.values.firstWhere( - (PerformanceMeasurement measurement) => measurement.analyicsName == 'ios_aot'); + (PerformanceMeasurement measurement) => measurement.analyticsName == 'ios_aot'); } globals.printStatus('frontend(CompileTime): ${kernel.elapsedMilliseconds} ms.'); globals.printStatus('snapshot(CompileTime): ${aot.elapsedMilliseconds} ms.'); diff --git a/packages/flutter_tools/lib/src/base/analyze_size.dart b/packages/flutter_tools/lib/src/base/analyze_size.dart index 3f7c218c157..21f84b03a92 100644 --- a/packages/flutter_tools/lib/src/base/analyze_size.dart +++ b/packages/flutter_tools/lib/src/base/analyze_size.dart @@ -310,9 +310,9 @@ class SizeAnalyzer { color = TerminalColor.yellow; } - // Compute any preceeding directories, and compare this to the stored - // directoried (in _leadingPaths) for the last entity that was printed. The - // similary determines whether or not leading directory information needs to + // Compute any preceding directories, and compare this to the stored + // directories (in _leadingPaths) for the last entity that was printed. The + // similarly determines whether or not leading directory information needs to // be printed. final List localSegments = entityName.split('/') ..removeLast(); diff --git a/packages/flutter_tools/lib/src/base/bot_detector.dart b/packages/flutter_tools/lib/src/base/bot_detector.dart index 29e1612ffc2..2049f0d1d3a 100644 --- a/packages/flutter_tools/lib/src/base/bot_detector.dart +++ b/packages/flutter_tools/lib/src/base/bot_detector.dart @@ -108,7 +108,7 @@ class AzureDetector { request.headers.add('Metadata', true); await request.close(); } on SocketException { - // If there is an error on the socket, it probalby means that we are not + // If there is an error on the socket, it probably means that we are not // running on Azure. return _isRunningOnAzure = false; } on HttpException { diff --git a/packages/flutter_tools/lib/src/base/command_help.dart b/packages/flutter_tools/lib/src/base/command_help.dart index cd14e46bc05..d1d5fc3df14 100644 --- a/packages/flutter_tools/lib/src/base/command_help.dart +++ b/packages/flutter_tools/lib/src/base/command_help.dart @@ -270,7 +270,7 @@ class CommandHelpOption { message.write(''.padLeft(width - parentheticalText.length)); message.write(_terminal.color(parentheticalText, TerminalColor.grey)); - // Terminals seem to require this because we have both boldened and colored + // Terminals seem to require this because we have both bolded and colored // a line. Otherwise the next line comes out bold until a reset bold. if (_terminal.supportsColor) { message.write(AnsiTerminal.resetBold); diff --git a/packages/flutter_tools/lib/src/base/config.dart b/packages/flutter_tools/lib/src/base/config.dart index c14b2d2bf55..5841fd38fdf 100644 --- a/packages/flutter_tools/lib/src/base/config.dart +++ b/packages/flutter_tools/lib/src/base/config.dart @@ -84,7 +84,7 @@ class Config { /// Fallback directory in the user's home directory if `XDG_CONFIG_HOME` is /// not defined. - static const String kXdgConfigFalback = '.config'; + static const String kXdgConfigFallback = '.config'; /// The default name for the Flutter config file. static const String kFlutterSettings = 'settings'; diff --git a/packages/flutter_tools/lib/src/base/error_handling_io.dart b/packages/flutter_tools/lib/src/base/error_handling_io.dart index 322cb7158c2..f6816b65c42 100644 --- a/packages/flutter_tools/lib/src/base/error_handling_io.dart +++ b/packages/flutter_tools/lib/src/base/error_handling_io.dart @@ -28,7 +28,7 @@ import 'platform.dart'; /// /// Cf. If there is some hope that the tool can continue when an operation fails /// with an error, then that error/operation should not be handled here. For -/// example, the tool should gernerally be able to continue executing even if it +/// example, the tool should generally be able to continue executing even if it /// fails to delete a file. class ErrorHandlingFileSystem extends ForwardingFileSystem { ErrorHandlingFileSystem({ @@ -66,7 +66,7 @@ class ErrorHandlingFileSystem extends ForwardingFileSystem { /// Delete the file or directory and return true if it exists, take no /// action and return false if it does not. /// - /// This method should be prefered to checking if it exists and + /// This method should be preferred to checking if it exists and /// then deleting, because it handles the edge case where the file or directory /// is deleted by a different program between the two calls. static bool deleteIfExists(FileSystemEntity file, {bool recursive = false}) { @@ -508,7 +508,7 @@ T _runSync(T Function() op, { /// as a [ToolExit] using [throwToolExit]. /// /// See also: -/// * [ErrorHandlngFileSystem], for a similar file system strategy. +/// * [ErrorHandlingFileSystem], for a similar file system strategy. class ErrorHandlingProcessManager extends ProcessManager { ErrorHandlingProcessManager({ @required ProcessManager delegate, diff --git a/packages/flutter_tools/lib/src/base/file_system.dart b/packages/flutter_tools/lib/src/base/file_system.dart index 2c93ccb54d8..4037b585eb0 100644 --- a/packages/flutter_tools/lib/src/base/file_system.dart +++ b/packages/flutter_tools/lib/src/base/file_system.dart @@ -180,7 +180,7 @@ class LocalFileSystem extends local_fs.LocalFileSystem { List fatalSignals = Signals.defaultExitSignals, }) : this._(signals, fatalSignals); - // Unless we're in a test of this class's signal hanlding features, we must + // Unless we're in a test of this class's signal handling features, we must // have only one instance created with the singleton LocalSignals instance // and the catchable signals it considers to be fatal. static LocalFileSystem _instance; diff --git a/packages/flutter_tools/lib/src/build_info.dart b/packages/flutter_tools/lib/src/build_info.dart index 9611fc21552..a1bffd4c9bd 100644 --- a/packages/flutter_tools/lib/src/build_info.dart +++ b/packages/flutter_tools/lib/src/build_info.dart @@ -43,7 +43,7 @@ class BuildInfo { /// If not provided, defaults to [NullSafetyMode.autodetect]. final NullSafetyMode nullSafetyMode; - /// Whether the build should subdset icon fonts. + /// Whether the build should subset icon fonts. final bool treeShakeIcons; /// Represents a custom Android product flavor or an Xcode scheme, null for @@ -57,7 +57,7 @@ class BuildInfo { /// The path to the .packages file to use for compilation. /// /// This is used by package:package_config to locate the actual package_config.json - /// file. If not provded, defaults to `.packages`. + /// file. If not provided, defaults to `.packages`. final String packagesPath; final List fileSystemRoots; @@ -114,7 +114,7 @@ class BuildInfo { /// rerun tasks. final String performanceMeasurementFile; - /// If provided, an output directory where one or more v8-style heapsnapshots + /// If provided, an output directory where one or more v8-style heap snapshots /// will be written for code size profiling. final String codeSizeDirectory; @@ -152,14 +152,14 @@ class BuildInfo { String get modeName => getModeName(mode); String get friendlyModeName => getFriendlyModeName(mode); - /// the flavor name in the output files is lowercased (see flutter.gradle), + /// the flavor name in the output files is lower-cased (see flutter.gradle), /// so the lower cased flavor name is used to compute the output file name String get lowerCasedFlavor => flavor?.toLowerCase(); - /// Convert to a structued string encoded structure appropriate for usage as + /// Convert to a structured string encoded structure appropriate for usage as /// environment variables or to embed in other scripts. /// - /// Fields that are `null` are excluded from this configration. + /// Fields that are `null` are excluded from this configuration. Map toEnvironmentConfig() { return { if (dartDefines?.isNotEmpty ?? false) @@ -425,7 +425,7 @@ enum TargetPlatform { fuchsia_x64, tester, web_javascript, - // The arch specific android target platforms are soft-depreacted. + // The arch specific android target platforms are soft-deprecated. // Instead of using TargetPlatform as a combination arch + platform // the code will be updated to carry arch information in [DarwinArch] // and [AndroidArch]. diff --git a/packages/flutter_tools/lib/src/build_system/build_system.dart b/packages/flutter_tools/lib/src/build_system/build_system.dart index ccbf36255fe..d75c64dd62e 100644 --- a/packages/flutter_tools/lib/src/build_system/build_system.dart +++ b/packages/flutter_tools/lib/src/build_system/build_system.dart @@ -835,7 +835,7 @@ class _BuildInstance { elapsedMilliseconds: stopwatch.elapsedMilliseconds, skipped: skipped, succeeded: succeeded, - analyicsName: node.target.analyticsName, + analyticsName: node.target.analyticsName, ); } return succeeded; @@ -864,14 +864,14 @@ class PerformanceMeasurement { @required this.elapsedMilliseconds, @required this.skipped, @required this.succeeded, - @required this.analyicsName, + @required this.analyticsName, }); final int elapsedMilliseconds; final String target; final bool skipped; final bool succeeded; - final String analyicsName; + final String analyticsName; } /// Check if there are any dependency cycles in the target. @@ -1062,7 +1062,7 @@ class Node { } } - // If we depend on a file that doesnt exist on disk, mark the build as + // If we depend on a file that doesn't exist on disk, mark the build as // dirty. if the rule is not correctly specified, this will result in it // always being rerun. if (missingInputs.isNotEmpty) { diff --git a/packages/flutter_tools/lib/src/build_system/depfile.dart b/packages/flutter_tools/lib/src/build_system/depfile.dart index 2a654986c78..975a8c5916c 100644 --- a/packages/flutter_tools/lib/src/build_system/depfile.dart +++ b/packages/flutter_tools/lib/src/build_system/depfile.dart @@ -101,7 +101,7 @@ class DepfileService { .map((String path) => path.replaceAllMapped(_escapeExpr, (Match match) => match.group(1)).trim()) .where((String path) => path.isNotEmpty) // The tool doesn't write duplicates to these lists. This call is an attempt to - // be resillient to the outputs of other tools which write or user edits to depfiles. + // be resilient to the outputs of other tools which write or user edits to depfiles. .toSet() .map(_fileSystem.file) .toList(); diff --git a/packages/flutter_tools/lib/src/build_system/targets/android.dart b/packages/flutter_tools/lib/src/build_system/targets/android.dart index 98469f5475a..eb6a1206c57 100644 --- a/packages/flutter_tools/lib/src/build_system/targets/android.dart +++ b/packages/flutter_tools/lib/src/build_system/targets/android.dart @@ -170,7 +170,7 @@ class AndroidAot extends AotElfBase { /// The selected build mode. /// - /// This is restricted to [BuildMode.profile] or [BuildMode.relese]. + /// This is restricted to [BuildMode.profile] or [BuildMode.release]. final BuildMode buildMode; @override diff --git a/packages/flutter_tools/lib/src/build_system/targets/assets.dart b/packages/flutter_tools/lib/src/build_system/targets/assets.dart index 8d1ff2bc7c0..7c64096442c 100644 --- a/packages/flutter_tools/lib/src/build_system/targets/assets.dart +++ b/packages/flutter_tools/lib/src/build_system/targets/assets.dart @@ -176,7 +176,7 @@ DevFSContent processSkSLBundle(String bundlePath, { bundle['platform'] as String); if (bundleTargetPlatform != targetPlatform) { logger.printError( - 'The SkSL bundle was created for $bundleTargetPlatform, but the curent ' + 'The SkSL bundle was created for $bundleTargetPlatform, but the current ' 'platform is $targetPlatform. This may lead to less efficient shader ' 'caching.' ); diff --git a/packages/flutter_tools/lib/src/build_system/targets/common.dart b/packages/flutter_tools/lib/src/build_system/targets/common.dart index b4612fc466d..965316b4181 100644 --- a/packages/flutter_tools/lib/src/build_system/targets/common.dart +++ b/packages/flutter_tools/lib/src/build_system/targets/common.dart @@ -165,7 +165,7 @@ class ReleaseCopyFlutterBundle extends CopyFlutterBundle { /// /// Note that this target depends on the `.dart_tool/package_config.json` file /// even though it is not listed as an input. Pub inserts a timestamp into -/// the file which causes unecessary rebuilds, so instead a subset of the contents +/// the file which causes unnecessary rebuilds, so instead a subset of the contents /// are used an input instead. class KernelSnapshot extends Target { const KernelSnapshot(); diff --git a/packages/flutter_tools/lib/src/build_system/targets/icon_tree_shaker.dart b/packages/flutter_tools/lib/src/build_system/targets/icon_tree_shaker.dart index 494099b7982..8becc63dd74 100644 --- a/packages/flutter_tools/lib/src/build_system/targets/icon_tree_shaker.dart +++ b/packages/flutter_tools/lib/src/build_system/targets/icon_tree_shaker.dart @@ -132,7 +132,7 @@ class IconTreeShaker { if (fonts.length != iconData.length) { environment.logger.printStatus( 'Expected to find fonts for ${iconData.keys}, but found ' - '${fonts.keys}. This usually means you are refering to ' + '${fonts.keys}. This usually means you are referring to ' 'font families in an IconData class but not including them ' 'in the assets section of your pubspec.yaml, are missing ' 'the package that would include them, or are missing ' @@ -219,7 +219,7 @@ class IconTreeShaker { return true; } - /// Returns a map of { fontFamly: relativePath } pairs. + /// Returns a map of { fontFamily: relativePath } pairs. Future> _parseFontJson( String fontManifestData, Set families, @@ -303,9 +303,9 @@ class IconTreeShaker { return _parseConstFinderResult(constFinderResult); } - Map> _parseConstFinderResult(_ConstFinderResult consts) { + Map> _parseConstFinderResult(_ConstFinderResult constants) { final Map> result = >{}; - for (final Map iconDataMap in consts.constantInstances) { + for (final Map iconDataMap in constants.constantInstances) { if ((iconDataMap['fontPackage'] ?? '') is! String || // Null is ok here. iconDataMap['fontFamily'] is! String || iconDataMap['codePoint'] is! num) { @@ -344,7 +344,7 @@ class _ConstFinderResult { List> get nonConstantLocations { _nonConstantLocations ??= _getList( result['nonConstantLocations'], - 'Invalid ConstFinder output: Expected "nonConstLocations" to be a list ofobjects', + 'Invalid ConstFinder output: Expected "nonConstLocations" to be a list of objects', ); return _nonConstantLocations; } diff --git a/packages/flutter_tools/lib/src/build_system/targets/ios.dart b/packages/flutter_tools/lib/src/build_system/targets/ios.dart index cd218a4c5f9..d92568d22ff 100644 --- a/packages/flutter_tools/lib/src/build_system/targets/ios.dart +++ b/packages/flutter_tools/lib/src/build_system/targets/ios.dart @@ -187,8 +187,8 @@ class AotAssemblyProfile extends AotAssemblyBase { } /// Create a trivial App.framework file for debug iOS builds. -class DebugUniveralFramework extends Target { - const DebugUniveralFramework(); +class DebugUniversalFramework extends Target { + const DebugUniversalFramework(); @override String get name => 'debug_universal_framework'; @@ -375,7 +375,7 @@ class DebugIosApplicationBundle extends IosAssetBundle { @override List get dependencies => [ - const DebugUniveralFramework(), + const DebugUniversalFramework(), ...super.dependencies, ]; } diff --git a/packages/flutter_tools/lib/src/build_system/targets/localizations.dart b/packages/flutter_tools/lib/src/build_system/targets/localizations.dart index e173709a84a..156ec73db0b 100644 --- a/packages/flutter_tools/lib/src/build_system/targets/localizations.dart +++ b/packages/flutter_tools/lib/src/build_system/targets/localizations.dart @@ -197,7 +197,7 @@ class LocalizationOptions { /// The `--header-file` argument. /// - /// A file containing the header to preprend to the generated + /// A file containing the header to prepend to the generated /// Dart localizations. final Uri headerFile; diff --git a/packages/flutter_tools/lib/src/build_system/targets/web.dart b/packages/flutter_tools/lib/src/build_system/targets/web.dart index 9268cd02ab2..17db0721c83 100644 --- a/packages/flutter_tools/lib/src/build_system/targets/web.dart +++ b/packages/flutter_tools/lib/src/build_system/targets/web.dart @@ -37,7 +37,7 @@ const String kDart2jsOptimization = 'Dart2jsOptimization'; const String kCspMode = 'cspMode'; /// The caching strategy to use for service worker generation. -const String kServiceWorkerStrategy = 'ServiceWorkerStratgey'; +const String kServiceWorkerStrategy = 'ServiceWorkerStrategy'; /// Whether the dart2js build should output source maps. const String kSourceMapsEnabled = 'SourceMaps'; @@ -55,7 +55,7 @@ const String kOfflineFirst = 'offline-first'; const String kNoneWorker = 'none'; /// Convert a [value] into a [ServiceWorkerStrategy]. -ServiceWorkerStrategy _serviceWorkerStrategyfromString(String value) { +ServiceWorkerStrategy _serviceWorkerStrategyFromString(String value) { switch (value) { case kNoneWorker: return ServiceWorkerStrategy.none; @@ -429,7 +429,7 @@ class WebServiceWorker extends Target { final File serviceWorkerFile = environment.outputDir .childFile('flutter_service_worker.js'); final Depfile depfile = Depfile(contents, [serviceWorkerFile]); - final ServiceWorkerStrategy serviceWorkerStrategy = _serviceWorkerStrategyfromString( + final ServiceWorkerStrategy serviceWorkerStrategy = _serviceWorkerStrategyFromString( environment.defines[kServiceWorkerStrategy], ); final String serviceWorker = generateServiceWorker( diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart index e997b3fdbfa..57c02da99a0 100644 --- a/packages/flutter_tools/lib/src/cache.dart +++ b/packages/flutter_tools/lib/src/cache.dart @@ -647,7 +647,7 @@ abstract class CachedArtifact extends ArtifactSet { /// Ensures that the source files for all of the dependencies for the /// flutter_tool are present. /// -/// This does not handle cases wheere the source files are modified or the +/// This does not handle cases where the source files are modified or the /// directory contents are incomplete. class PubDependencies extends ArtifactSet { PubDependencies({ @@ -1370,7 +1370,7 @@ class IosUsbArtifacts extends CachedArtifact { // For unknown reasons, users are getting into bad states where libimobiledevice is // downloaded but some executables are missing from the zip. The names here are - // used for additional download checks below, so we can redownload if they are + // used for additional download checks below, so we can re-download if they are // missing. static const Map> _kExecutables = >{ 'libimobiledevice': [ diff --git a/packages/flutter_tools/lib/src/commands/assemble.dart b/packages/flutter_tools/lib/src/commands/assemble.dart index fd400e5eb57..535be1b330e 100644 --- a/packages/flutter_tools/lib/src/commands/assemble.dart +++ b/packages/flutter_tools/lib/src/commands/assemble.dart @@ -120,15 +120,15 @@ class AssembleCommand extends FlutterCommand { @override Future> get usageValues async { - final FlutterProject futterProject = FlutterProject.current(); - if (futterProject == null) { + final FlutterProject flutterProject = FlutterProject.current(); + if (flutterProject == null) { return const {}; } try { final Environment localEnvironment = createEnvironment(); return { CustomDimensions.commandBuildBundleTargetPlatform: localEnvironment.defines['TargetPlatform'], - CustomDimensions.commandBuildBundleIsModule: '${futterProject.isModule}', + CustomDimensions.commandBuildBundleIsModule: '${flutterProject.isModule}', }; } on Exception { // We've failed to send usage. @@ -285,7 +285,7 @@ void writePerformanceData(Iterable measurements, File ou 'targets': [ for (final PerformanceMeasurement measurement in measurements) { - 'name': measurement.analyicsName, + 'name': measurement.analyticsName, 'skipped': measurement.skipped, 'succeeded': measurement.succeeded, 'elapsedMilliseconds': measurement.elapsedMilliseconds, diff --git a/packages/flutter_tools/lib/src/commands/build_bundle.dart b/packages/flutter_tools/lib/src/commands/build_bundle.dart index f41cc5fe5b1..989d4dc5228 100644 --- a/packages/flutter_tools/lib/src/commands/build_bundle.dart +++ b/packages/flutter_tools/lib/src/commands/build_bundle.dart @@ -79,13 +79,13 @@ class BuildBundleCommand extends BuildSubCommand { @override Future> get usageValues async { final String projectDir = globals.fs.file(targetFile).parent.parent.path; - final FlutterProject futterProject = FlutterProject.fromPath(projectDir); - if (futterProject == null) { + final FlutterProject flutterProject = FlutterProject.fromPath(projectDir); + if (flutterProject == null) { return const {}; } return { CustomDimensions.commandBuildBundleTargetPlatform: stringArg('target-platform'), - CustomDimensions.commandBuildBundleIsModule: '${futterProject.isModule}', + CustomDimensions.commandBuildBundleIsModule: '${flutterProject.isModule}', }; } diff --git a/packages/flutter_tools/lib/src/commands/build_ios_framework.dart b/packages/flutter_tools/lib/src/commands/build_ios_framework.dart index c24629c1338..6d7fb8986c7 100644 --- a/packages/flutter_tools/lib/src/commands/build_ios_framework.dart +++ b/packages/flutter_tools/lib/src/commands/build_ios_framework.dart @@ -82,7 +82,7 @@ class BuildIOSFrameworkCommand extends BuildSubCommand { help: 'Produce xcframeworks that include all valid architectures (Xcode 11 or later).', ) ..addFlag('cocoapods', - help: 'Produce a Flutter.podspec instead of an engine Flutter.framework (recomended if host app uses CocoaPods).', + help: 'Produce a Flutter.podspec instead of an engine Flutter.framework (recommended if host app uses CocoaPods).', ) ..addOption('output', abbr: 'o', diff --git a/packages/flutter_tools/lib/src/commands/build_web.dart b/packages/flutter_tools/lib/src/commands/build_web.dart index 2e9b8342cff..0e4e59c000f 100644 --- a/packages/flutter_tools/lib/src/commands/build_web.dart +++ b/packages/flutter_tools/lib/src/commands/build_web.dart @@ -42,7 +42,7 @@ class BuildWebCommand extends BuildSubCommand { defaultsTo: false, help: 'Whether to generate a sourcemap file. These can be used by browsers ' 'To view and debug the original source code of a compiled and minified Dart ' - 'application. Defaults to false (no sourcemaps produced).' + 'application. Defaults to false (i.e. no sourcemaps produced).' ); argParser.addOption('pwa-strategy', defaultsTo: kOfflineFirst, diff --git a/packages/flutter_tools/lib/src/commands/doctor.dart b/packages/flutter_tools/lib/src/commands/doctor.dart index bdd1d033597..f93c793827e 100644 --- a/packages/flutter_tools/lib/src/commands/doctor.dart +++ b/packages/flutter_tools/lib/src/commands/doctor.dart @@ -27,7 +27,7 @@ class DoctorCommand extends FlutterCommand { @override Future> get requiredArtifacts async => { - // This is required because the gradle hostonly tests do not correctly specify + // This is required because the gradle host-only tests do not correctly specify // their dependencies. DevelopmentArtifact.androidGenSnapshot, }; diff --git a/packages/flutter_tools/lib/src/commands/downgrade.dart b/packages/flutter_tools/lib/src/commands/downgrade.dart index 6be814fe08b..543dafda4ee 100644 --- a/packages/flutter_tools/lib/src/commands/downgrade.dart +++ b/packages/flutter_tools/lib/src/commands/downgrade.dart @@ -98,9 +98,9 @@ class DowngradeCommand extends FlutterCommand { 'to switch to an official channel.', ); } - final String lastFlutterVesion = _persistentToolState.lastActiveVersion(channel); + final String lastFlutterVersion = _persistentToolState.lastActiveVersion(channel); final String currentFlutterVersion = _flutterVersion.frameworkRevision; - if (lastFlutterVesion == null || currentFlutterVersion == lastFlutterVesion) { + if (lastFlutterVersion == null || currentFlutterVersion == lastFlutterVersion) { final String trailing = await _createErrorMessage(workingDirectory, channel); throwToolExit( 'There is no previously recorded version for channel "$currentChannel".\n' @@ -108,9 +108,9 @@ class DowngradeCommand extends FlutterCommand { ); } - // Detect unkown versions. + // Detect unknown versions. final RunResult parseResult = await _processUtils.run([ - 'git', 'describe', '--tags', lastFlutterVesion, + 'git', 'describe', '--tags', lastFlutterVersion, ], workingDirectory: workingDirectory); if (parseResult.exitCode != 0) { throwToolExit('Failed to parse version for downgrade:\n${parseResult.stderr}'); @@ -137,7 +137,7 @@ class DowngradeCommand extends FlutterCommand { // so this operation is safe. try { await _processUtils.run( - ['git', 'reset', '--hard', lastFlutterVesion], + ['git', 'reset', '--hard', lastFlutterVersion], throwOnError: true, workingDirectory: workingDirectory, ); diff --git a/packages/flutter_tools/lib/src/commands/run.dart b/packages/flutter_tools/lib/src/commands/run.dart index 092abe15faf..35d29fccdc9 100644 --- a/packages/flutter_tools/lib/src/commands/run.dart +++ b/packages/flutter_tools/lib/src/commands/run.dart @@ -47,7 +47,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment ..addFlag('dump-skp-on-shader-compilation', negatable: false, help: 'Automatically dump the skp that triggers new shader compilations. ' - 'This is useful for wrting custom ShaderWarmUp to reduce jank. ' + 'This is useful for writing custom ShaderWarmUp to reduce jank. ' 'By default, this is not enabled to reduce the overhead. ' 'This is only available in profile or debug build. ', ) @@ -141,7 +141,7 @@ class RunCommand extends RunCommandBase { help: 'Enable tracing to the endless tracer. This is useful when ' 'recording huge amounts of traces. If we need to use endless buffer to ' 'record startup traces, we can combine the ("--trace-startup"). ' - 'For exemple, flutter run --trace-startup --endless-trace-buffer. ', + 'For example, flutter run --trace-startup --endless-trace-buffer. ', ) ..addFlag('trace-systrace', negatable: false, diff --git a/packages/flutter_tools/lib/src/commands/symbolize.dart b/packages/flutter_tools/lib/src/commands/symbolize.dart index 0236861f6c3..014083db982 100644 --- a/packages/flutter_tools/lib/src/commands/symbolize.dart +++ b/packages/flutter_tools/lib/src/commands/symbolize.dart @@ -14,10 +14,10 @@ import '../base/io.dart'; import '../convert.dart'; import '../runner/flutter_command.dart'; -/// Support for symbolicating a Dart stack trace. +/// Support for symbolizing a Dart stack trace. /// /// This command accepts either paths to an input file containing the -/// stack trace and an output file for the symbolicated trace to be +/// stack trace and an output file for the symbolizing trace to be /// written, or it accepts a stack trace over stdin and outputs it /// over stdout. class SymbolizeCommand extends FlutterCommand { @@ -43,7 +43,7 @@ class SymbolizeCommand extends FlutterCommand { argParser.addOption( 'output', abbr: 'o', - valueHelp: 'A file path for a symbolicated stack trace to be written to.' + valueHelp: 'A file path for a symbolized stack trace to be written to.' ); } @@ -63,7 +63,7 @@ class SymbolizeCommand extends FlutterCommand { @override Future validateCommand() { if (!argResults.wasParsed('debug-info')) { - throwToolExit('"--debug-info" is required to symbolicate stack traces.'); + throwToolExit('"--debug-info" is required to symbolize stack traces.'); } if (!_fileSystem.isFileSync(stringArg('debug-info'))) { throwToolExit('${stringArg('debug-info')} does not exist.'); diff --git a/packages/flutter_tools/lib/src/commands/update_packages.dart b/packages/flutter_tools/lib/src/commands/update_packages.dart index e30cc56f466..5f2d5b9de6e 100644 --- a/packages/flutter_tools/lib/src/commands/update_packages.dart +++ b/packages/flutter_tools/lib/src/commands/update_packages.dart @@ -518,7 +518,7 @@ enum DependencyKind { // "sdk" dependency in the dependency_overrides section. overridden, - // A depdendency that uses git. + // A dependency that uses git. git, } @@ -812,7 +812,7 @@ class PubspecYaml { // Since we're in one of the places where we can list dependencies, // remember this as the current last known valid place to insert our // transitive dev dependencies. If the section is for regular dependencies, - // then also rememeber the line for the end of direct dependencies. + // then also remember the line for the end of direct dependencies. if (section == Section.dependencies) { endOfDirectDependencies = output.length; } diff --git a/packages/flutter_tools/lib/src/commands/upgrade.dart b/packages/flutter_tools/lib/src/commands/upgrade.dart index 39177ebfece..0253d49a150 100644 --- a/packages/flutter_tools/lib/src/commands/upgrade.dart +++ b/packages/flutter_tools/lib/src/commands/upgrade.dart @@ -37,7 +37,7 @@ class UpgradeCommand extends FlutterCommand { ..addOption( 'working-directory', hide: true, - help: 'Override the upgrade working directoy for integration testing.' + help: 'Override the upgrade working directory for integration testing.' ); } @@ -124,7 +124,7 @@ class UpgradeCommandRunner { } // If there are uncommitted changes we might be on the right commit but // we should still warn. - if (!force && await hasUncomittedChanges()) { + if (!force && await hasUncommittedChanges()) { throwToolExit( 'Your flutter checkout has local changes that would be erased by ' 'upgrading. If you want to keep these changes, it is recommended that ' @@ -178,7 +178,7 @@ class UpgradeCommandRunner { globals.persistentToolState.redisplayWelcomeMessage = true; } - Future hasUncomittedChanges() async { + Future hasUncommittedChanges() async { try { final RunResult result = await processUtils.run( ['git', 'status', '-s'], diff --git a/packages/flutter_tools/lib/src/compile.dart b/packages/flutter_tools/lib/src/compile.dart index de3e8c06ba8..248857c6e75 100644 --- a/packages/flutter_tools/lib/src/compile.dart +++ b/packages/flutter_tools/lib/src/compile.dart @@ -866,7 +866,7 @@ class DefaultResidentCompiler implements ResidentCompiler { } } -/// Convert a file URI into a multiroot scheme URI if provided, otherwise +/// Convert a file URI into a multi-root scheme URI if provided, otherwise /// return unmodified. @visibleForTesting String toMultiRootPath(Uri fileUri, String scheme, List fileSystemRoots, bool windows) { diff --git a/packages/flutter_tools/lib/src/devfs.dart b/packages/flutter_tools/lib/src/devfs.dart index 1c1dc146a8f..eb1ecf7869f 100644 --- a/packages/flutter_tools/lib/src/devfs.dart +++ b/packages/flutter_tools/lib/src/devfs.dart @@ -242,7 +242,7 @@ class _DevFSHttpWriter implements DevFSWriter { final String fsName; final Uri httpAddress; - // 3 was chosen to try to limit the varience in the time it takes to execute + // 3 was chosen to try to limit the variance in the time it takes to execute // `await request.close()` since there is a known bug in Dart where it doesn't // always return a status code in response to a PUT request: // https://github.com/dart-lang/sdk/issues/43525. diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart index 85b2740fd65..c76b9a1e353 100644 --- a/packages/flutter_tools/lib/src/device.dart +++ b/packages/flutter_tools/lib/src/device.dart @@ -81,7 +81,7 @@ class PlatformType { String toString() => value; } -/// A disovery mechanism for flutter-supported development devices. +/// A discovery mechanism for flutter-supported development devices. abstract class DeviceManager { DeviceManager({ @required Logger logger, @@ -238,7 +238,7 @@ abstract class DeviceManager { // Always remove web and fuchsia devices from `--all`. This setting // currently requires devices to share a frontend_server and resident - // runnner instance. Both web and fuchsia require differently configured + // runner instance. Both web and fuchsia require differently configured // compilers, and web requires an entirely different resident runner. if (hasSpecifiedAllDevices) { devices = [ @@ -270,7 +270,7 @@ abstract class DeviceManager { // If there are still multiple devices and the user did not specify to run // all, then attempt to prioritize ephemeral devices. For example, if the // user only typed 'flutter run' and both an Android device and desktop - // device are availible, choose the Android device. + // device are available, choose the Android device. if (devices.length > 1 && !hasSpecifiedAllDevices) { // Note: ephemeral is nullable for device types where this is not well // defined. @@ -626,7 +626,7 @@ abstract class Device { /// Create a platform-specific [DevFSWriter] for the given [app], or /// null if the device does not support them. /// - /// For example, the destkop device classes can use a writer which + /// For example, the desktop device classes can use a writer which /// copies the files across the local file system. DevFSWriter createDevFSWriter( covariant ApplicationPackage app, @@ -685,7 +685,7 @@ abstract class Device { bool get supportsHotRestart => true; /// Whether flutter applications running on this device can be terminated - /// from the vmservice. + /// from the VM Service. bool get supportsFlutterExit => true; /// Whether the device supports taking screenshots of a running flutter @@ -938,7 +938,7 @@ class DebuggingOptions { /// Enable expression evaluation for web target. final bool webEnableExpressionEvaluation; - /// A file where the vmservice URL should be written after the application is started. + /// A file where the VM Service URL should be written after the application is started. final String vmserviceOutFile; final bool fastStart; @@ -1053,7 +1053,7 @@ class NoOpDeviceLogReader implements DeviceLogReader { void dispose() { } } -// A portforwarder which does not support forwarding ports. +// A port forwarder which does not support forwarding ports. class NoOpDevicePortForwarder implements DevicePortForwarder { const NoOpDevicePortForwarder(); diff --git a/packages/flutter_tools/lib/src/doctor.dart b/packages/flutter_tools/lib/src/doctor.dart index aad6b9b17e0..9d13dc86990 100644 --- a/packages/flutter_tools/lib/src/doctor.dart +++ b/packages/flutter_tools/lib/src/doctor.dart @@ -596,7 +596,7 @@ class ValidationResult { /// on the cause and/or solution to the validation failure. @immutable class ValidationMessage { - /// Create a validation message with information for a passing validatior. + /// Create a validation message with information for a passing validator. /// /// By default this is not displayed unless the doctor is run in /// verbose mode. @@ -663,7 +663,7 @@ class ValidationMessage { int get hashCode => type.hashCode ^ message.hashCode ^ contextUrl.hashCode; } -/// A validator that checks the version of Flutter, as well as some auxillary information +/// A validator that checks the version of Flutter, as well as some auxiliary information /// such as the pub or Flutter cache overrides. /// /// This is primarily useful for diagnosing issues on Github bug reports by displaying diff --git a/packages/flutter_tools/lib/src/emulator.dart b/packages/flutter_tools/lib/src/emulator.dart index 7bcd66a5bf1..f8600eb1d55 100644 --- a/packages/flutter_tools/lib/src/emulator.dart +++ b/packages/flutter_tools/lib/src/emulator.dart @@ -237,7 +237,7 @@ abstract class EmulatorDiscovery { /// Whether this emulator discovery is capable of listing any emulators. bool get canListAnything; - /// Whether this emulator discovery is capabale of launching new emulators. + /// Whether this emulator discovery is capable of launching new emulators. bool get canLaunchAnything; Future> get emulators; diff --git a/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart b/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart index 8ef7d929981..066772c5387 100644 --- a/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart +++ b/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart @@ -320,7 +320,7 @@ class FuchsiaDevice extends Device { } packageRepo.createSync(recursive: true); } on Exception catch (e) { - globals.printError('Failed to create Fuchisa package repo directory ' + globals.printError('Failed to create Fuchsia package repo directory ' 'at ${packageRepo.path}: $e'); return LaunchResult.failed(); } @@ -440,7 +440,7 @@ class FuchsiaDevice extends Device { } if (debuggingOptions.buildInfo.mode.isRelease) { - globals.printTrace('App succesfully started in a release mode.'); + globals.printTrace('App successfully started in a release mode.'); return LaunchResult.succeeded(); } globals.printTrace('App started in a non-release mode. Setting up vmservice connection.'); diff --git a/packages/flutter_tools/lib/src/fuchsia/fuchsia_kernel_compiler.dart b/packages/flutter_tools/lib/src/fuchsia/fuchsia_kernel_compiler.dart index e9307c57a69..2c823098981 100644 --- a/packages/flutter_tools/lib/src/fuchsia/fuchsia_kernel_compiler.dart +++ b/packages/flutter_tools/lib/src/fuchsia/fuchsia_kernel_compiler.dart @@ -38,7 +38,7 @@ class FuchsiaKernelCompiler { mode: buildInfo.mode, ); if (!globals.fs.isFileSync(kernelCompiler)) { - throwToolExit('Fuchisa kernel compiler not found at "$kernelCompiler"'); + throwToolExit('Fuchsia kernel compiler not found at "$kernelCompiler"'); } final String platformDill = globals.artifacts.getArtifactPath( Artifact.platformKernelDill, @@ -46,7 +46,7 @@ class FuchsiaKernelCompiler { mode: buildInfo.mode, ); if (!globals.fs.isFileSync(platformDill)) { - throwToolExit('Fuchisa platform file not found at "$platformDill"'); + throwToolExit('Fuchsia platform file not found at "$platformDill"'); } List flags = [ '--target', 'flutter_runner', diff --git a/packages/flutter_tools/lib/src/fuchsia/fuchsia_pm.dart b/packages/flutter_tools/lib/src/fuchsia/fuchsia_pm.dart index 5d3c411cb56..f8e7bd0332b 100644 --- a/packages/flutter_tools/lib/src/fuchsia/fuchsia_pm.dart +++ b/packages/flutter_tools/lib/src/fuchsia/fuchsia_pm.dart @@ -76,7 +76,7 @@ class FuchsiaPM { /// When successful, creates a file `app_name-0.far` under [buildPath], which /// is the Fuchsia package. /// - /// [buildPath] should be the same path passed to [init], and [manfiestPath] + /// [buildPath] should be the same path passed to [init], and [manifestPath] /// should be the same manifest passed to [build]. Future archive(String buildPath, String keyPath, String manifestPath) { return _runPMCommand([ diff --git a/packages/flutter_tools/lib/src/intellij/intellij_validator.dart b/packages/flutter_tools/lib/src/intellij/intellij_validator.dart index d27c4deb80b..e5ae1db939e 100644 --- a/packages/flutter_tools/lib/src/intellij/intellij_validator.dart +++ b/packages/flutter_tools/lib/src/intellij/intellij_validator.dart @@ -251,9 +251,9 @@ class IntelliJValidatorOnMac extends IntelliJValidator { for (final Directory dir in installDirs) { checkForIntelliJ(dir); if (!dir.path.endsWith('.app')) { - for (final FileSystemEntity subdir in dir.listSync()) { - if (subdir is Directory) { - checkForIntelliJ(subdir); + for (final FileSystemEntity subdirectory in dir.listSync()) { + if (subdirectory is Directory) { + checkForIntelliJ(subdirectory); } } } diff --git a/packages/flutter_tools/lib/src/ios/devices.dart b/packages/flutter_tools/lib/src/ios/devices.dart index e8e053b5072..e95a5a83857 100644 --- a/packages/flutter_tools/lib/src/ios/devices.dart +++ b/packages/flutter_tools/lib/src/ios/devices.dart @@ -887,7 +887,7 @@ class IOSDevicePortForwarder extends DevicePortForwarder { while (!connected) { _logger.printTrace('Attempting to forward device port $devicePort to host port $hostPort'); process = await _iproxy.forward(devicePort, hostPort, _id); - // TODO(ianh): This is a flakey race condition, https://github.com/libimobiledevice/libimobiledevice/issues/674 + // TODO(ianh): This is a flaky race condition, https://github.com/libimobiledevice/libimobiledevice/issues/674 connected = !await process.stdout.isEmpty.timeout(_kiProxyPortForwardTimeout, onTimeout: () => false); if (!connected) { process.kill(); @@ -919,7 +919,7 @@ class IOSDevicePortForwarder extends DevicePortForwarder { return; } - _logger.printTrace('Unforwarding port $forwardedPort'); + _logger.printTrace('Un-forwarding port $forwardedPort'); forwardedPort.dispose(); } diff --git a/packages/flutter_tools/lib/src/ios/xcodeproj.dart b/packages/flutter_tools/lib/src/ios/xcodeproj.dart index 4cf8cf9902f..103f50dacd3 100644 --- a/packages/flutter_tools/lib/src/ios/xcodeproj.dart +++ b/packages/flutter_tools/lib/src/ios/xcodeproj.dart @@ -502,7 +502,7 @@ class XcodeProjectInfo { /// Checks whether the [buildConfigurations] contains the specified string, without /// regard to case. - bool hasBuildConfiguratinForBuildMode(String buildMode) { + bool hasBuildConfigurationForBuildMode(String buildMode) { buildMode = buildMode.toLowerCase(); for (final String name in buildConfigurations) { if (name.toLowerCase() == buildMode) { @@ -537,7 +537,7 @@ class XcodeProjectInfo { /// null, if there is no unique best match. String buildConfigurationFor(BuildInfo buildInfo, String scheme) { final String expectedConfiguration = expectedBuildConfigurationFor(buildInfo, scheme); - if (hasBuildConfiguratinForBuildMode(expectedConfiguration)) { + if (hasBuildConfigurationForBuildMode(expectedConfiguration)) { return expectedConfiguration; } final String baseConfiguration = _baseConfigurationFor(buildInfo); diff --git a/packages/flutter_tools/lib/src/isolated/devfs_web.dart b/packages/flutter_tools/lib/src/isolated/devfs_web.dart index 9877cdecc37..de44e7d4cb0 100644 --- a/packages/flutter_tools/lib/src/isolated/devfs_web.dart +++ b/packages/flutter_tools/lib/src/isolated/devfs_web.dart @@ -431,7 +431,7 @@ class WebAssetServer implements AssetReader { final int length = file.lengthSync(); // Attempt to determine the file's mime type. if this is not provided some - // browsers will refuse to render images/show video et cetera. If the tool + // browsers will refuse to render images/show video etc. If the tool // cannot determine a mime type, fall back to application/octet-stream. String mimeType; if (length >= 12) { @@ -544,7 +544,7 @@ class WebAssetServer implements AssetReader { return modules; } - /// Whether to use the cavaskit SDK for rendering. + /// Whether to use the canvaskit SDK for rendering. bool canvasKitRendering = false; shelf.Response _serveIndex() { @@ -864,9 +864,9 @@ class WebDevFS implements DevFS { } // The tool generates an entrypoint file in a temp directory to handle - // the web specific bootrstrap logic. To make it easier for DWDS to handle + // the web specific bootstrap logic. To make it easier for DWDS to handle // mapping the file name, this is done via an additional file root and - // specicial hard-coded scheme. + // special hard-coded scheme. final CompilerOutput compilerOutput = await generator.recompile( Uri( scheme: 'org-dartlang-app', diff --git a/packages/flutter_tools/lib/src/localizations/gen_l10n_types.dart b/packages/flutter_tools/lib/src/localizations/gen_l10n_types.dart index a363318077f..caa3232cc7d 100644 --- a/packages/flutter_tools/lib/src/localizations/gen_l10n_types.dart +++ b/packages/flutter_tools/lib/src/localizations/gen_l10n_types.dart @@ -104,7 +104,7 @@ const Set _validNumberFormats = { // The names of the NumberFormat factory constructors which have named // parameters rather than positional parameters. // -// This helps the tool correctly generate number formmatting code correctly. +// This helps the tool correctly generate number formatting code correctly. // // Example of code that uses named parameters: // final NumberFormat format = NumberFormat.compact( @@ -176,7 +176,7 @@ class OptionalParameter { // Each placeholder can optionally specify a valid Dart type. If the type // is NumberFormat or DateFormat then a format which matches one of the // type's factory constructors can also be specified. In this example the -// date placeholder is to be formated with DateFormat.yMMMMd: +// date placeholder is to be formatted with DateFormat.yMMMMd: // // "helloWorldOn": "Hello World on {date}", // "@helloWorldOn": { diff --git a/packages/flutter_tools/lib/src/localizations/localizations_utils.dart b/packages/flutter_tools/lib/src/localizations/localizations_utils.dart index a98663f57a1..18e22db6186 100644 --- a/packages/flutter_tools/lib/src/localizations/localizations_utils.dart +++ b/packages/flutter_tools/lib/src/localizations/localizations_utils.dart @@ -238,7 +238,7 @@ String describeLocale(String tag) { return output; } -/// Return the input string as a Dart-parseable string. +/// Return the input string as a Dart-parsable string. /// /// ``` /// foo => 'foo' diff --git a/packages/flutter_tools/lib/src/macos/cocoapods.dart b/packages/flutter_tools/lib/src/macos/cocoapods.dart index 21353a77cfe..800bbbf9fec 100644 --- a/packages/flutter_tools/lib/src/macos/cocoapods.dart +++ b/packages/flutter_tools/lib/src/macos/cocoapods.dart @@ -67,7 +67,7 @@ enum CocoaPodsStatus { brokenInstall, } -/// Cocoapods is a depenency management solution for iOS and macOS applications. +/// Cocoapods is a dependency management solution for iOS and macOS applications. /// /// Cocoapods is generally installed via ruby gems and interacted with via /// the `pod` CLI command. diff --git a/packages/flutter_tools/lib/src/macos/macos_device.dart b/packages/flutter_tools/lib/src/macos/macos_device.dart index 934011f364d..601bb617241 100644 --- a/packages/flutter_tools/lib/src/macos/macos_device.dart +++ b/packages/flutter_tools/lib/src/macos/macos_device.dart @@ -77,7 +77,7 @@ class MacOSDevice extends DesktopDevice { void onAttached(covariant MacOSApp package, BuildMode buildMode, Process process) { // Bring app to foreground. Ideally this would be done post-launch rather // than post-attach, since this won't run for release builds, but there's - // no general-purpose way of knowing when a process is far enoug along in + // no general-purpose way of knowing when a process is far enough along in // the launch process for 'open' to foreground it. _processManager.run([ 'open', package.applicationBundle(buildMode), diff --git a/packages/flutter_tools/lib/src/macos/macos_workflow.dart b/packages/flutter_tools/lib/src/macos/macos_workflow.dart index b91c68c5ff8..5360ca77571 100644 --- a/packages/flutter_tools/lib/src/macos/macos_workflow.dart +++ b/packages/flutter_tools/lib/src/macos/macos_workflow.dart @@ -10,9 +10,6 @@ import '../features.dart'; /// The macOS-specific implementation of a [Workflow]. -/// -/// This workflow requires the flutter-desktop-embedding as a sibling -/// repository to the flutter repo. class MacOSWorkflow implements Workflow { const MacOSWorkflow({ @required Platform platform, diff --git a/packages/flutter_tools/lib/src/platform_plugins.dart b/packages/flutter_tools/lib/src/platform_plugins.dart index 68f79318000..d451636391e 100644 --- a/packages/flutter_tools/lib/src/platform_plugins.dart +++ b/packages/flutter_tools/lib/src/platform_plugins.dart @@ -14,7 +14,7 @@ const String kPluginClass = 'pluginClass'; /// Constant for 'pluginClass' key in plugin maps. const String kDartPluginClass = 'dartPluginClass'; -/// Marker interface for all platform specific plugin config impls. +/// Marker interface for all platform specific plugin config implementations. abstract class PluginPlatform { const PluginPlatform(); diff --git a/packages/flutter_tools/lib/src/plugins.dart b/packages/flutter_tools/lib/src/plugins.dart index 62084f748ce..be7df41b65d 100644 --- a/packages/flutter_tools/lib/src/plugins.dart +++ b/packages/flutter_tools/lib/src/plugins.dart @@ -937,7 +937,7 @@ Future _writeIOSPluginRegistrant(FlutterProject project, List plug /// that file, rather than the generated file. String _cmakeRelativePluginSymlinkDirectoryPath(CmakeBasedProject project) { final String makefileDirPath = project.cmakeFile.parent.absolute.path; - // CMake alway uses posix-style path separators, regardless of the platform. + // CMake always uses posix-style path separators, regardless of the platform. final path.Context cmakePathContext = path.Context(style: path.Style.posix); final List relativePathComponents = globals.fs.path.split(globals.fs.path.relative( project.pluginSymlinkDirectory.absolute.path, diff --git a/packages/flutter_tools/lib/src/project.dart b/packages/flutter_tools/lib/src/project.dart index ed08816383a..46073370b0c 100644 --- a/packages/flutter_tools/lib/src/project.dart +++ b/packages/flutter_tools/lib/src/project.dart @@ -343,7 +343,7 @@ abstract class CmakeBasedProject { /// the build. File get generatedCmakeConfigFile; - /// Includable CMake with rules and variables for plugin builds. + /// Included CMake with rules and variables for plugin builds. File get generatedPluginCmakeFile; /// The directory to write plugin symlinks. diff --git a/packages/flutter_tools/lib/src/resident_runner.dart b/packages/flutter_tools/lib/src/resident_runner.dart index aa97cd4178e..78d7f21d392 100644 --- a/packages/flutter_tools/lib/src/resident_runner.dart +++ b/packages/flutter_tools/lib/src/resident_runner.dart @@ -328,7 +328,7 @@ class FlutterDevice { return vmService.onDone .catchError((dynamic error, StackTrace stackTrace) { globals.logger.printError( - 'unhanlded error waiting for vm service exit:\n $error', + 'unhandled error waiting for vm service exit:\n $error', stackTrace: stackTrace, ); }) @@ -1083,7 +1083,7 @@ abstract class ResidentRunner { /// If the device has a connected vmservice, this method will attempt to hide /// and restore the debug banner before taking the screenshot. /// - /// Throws an [AssertionError] if [Devce.supportsScreenshot] is not true. + /// Throws an [AssertionError] if [Device.supportsScreenshot] is not true. Future screenshot(FlutterDevice device) async { assert(device.device.supportsScreenshot); diff --git a/packages/flutter_tools/lib/src/run_hot.dart b/packages/flutter_tools/lib/src/run_hot.dart index e27e299a122..c6e891b400a 100644 --- a/packages/flutter_tools/lib/src/run_hot.dart +++ b/packages/flutter_tools/lib/src/run_hot.dart @@ -536,7 +536,7 @@ class HotRunner extends ResidentRunner { // The engine handles killing and recreating isolates that it has spawned // ("uiIsolates"). The isolates that were spawned from these uiIsolates - // will not be restared, and so they must be manually killed. + // will not be restarted, and so they must be manually killed. final vm_service.VM vm = await device.vmService.getVM(); for (final vm_service.IsolateRef isolateRef in vm.isolates) { if (uiIsolatesIds.contains(isolateRef.id)) { @@ -570,7 +570,7 @@ class HotRunner extends ResidentRunner { try { await device.vmService.streamListen('Isolate'); } on vm_service.RPCError { - // Do nothing, we're already subcribed. + // Do nothing, we're already subscribed. } isolateNotifications.add( device.vmService.onIsolateEvent.firstWhere((vm_service.Event event) { diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart index 0c0d61a008b..2a8e3e3f70a 100644 --- a/packages/flutter_tools/lib/src/runner/flutter_command.dart +++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart @@ -553,7 +553,7 @@ abstract class FlutterCommand extends Command { argParser.addFlag(FlutterOptions.kNullAssertions, help: 'Perform additional null assertions on the boundaries of migrated and ' - 'unmigrated code. This setting is not currently supported on desktop ' + 'un-migrated code. This setting is not currently supported on desktop ' 'devices.' ); } @@ -598,7 +598,7 @@ abstract class FlutterCommand extends Command { FlutterOptions.kPerformanceMeasurementFile, help: 'The name of a file where flutter assemble performance and ' - 'cachedness information will be written in a JSON format.' + 'cached-ness information will be written in a JSON format.' ); } @@ -1186,7 +1186,7 @@ mixin TargetPlatformBasedDevelopmentArtifacts on FlutterCommand { @override Future> get requiredArtifacts async { // If there is no specified target device, fallback to the default - // confiugration. + // configuration. final String rawTargetPlatform = stringArg('target-platform'); final TargetPlatform targetPlatform = getTargetPlatformForName(rawTargetPlatform); if (targetPlatform == null) { diff --git a/packages/flutter_tools/lib/src/test/coverage_collector.dart b/packages/flutter_tools/lib/src/test/coverage_collector.dart index cfb8f711203..5b624719b93 100644 --- a/packages/flutter_tools/lib/src/test/coverage_collector.dart +++ b/packages/flutter_tools/lib/src/test/coverage_collector.dart @@ -279,7 +279,7 @@ void _buildCoverageMap( final List hits = (coverage['hits'] as List).cast(); final List misses = (coverage['misses'] as List).cast(); final List tokenPositions = scripts[scriptRef['id']]['tokenPosTable'] as List; - // The token positions can be null if the script has no coverable lines. + // The token positions can be null if the script has no lines that may be covered. if (tokenPositions == null) { continue; } diff --git a/packages/flutter_tools/lib/src/version.dart b/packages/flutter_tools/lib/src/version.dart index dcfd8d60e9f..52ed2fde571 100644 --- a/packages/flutter_tools/lib/src/version.dart +++ b/packages/flutter_tools/lib/src/version.dart @@ -77,7 +77,7 @@ class FlutterVersion { _frameworkVersion = gitTagVersion.frameworkVersionFor(_frameworkRevision); } - /// Fetchs tags from the upstream Flutter repository and re-calculates the + /// Fetches tags from the upstream Flutter repository and re-calculates the /// version. /// /// This carries a performance penalty, and should only be called when the @@ -259,7 +259,7 @@ class FlutterVersion { ); } on VersionCheckError catch (error) { if (globals.platform.environment.containsKey('FLUTTER_GIT_URL')) { - globals.logger.printError('Warning: the Flutter git upstream was overriden ' + globals.logger.printError('Warning: the Flutter git upstream was overridden ' 'by the environment variable FLUTTER_GIT_URL = $_flutterGit'); } globals.logger.printError(error.toString()); diff --git a/packages/flutter_tools/lib/src/vmservice.dart b/packages/flutter_tools/lib/src/vmservice.dart index c261ac1d34a..79e4e95c50d 100644 --- a/packages/flutter_tools/lib/src/vmservice.dart +++ b/packages/flutter_tools/lib/src/vmservice.dart @@ -421,10 +421,10 @@ extension FlutterVmService on vm_service.VmService { }); } - /// Retreive the cached SkSL shaders from an attached Flutter view. + /// Retrieve the cached SkSL shaders from an attached Flutter view. /// /// This method will only return data if `--cache-sksl` was provided as a - /// flutter run agument, and only then on physical devices. + /// flutter run argument, and only then on physical devices. Future> getSkSLs({ @required String viewId, }) async { @@ -437,7 +437,7 @@ extension FlutterVmService on vm_service.VmService { return response.json['SkSLs'] as Map; } - /// Flush all tasks on the UI thead for an attached Flutter view. + /// Flush all tasks on the UI thread for an attached Flutter view. /// /// This method is currently used only for benchmarking. Future flushUIThreadTasks({ @@ -809,7 +809,7 @@ Future sharedSkSlWriter(Device device, Map data, { }) async { if (data.isEmpty) { globals.logger.printStatus( - 'No data was receieved. To ensure SkSL data can be generated use a ' + 'No data was received. To ensure SkSL data can be generated use a ' 'physical device then:\n' ' 1. Pass "--cache-sksl" as an argument to flutter run.\n' ' 2. Interact with the application to force shaders to be compiled.\n' diff --git a/packages/flutter_tools/lib/src/web/bootstrap.dart b/packages/flutter_tools/lib/src/web/bootstrap.dart index 3f02de6b2e2..4e9869d80c0 100644 --- a/packages/flutter_tools/lib/src/web/bootstrap.dart +++ b/packages/flutter_tools/lib/src/web/bootstrap.dart @@ -52,6 +52,7 @@ String generateMainModule({ @required String entrypoint, @required bool nullAssertions, }) { + // TODO(jonahwilliams): fix typo in dwds and update. return '''/* ENTRYPOINT_EXTENTION_MARKER */ // Create the main module loaded below. define("main_module.bootstrap", ["$entrypoint", "dart_sdk"], function(app, dart_sdk) { diff --git a/packages/flutter_tools/lib/src/web/chrome.dart b/packages/flutter_tools/lib/src/web/chrome.dart index 6defaf2fe17..fdc86fc685a 100644 --- a/packages/flutter_tools/lib/src/web/chrome.dart +++ b/packages/flutter_tools/lib/src/web/chrome.dart @@ -162,13 +162,13 @@ class ChromiumLauncher { /// Launch a Chromium browser to a particular `host` page. /// - /// `headless` defaults to false, and controls whether we open a headless or - /// a `headfull` browser. + /// [headless] defaults to false, and controls whether we open a headless or + /// a "headfull" browser. /// - /// `debugPort` is Chrome's debugging protocol port. If null, a random free + /// [debugPort] is Chrome's debugging protocol port. If null, a random free /// port is picked automatically. /// - /// `skipCheck` does not attempt to make a devtools connection before returning. + /// [skipCheck] does not attempt to make a devtools connection before returning. Future launch(String url, { bool headless = false, int debugPort, diff --git a/packages/flutter_tools/lib/src/web/web_validator.dart b/packages/flutter_tools/lib/src/web/web_validator.dart index 025ce41f56e..9940437827a 100644 --- a/packages/flutter_tools/lib/src/web/web_validator.dart +++ b/packages/flutter_tools/lib/src/web/web_validator.dart @@ -8,7 +8,7 @@ import '../base/platform.dart'; import '../doctor.dart'; import 'chrome.dart'; -/// A validator for Chromium-based brosers. +/// A validator for Chromium-based browsers. abstract class ChromiumValidator extends DoctorValidator { const ChromiumValidator(String title) : super(title); @@ -19,25 +19,25 @@ abstract class ChromiumValidator extends DoctorValidator { @override Future validate() async { final bool canRunChromium = _chromiumLauncher.canFindExecutable(); - final String chromimSearchLocation = _chromiumLauncher.findExecutable(); + final String chromiumSearchLocation = _chromiumLauncher.findExecutable(); final List messages = [ if (_platform.environment.containsKey(kChromeEnvironment)) if (!canRunChromium) - ValidationMessage.hint('$chromimSearchLocation is not executable.') + ValidationMessage.hint('$chromiumSearchLocation is not executable.') else - ValidationMessage('$kChromeEnvironment = $chromimSearchLocation') + ValidationMessage('$kChromeEnvironment = $chromiumSearchLocation') else if (!canRunChromium) ValidationMessage.hint('Cannot find $_name. Try setting ' '$kChromeEnvironment to a $_name executable.') else - ValidationMessage('$_name at $chromimSearchLocation'), + ValidationMessage('$_name at $chromiumSearchLocation'), ]; if (!canRunChromium) { return ValidationResult( ValidationType.missing, messages, - statusInfo: 'Cannot find $_name executable at $chromimSearchLocation', + statusInfo: 'Cannot find $_name executable at $chromiumSearchLocation', ); } return ValidationResult( @@ -66,7 +66,7 @@ class ChromeValidator extends ChromiumValidator { String get _name => 'Chrome'; } -/// A validator that checks whethere Edge is installed and can run. +/// A validator that checks whether Edge is installed and can run. class EdgeValidator extends ChromiumValidator { const EdgeValidator({ @required Platform platform, diff --git a/packages/flutter_tools/lib/src/windows/build_windows.dart b/packages/flutter_tools/lib/src/windows/build_windows.dart index fb7ef417b6a..6b819ee495f 100644 --- a/packages/flutter_tools/lib/src/windows/build_windows.dart +++ b/packages/flutter_tools/lib/src/windows/build_windows.dart @@ -36,7 +36,7 @@ Future buildWindows(WindowsProject windowsProject, BuildInfo buildInfo, { 'to learn about adding Windows support to a project.'); } - // Ensure that necessary emphemeral files are generated and up to date. + // Ensure that necessary ephemeral files are generated and up to date. _writeGeneratedFlutterConfig(windowsProject, buildInfo, target); createPluginSymlinks(windowsProject.parent); diff --git a/packages/flutter_tools/lib/src/windows/visual_studio.dart b/packages/flutter_tools/lib/src/windows/visual_studio.dart index 6ef66ff3ed6..31e99e41509 100644 --- a/packages/flutter_tools/lib/src/windows/visual_studio.dart +++ b/packages/flutter_tools/lib/src/windows/visual_studio.dart @@ -140,7 +140,7 @@ class VisualStudio { return _requiredComponents().values.toList(); } - /// The consumer-facing version name of the minumum supported version. + /// The consumer-facing version name of the minimum supported version. /// /// E.g., for Visual Studio 2019 this returns "2019" rather than "16". String get minimumVersionDescription { @@ -199,7 +199,7 @@ class VisualStudio { Map _requiredComponents([int majorVersion]) { // The description of the C++ toolchain required by the template. The // component name is significantly different in different versions. - // When a new major version of VS is supported, its toochain description + // When a new major version of VS is supported, its toolchain description // should be added below. It should also be made the default, so that when // there is no installation, the message shows the string that will be // relevant for the most likely fresh install case). @@ -228,7 +228,7 @@ class VisualStudio { /// The minimum supported major version. static const int _minimumSupportedVersion = 16; // '16' is VS 2019. - /// vswhere argument to specificy the minimum version. + /// vswhere argument to specify the minimum version. static const String _vswhereMinVersionArgument = '-version'; /// vswhere argument to allow prerelease versions. @@ -304,7 +304,7 @@ class VisualStudio { } } } on ArgumentError { - // Thrown if vswhere doesnt' exist; ignore and return null below. + // Thrown if vswhere doesn't exist; ignore and return null below. } on ProcessException { // Ignored, return null below. } on FormatException { diff --git a/packages/flutter_tools/test/commands.shard/hermetic/assemble_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/assemble_test.dart index 47dc75416e7..83c82a9a04d 100644 --- a/packages/flutter_tools/test/commands.shard/hermetic/assemble_test.dart +++ b/packages/flutter_tools/test/commands.shard/hermetic/assemble_test.dart @@ -106,7 +106,7 @@ void main() { return BuildResult(success: true, performance: { 'hello': PerformanceMeasurement( target: 'hello', - analyicsName: 'bar', + analyticsName: 'bar', elapsedMilliseconds: 123, skipped: false, succeeded: true, @@ -208,7 +208,7 @@ void main() { testWithoutContext('writePerformanceData outputs performance data in JSON form', () { final List performanceMeasurement = [ PerformanceMeasurement( - analyicsName: 'foo', + analyticsName: 'foo', target: 'hidden', skipped: false, succeeded: true, diff --git a/packages/flutter_tools/test/commands.shard/hermetic/symbolize_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/symbolize_test.dart index 17c102632b0..bc20fe27756 100644 --- a/packages/flutter_tools/test/commands.shard/hermetic/symbolize_test.dart +++ b/packages/flutter_tools/test/commands.shard/hermetic/symbolize_test.dart @@ -63,7 +63,7 @@ void main() { final Future result = createTestCommandRunner(command) .run(const ['symbolize']); - expect(result, throwsToolExit(message: '"--debug-info" is required to symbolicate stack traces.')); + expect(result, throwsToolExit(message: '"--debug-info" is required to symbolize stack traces.')); }); testUsingContext('symbolize exits when --debug-info file is missing', () async { diff --git a/packages/flutter_tools/test/commands.shard/permeable/upgrade_test.dart b/packages/flutter_tools/test/commands.shard/permeable/upgrade_test.dart index fb8ffda8d75..60868779cf1 100644 --- a/packages/flutter_tools/test/commands.shard/permeable/upgrade_test.dart +++ b/packages/flutter_tools/test/commands.shard/permeable/upgrade_test.dart @@ -369,7 +369,7 @@ class FakeUpgradeCommandRunner extends UpgradeCommandRunner { Future fetchRemoteRevision() async => remoteRevision; @override - Future hasUncomittedChanges() async => willHaveUncomittedChanges; + Future hasUncommittedChanges() async => willHaveUncomittedChanges; @override Future upgradeChannel(FlutterVersion flutterVersion) async {} diff --git a/packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart b/packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart index 34fbcf489d7..006994419db 100644 --- a/packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart @@ -115,7 +115,7 @@ void main() { ]), ]); - await const DebugUniveralFramework().build(environment); + await const DebugUniversalFramework().build(environment); }, overrides: { FileSystem: () => fileSystem, ProcessManager: () => processManager, diff --git a/packages/flutter_tools/test/general.shard/commands/build_aot_test.dart b/packages/flutter_tools/test/general.shard/commands/build_aot_test.dart index 8f34954e2ef..fc98e058222 100644 --- a/packages/flutter_tools/test/general.shard/commands/build_aot_test.dart +++ b/packages/flutter_tools/test/general.shard/commands/build_aot_test.dart @@ -116,14 +116,14 @@ void main() { .thenAnswer((Invocation invocation) async { return BuildResult(success: true, performance: { 'kernel_snapshot': PerformanceMeasurement( - analyicsName: 'kernel_snapshot', + analyticsName: 'kernel_snapshot', target: 'kernel_snapshot', elapsedMilliseconds: 1000, succeeded: true, skipped: false, ), 'anything': PerformanceMeasurement( - analyicsName: 'android_aot', + analyticsName: 'android_aot', target: 'anything', elapsedMilliseconds: 1000, succeeded: true, diff --git a/packages/flutter_tools/test/general.shard/resident_runner_test.dart b/packages/flutter_tools/test/general.shard/resident_runner_test.dart index 9c2f4fd5e8a..61ad8a592dd 100644 --- a/packages/flutter_tools/test/general.shard/resident_runner_test.dart +++ b/packages/flutter_tools/test/general.shard/resident_runner_test.dart @@ -1457,7 +1457,7 @@ void main() { ]); await residentRunner.writeSkSL(); - expect(testLogger.statusText, contains('No data was receieved')); + expect(testLogger.statusText, contains('No data was received')); expect(fakeVmServiceHost.hasRemainingExpectations, false); }));