From 81d80c587d3ab806b55e818f7be0b982f921ad7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anis=20Alibegi=C4=87?= Date: Fri, 12 Jan 2024 23:10:25 +0100 Subject: [PATCH] Fixed a lot of typos (#141431) Fair amount of typos spotted and fixed. Some of them are in comments, some of them are in code and some of them are in nondart files. There is no need for issues since it's a typo fix. I have doubts about [packages/flutter_tools/lib/src/ios/core_devices.dart](https://github.com/flutter/flutter/compare/master...anisalibegic:flutter:master#diff-fdbc1496b4bbe7e2b445a567fd385677af861c0093774e3d8cc460fdd5b794fa), I have a feeling it might broke some things on the other end, even though it's a typo. --- .../src/picture_cache_complexity_scoring.dart | 2 +- dev/bots/check_code_samples.dart | 2 +- .../root/packages/flutter/lib/stopwatch.dart | 8 ++--- dev/bots/test/test_test.dart | 2 +- .../lib/tasks/android_lifecycles_test.dart | 8 ++--- .../android_verified_input/README.md | 2 +- dev/tools/create_api_docs.dart | 2 +- .../material/autocomplete/autocomplete.2.dart | 2 +- .../transitions/listenable_builder.3.dart | 2 +- .../navigation_rail.1_test.dart | 2 +- .../draggable_scrollable_sheet.0_test.dart | 2 +- .../flutter/lib/src/foundation/timeline.dart | 2 +- .../src/material/bottom_navigation_bar.dart | 2 +- .../lib/src/material/expansion_tile.dart | 4 +-- .../lib/src/material/refresh_indicator.dart | 2 +- .../lib/src/material/segmented_button.dart | 2 +- .../lib/src/material/tab_indicator.dart | 2 +- .../flutter/lib/src/material/tooltip.dart | 8 ++--- .../flutter/lib/src/painting/text_scaler.dart | 2 +- .../flutter/lib/src/painting/text_style.dart | 4 +-- .../src/rendering/list_wheel_viewport.dart | 4 +-- .../flutter/lib/src/rendering/paragraph.dart | 2 +- .../flutter/lib/src/semantics/semantics.dart | 2 +- .../lib/src/services/system_chrome.dart | 2 +- packages/flutter/lib/src/widgets/routes.dart | 2 +- .../flutter/lib/src/widgets/spell_check.dart | 4 +-- .../test/cupertino/text_field_test.dart | 2 +- .../flutter/test/gestures/monodrag_test.dart | 2 +- packages/flutter/test/material/app_test.dart | 4 +-- .../test/material/tab_bar_theme_test.dart | 32 +++++++++---------- packages/flutter/test/material/tabs_test.dart | 24 +++++++------- .../test/material/text_field_test.dart | 12 +++---- .../flutter/test/material/tooltip_test.dart | 4 +-- .../flutter/test/rendering/table_test.dart | 2 +- .../test/semantics/semantics_test.dart | 4 +-- .../test/widgets/editable_text_test.dart | 2 +- .../test/widgets/html_element_view_test.dart | 2 +- .../test/widgets/restoration_mixin_test.dart | 6 ++-- .../test/widgets/selectable_region_test.dart | 2 +- packages/flutter/test/widgets/table_test.dart | 6 ++-- .../test/widgets/text_selection_test.dart | 2 +- packages/flutter_test/lib/src/finders.dart | 4 +-- .../flutter_test/lib/src/tree_traversal.dart | 2 +- .../flutter_tools/lib/src/android/README.md | 6 ++-- .../lib/src/android/android_device.dart | 2 +- .../lib/src/android/gradle_utils.dart | 4 +-- .../lib/src/commands/create.dart | 2 +- .../lib/src/drive/web_driver_service.dart | 2 +- .../lib/src/ios/core_devices.dart | 6 ++-- .../flutter_tools/lib/src/ios/devices.dart | 2 +- .../lib/src/ios/xcode_debug.dart | 14 ++++---- .../flutter_tools/lib/src/macos/xcdevice.dart | 2 +- .../lib/src/runner/flutter_command.dart | 2 +- .../templates/package_ffi/README.md.tmpl | 4 +-- .../package_ffi/lib/projectName.dart.tmpl | 2 +- .../android/gradle_utils_test.dart | 2 +- .../general.shard/ios/core_devices_test.dart | 6 ++-- .../test/general.shard/project_test.dart | 2 +- .../break_on_framework_exceptions_test.dart | 2 +- 59 files changed, 125 insertions(+), 125 deletions(-) diff --git a/dev/benchmarks/macrobenchmarks/lib/src/picture_cache_complexity_scoring.dart b/dev/benchmarks/macrobenchmarks/lib/src/picture_cache_complexity_scoring.dart index 800010c1166..371b1307d54 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/picture_cache_complexity_scoring.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/picture_cache_complexity_scoring.dart @@ -34,7 +34,7 @@ class PictureCacheComplexityScoringPage extends StatelessWidget { } // For now we just test a single case where the widget being cached is actually - // relatively cheap to rasterise, and so should not be in the cache. + // relatively cheap to rasterize, and so should not be in the cache. // // Eventually we can extend this to add new test cases based on the tab name. Widget _buildComplexityScoringWidgets(String name) { diff --git a/dev/bots/check_code_samples.dart b/dev/bots/check_code_samples.dart index 266ba631a13..8d947f57a4d 100644 --- a/dev/bots/check_code_samples.dart +++ b/dev/bots/check_code_samples.dart @@ -234,7 +234,7 @@ class SampleChecker { final RegExp validExampleRe = RegExp(r'\*\* See code in (?.+) \*\*'); // Looks for some common broken versions of example links. This looks for // something that is at minimum "///*seecode*" to indicate that it - // looks like an example link. It should be narrowed if we start gettting false + // looks like an example link. It should be narrowed if we start getting false // positives. final RegExp malformedLinkRe = RegExp(r'^(?\s*///\s*\*\*?\s*[sS][eE][eE]\s*[Cc][Oo][Dd][Ee].+\*\*?)'); for (final File file in files) { diff --git a/dev/bots/test/analyze-test-input/root/packages/flutter/lib/stopwatch.dart b/dev/bots/test/analyze-test-input/root/packages/flutter/lib/stopwatch.dart index 2440d849b6f..86004295d2b 100644 --- a/dev/bots/test/analyze-test-input/root/packages/flutter/lib/stopwatch.dart +++ b/dev/bots/test/analyze-test-input/root/packages/flutter/lib/stopwatch.dart @@ -23,15 +23,15 @@ void testNoStopwatches(Stopwatch stopwatch) { StopwatchAtHome().runtimeType; // Bad: introducing a Stopwatch subclass. - Stopwatch anothorStopwatch = stopwatch; // OK: not directly introducing Stopwatch. + Stopwatch anotherStopwatch = stopwatch; // OK: not directly introducing Stopwatch. StopwatchAtHome Function() constructor = StopwatchAtHome.new; // Bad: introducing a Stopwatch constructor. assert(() { - anothorStopwatch = constructor()..runtimeType; + anotherStopwatch = constructor()..runtimeType; constructor = StopwatchAtHome.create; // Bad: introducing a Stopwatch constructor. - anothorStopwatch = constructor()..runtimeType; + anotherStopwatch = constructor()..runtimeType; return true; }()); - anothorStopwatch.runtimeType; + anotherStopwatch.runtimeType; externallib.MyStopwatch.create(); // Bad: introducing an external Stopwatch constructor. ExternalStopwatchConstructor? externalConstructor; diff --git a/dev/bots/test/test_test.dart b/dev/bots/test/test_test.dart index c5c794f8aa5..7f5ae0c2d08 100644 --- a/dev/bots/test/test_test.dart +++ b/dev/bots/test/test_test.dart @@ -82,7 +82,7 @@ void main() { }); }); - group('flutter/pacakges version', () { + group('flutter/packages version', () { final MemoryFileSystem memoryFileSystem = MemoryFileSystem(); final fs.File packagesVersionFile = memoryFileSystem.file(path.join('bin','internal','flutter_packages.version')); const String kSampleHash = '592b5b27431689336fa4c721a099eedf787aeb56'; diff --git a/dev/devicelab/lib/tasks/android_lifecycles_test.dart b/dev/devicelab/lib/tasks/android_lifecycles_test.dart index 0292171afe4..38c74595a8e 100644 --- a/dev/devicelab/lib/tasks/android_lifecycles_test.dart +++ b/dev/devicelab/lib/tasks/android_lifecycles_test.dart @@ -83,8 +83,8 @@ void main() { ); }); - final StreamController lifecyles = StreamController(); - final StreamIterator lifecycleItr = StreamIterator(lifecyles.stream); + final StreamController lifecycles = StreamController(); + final StreamIterator lifecycleItr = StreamIterator(lifecycles.stream); final StreamSubscription stdout = run.stdout .transform(utf8.decoder) @@ -97,7 +97,7 @@ void main() { } final String lifecycle = match[1]!; print('stdout: Found app lifecycle: $lifecycle'); - lifecyles.add(lifecycle); + lifecycles.add(lifecycle); }); final StreamSubscription stderr = run.stderr @@ -151,7 +151,7 @@ void main() { section('Stop subscriptions (mode: $mode)'); await lifecycleItr.cancel(); - await lifecyles.close(); + await lifecycles.close(); await stdout.cancel(); await stderr.cancel(); return TaskResult.success(null); diff --git a/dev/integration_tests/android_verified_input/README.md b/dev/integration_tests/android_verified_input/README.md index aeccfc6fbec..1232470c56a 100644 --- a/dev/integration_tests/android_verified_input/README.md +++ b/dev/integration_tests/android_verified_input/README.md @@ -1,4 +1,4 @@ # android\_verified\_input Integration test that confirms that MotionEvents delivered to platform views -are verifid. +are verified. diff --git a/dev/tools/create_api_docs.dart b/dev/tools/create_api_docs.dart index 1849fd23147..12c49deb7d6 100644 --- a/dev/tools/create_api_docs.dart +++ b/dev/tools/create_api_docs.dart @@ -200,7 +200,7 @@ class Configurator { /// The [Platform] to use for this run. /// - /// Can be replaced by tests to test behavior on different plaforms. + /// Can be replaced by tests to test behavior on different platforms. final Platform platform; void generateConfiguration() { diff --git a/examples/api/lib/material/autocomplete/autocomplete.2.dart b/examples/api/lib/material/autocomplete/autocomplete.2.dart index 85082969e86..999f8bdcdf6 100644 --- a/examples/api/lib/material/autocomplete/autocomplete.2.dart +++ b/examples/api/lib/material/autocomplete/autocomplete.2.dart @@ -58,7 +58,7 @@ class _AsyncAutocompleteState extends State<_AsyncAutocomplete > { final Iterable options = await _FakeAPI.search(_searchingWithQuery!); // If another search happened after this one, throw away these options. - // Use the previous options intead and wait for the newer request to + // Use the previous options instead and wait for the newer request to // finish. if (_searchingWithQuery != textEditingValue.text) { return _lastOptions; diff --git a/examples/api/lib/widgets/transitions/listenable_builder.3.dart b/examples/api/lib/widgets/transitions/listenable_builder.3.dart index 8bc7ae1ed45..0f0b5609e16 100644 --- a/examples/api/lib/widgets/transitions/listenable_builder.3.dart +++ b/examples/api/lib/widgets/transitions/listenable_builder.3.dart @@ -30,7 +30,7 @@ class ListenableBuilderExample extends StatefulWidget { class _ListenableBuilderExampleState extends State { final ListModel _listNotifier = ListModel(); - final math.Random _random = math.Random(0); // fixed seed for reproducability + final math.Random _random = math.Random(0); // fixed seed for reproducibility @override Widget build(BuildContext context) { diff --git a/examples/api/test/material/navigation_rail/navigation_rail.1_test.dart b/examples/api/test/material/navigation_rail/navigation_rail.1_test.dart index d3526d4adc4..10e969ecbd1 100644 --- a/examples/api/test/material/navigation_rail/navigation_rail.1_test.dart +++ b/examples/api/test/material/navigation_rail/navigation_rail.1_test.dart @@ -100,7 +100,7 @@ void main() { const example.NavigationRailExampleApp(), ); - // Test badge wthout label. + // Test badge without label. final Badge notificationBadge = tester.firstWidget(find.ancestor( of: find.byIcon(Icons.bookmark_border), matching: find.byType(Badge), diff --git a/examples/api/test/widgets/draggable_scrollable_sheet/draggable_scrollable_sheet.0_test.dart b/examples/api/test/widgets/draggable_scrollable_sheet/draggable_scrollable_sheet.0_test.dart index da365dc6cbe..6426b5c0375 100644 --- a/examples/api/test/widgets/draggable_scrollable_sheet/draggable_scrollable_sheet.0_test.dart +++ b/examples/api/test/widgets/draggable_scrollable_sheet/draggable_scrollable_sheet.0_test.dart @@ -34,7 +34,7 @@ void main() { // Get the initial size of the ListView final Size listViewInitialSize = tester.getSize(listViewFinder); - // Drag the the sheet from anywhere inside the sheet to change the sheet position + // Drag the sheet from anywhere inside the sheet to change the sheet position await tester.drag(listViewFinder, const Offset(0.0, -100.0)); await tester.pump(); diff --git a/packages/flutter/lib/src/foundation/timeline.dart b/packages/flutter/lib/src/foundation/timeline.dart index b110ea0cb0f..e2a74afb701 100644 --- a/packages/flutter/lib/src/foundation/timeline.dart +++ b/packages/flutter/lib/src/foundation/timeline.dart @@ -252,7 +252,7 @@ final class AggregatedTimedBlock { /// easily tell which part of code was measured. final String name; - /// The sum of [TimedBlock.duration] values of aggretaged blocks. + /// The sum of [TimedBlock.duration] values of aggregated blocks. final double duration; /// The number of [TimedBlock] objects aggregated. diff --git a/packages/flutter/lib/src/material/bottom_navigation_bar.dart b/packages/flutter/lib/src/material/bottom_navigation_bar.dart index 8df5612eb3c..ee92130fd64 100644 --- a/packages/flutter/lib/src/material/bottom_navigation_bar.dart +++ b/packages/flutter/lib/src/material/bottom_navigation_bar.dart @@ -653,7 +653,7 @@ class _Tile extends StatelessWidget { const SizedBox(width: 8), // Flexible lets the overflow property of // label to work and IntrinsicWidth gives label a - // resonable width preventing extra space before it. + // reasonable width preventing extra space before it. Flexible(child: IntrinsicWidth(child: label)) ], ), diff --git a/packages/flutter/lib/src/material/expansion_tile.dart b/packages/flutter/lib/src/material/expansion_tile.dart index e85f2f8a98e..017d81209a3 100644 --- a/packages/flutter/lib/src/material/expansion_tile.dart +++ b/packages/flutter/lib/src/material/expansion_tile.dart @@ -21,7 +21,7 @@ const Duration _kExpand = Duration(milliseconds: 200); /// Enables control over a single [ExpansionTile]'s expanded/collapsed state. /// /// It can be useful to expand or collapse an [ExpansionTile] -/// programatically, for example to reconfigure an existing expansion +/// programmatically, for example to reconfigure an existing expansion /// tile based on a system event. To do so, create an [ExpansionTile] /// with an [ExpansionTileController] that's owned by a stateful widget /// or look up the tile's automatically created [ExpansionTileController] @@ -209,7 +209,7 @@ class ExpansionTileController { /// /// {@tool dartpad} /// This example demonstrates how an [ExpansionTileController] can be used to -/// programatically expand or collapse an [ExpansionTile]. +/// programmatically expand or collapse an [ExpansionTile]. /// /// ** See code in examples/api/lib/material/expansion_tile/expansion_tile.1.dart ** /// {@end-tool} diff --git a/packages/flutter/lib/src/material/refresh_indicator.dart b/packages/flutter/lib/src/material/refresh_indicator.dart index 90719320a96..4aa1e072ac8 100644 --- a/packages/flutter/lib/src/material/refresh_indicator.dart +++ b/packages/flutter/lib/src/material/refresh_indicator.dart @@ -156,7 +156,7 @@ class RefreshIndicator extends StatefulWidget { /// /// The target platform is based on the current [Theme]: [ThemeData.platform]. /// - /// Noteably the scrollable widget itself will have slightly different behavior + /// Notably the scrollable widget itself will have slightly different behavior /// from [CupertinoSliverRefreshControl], due to a difference in structure. const RefreshIndicator.adaptive({ super.key, diff --git a/packages/flutter/lib/src/material/segmented_button.dart b/packages/flutter/lib/src/material/segmented_button.dart index a4eeb6f1320..84b45a3f391 100644 --- a/packages/flutter/lib/src/material/segmented_button.dart +++ b/packages/flutter/lib/src/material/segmented_button.dart @@ -171,7 +171,7 @@ class SegmentedButton extends StatefulWidget { /// If false, only one segment may be selected at a time. When a segment /// is selected, any previously selected segment will be unselected. /// - /// The default is false, so only a single segement may be selected at one + /// The default is false, so only a single segment may be selected at one /// time. final bool multiSelectionEnabled; diff --git a/packages/flutter/lib/src/material/tab_indicator.dart b/packages/flutter/lib/src/material/tab_indicator.dart index 1b46a7f06e2..2b85e19abdc 100644 --- a/packages/flutter/lib/src/material/tab_indicator.dart +++ b/packages/flutter/lib/src/material/tab_indicator.dart @@ -26,7 +26,7 @@ class UnderlineTabIndicator extends Decoration { /// The radius of the indicator's corners. /// /// If this value is non-null, rounded rectangular tab indicator is - /// drawn, otherwise rectangular tab indictor is drawn. + /// drawn, otherwise rectangular tab indicator is drawn. final BorderRadius? borderRadius; /// The color and weight of the horizontal line drawn below the selected tab. diff --git a/packages/flutter/lib/src/material/tooltip.dart b/packages/flutter/lib/src/material/tooltip.dart index cae3acf9528..6fb42527111 100644 --- a/packages/flutter/lib/src/material/tooltip.dart +++ b/packages/flutter/lib/src/material/tooltip.dart @@ -309,8 +309,8 @@ class Tooltip extends StatefulWidget { /// /// See also: /// - /// * [exitDuration], which allows configuring the time untill a pointer - /// dissapears when hovering. + /// * [exitDuration], which allows configuring the time until a pointer + /// disappears when hovering. final Duration? showDuration; /// The length of time that a pointer must have stopped hovering over a @@ -529,7 +529,7 @@ class TooltipState extends State with SingleTickerProviderStateMixin { _timer?.cancel(); _timer = null; // Use _backingController instead of _controller to prevent the lazy getter - // from instaniating an AnimationController unnecessarily. + // from instantiating an AnimationController unnecessarily. switch (_backingController?.status) { case null: case AnimationStatus.reverse: @@ -656,7 +656,7 @@ class TooltipState extends State with SingleTickerProviderStateMixin { // both the delete icon tooltip and the chip tooltip at the same time. // 2. Hovered tooltips are dismissed when: // i. [dismissAllToolTips] is called, even these tooltips are still hovered - // ii. a unrecognized PointerDownEvent occured withint the application + // ii. a unrecognized PointerDownEvent occurred within the application // (even these tooltips are still hovered), // iii. The last hovering device leaves the tooltip. void _handleMouseEnter(PointerEnterEvent event) { diff --git a/packages/flutter/lib/src/painting/text_scaler.dart b/packages/flutter/lib/src/painting/text_scaler.dart index 554cfb892fa..c13d43b7e22 100644 --- a/packages/flutter/lib/src/painting/text_scaler.dart +++ b/packages/flutter/lib/src/painting/text_scaler.dart @@ -14,7 +14,7 @@ import 'package:flutter/foundation.dart'; /// /// The [==] operator defines the equality of 2 [TextScaler]s, which the /// framework uses to determine whether text widgets should rebuild when their -/// [TextScaler] changes. Consider overridding the [==] operator if applicable +/// [TextScaler] changes. Consider overriding the [==] operator if applicable /// to avoid unnecessary rebuilds. @immutable abstract class TextScaler { diff --git a/packages/flutter/lib/src/painting/text_style.dart b/packages/flutter/lib/src/painting/text_style.dart index ab01cc5e96d..42844d9bb62 100644 --- a/packages/flutter/lib/src/painting/text_style.dart +++ b/packages/flutter/lib/src/painting/text_style.dart @@ -469,7 +469,7 @@ class TextStyle with Diagnosticable { /// /// On Apple devices the strings 'CupertinoSystemText' and /// 'CupertinoSystemDisplay' are used in [fontFamily] as proxies for the - /// Apple system fonts. They currently redirect to the equivilant of SF Pro + /// Apple system fonts. They currently redirect to the equivalent of SF Pro /// Text and SF Pro Display respectively. 'CupertinoSystemText' is designed /// for fonts below 20 point size, and 'CupertinoSystemDisplay' is recommended /// for sizes 20 and above. When used on non-Apple platforms, these strings @@ -568,7 +568,7 @@ class TextStyle with Diagnosticable { /// /// When running on Apple devices, the strings 'CupertinoSystemText' and /// 'CupertinoSystemDisplay' are used as proxies for the Apple system fonts. - /// They currently redirect to the equivilant of SF Pro Text and SF Pro Display + /// They currently redirect to the equivalent of SF Pro Text and SF Pro Display /// respectively. 'CupertinoSystemText' is designed for fonts below 20 point /// size, and 'CupertinoSystemDisplay' is recommended for sizes 20 and above. /// When used on non-Apple platforms, these strings will return the regular diff --git a/packages/flutter/lib/src/rendering/list_wheel_viewport.dart b/packages/flutter/lib/src/rendering/list_wheel_viewport.dart index 321e8279fe0..4984c15a911 100644 --- a/packages/flutter/lib/src/rendering/list_wheel_viewport.dart +++ b/packages/flutter/lib/src/rendering/list_wheel_viewport.dart @@ -908,10 +908,10 @@ class RenderListWheelViewport // differently if it intersects with the magnifier. // // `center` controls how items that partially intersect the center magnifier - // are rendered. If `center` is false, items are only painted cynlindrically. + // are rendered. If `center` is false, items are only painted cylindrically. // If `center` is true, only the clipped magnifier items are painted. // If `center` is null, partially intersecting items are painted both as the - // magnifier and cynlidrical item, while non-intersecting items are painted + // magnifier and cylindrical item, while non-intersecting items are painted // only cylindrically. // // This property is used to lift the opacity that would be applied to each diff --git a/packages/flutter/lib/src/rendering/paragraph.dart b/packages/flutter/lib/src/rendering/paragraph.dart index b3206fa7906..46f5080848d 100644 --- a/packages/flutter/lib/src/rendering/paragraph.dart +++ b/packages/flutter/lib/src/rendering/paragraph.dart @@ -165,7 +165,7 @@ mixin RenderInlineChildrenContainerDefaults on RenderBox, ContainerRenderObjectM /// The `boxes` list must be in logical order, which is the order each child /// is encountered when the user reads the text. Usually the length of the /// list equals [childCount], but it can be less than that, when some children - /// are ommitted due to ellipsing. It never exceeds [childCount]. + /// are omitted due to ellipsing. It never exceeds [childCount]. /// /// See also: /// diff --git a/packages/flutter/lib/src/semantics/semantics.dart b/packages/flutter/lib/src/semantics/semantics.dart index b7aab9c21a6..4889cd553ce 100644 --- a/packages/flutter/lib/src/semantics/semantics.dart +++ b/packages/flutter/lib/src/semantics/semantics.dart @@ -3405,7 +3405,7 @@ class SemanticsOwner extends ChangeNotifier { 'and its semantic information is not merged into a visible parent.' ), ErrorHint( - 'An invisible SemantiscNode makes the accessibility experience confusing, ' + 'An invisible SemanticsNode makes the accessibility experience confusing, ' 'as it does not provide any visual indication when the user selects it ' 'via accessibility technologies.' ), diff --git a/packages/flutter/lib/src/services/system_chrome.dart b/packages/flutter/lib/src/services/system_chrome.dart index 1ed5a0c88c9..3480d1eeda4 100644 --- a/packages/flutter/lib/src/services/system_chrome.dart +++ b/packages/flutter/lib/src/services/system_chrome.dart @@ -184,7 +184,7 @@ enum SystemUiMode { /// /// Used by [AppBar.systemOverlayStyle] for declaratively setting the style of /// the system overlays, and by [SystemChrome.setSystemUIOverlayStyle] for -/// imperatively setting the style of the systeme overlays. +/// imperatively setting the style of the system overlays. @immutable class SystemUiOverlayStyle { /// Creates a new [SystemUiOverlayStyle]. diff --git a/packages/flutter/lib/src/widgets/routes.dart b/packages/flutter/lib/src/widgets/routes.dart index 28f79e4b2ec..2e5aee9acbd 100644 --- a/packages/flutter/lib/src/widgets/routes.dart +++ b/packages/flutter/lib/src/widgets/routes.dart @@ -1451,7 +1451,7 @@ abstract class ModalRoute extends TransitionRoute with LocalHistoryRoute _correctSpellCheckResults( final bool currentSpanFoundElsewhere = foundIndex >= 0; if (currentSpanFoundExactly || currentSpanFoundExactlyWithOffset) { - // currentSpan was found at the same index in newText and resutsText + // currentSpan was found at the same index in newText and resultsText // or at the same index with the previously calculated adjustment by // the offset value, so apply it to new text by adding it to the list of // corrected results. @@ -208,7 +208,7 @@ TextSpan buildTextSpanWithSpellCheckSuggestions( // We will draw the TextSpan tree based on the composing region, if it is // available. - // TODO(camsim99): The two separate stratgies for building TextSpan trees + // TODO(camsim99): The two separate strategies for building TextSpan trees // based on the availability of a composing region should be merged: // https://github.com/flutter/flutter/issues/124142. final bool shouldConsiderComposingRegion = defaultTargetPlatform == TargetPlatform.android; diff --git a/packages/flutter/test/cupertino/text_field_test.dart b/packages/flutter/test/cupertino/text_field_test.dart index a136cf5e432..d55b62adf9a 100644 --- a/packages/flutter/test/cupertino/text_field_test.dart +++ b/packages/flutter/test/cupertino/text_field_test.dart @@ -4827,7 +4827,7 @@ void main() { TextSelection(baseOffset: 0, extentOffset: platformSelectsByLine ? 19 : 20), ); - // Clicking again moves the caret to the tapped positio. + // Clicking again moves the caret to the tapped position. await gesture.down(textFieldStart + const Offset(200.0, 9.0)); await tester.pump(); await gesture.up(); diff --git a/packages/flutter/test/gestures/monodrag_test.dart b/packages/flutter/test/gestures/monodrag_test.dart index bb583393ba5..bb4b7215b23 100644 --- a/packages/flutter/test/gestures/monodrag_test.dart +++ b/packages/flutter/test/gestures/monodrag_test.dart @@ -30,7 +30,7 @@ void main() { expect(recognizer.debugLastPendingEventTimestamp, null); // Not entirely clear how this can happen, but the bugs mentioned above show - // we can end up in this state empircally. + // we can end up in this state empirically. recognizer.acceptGesture(event.pointer); expect(recognizer.debugLastPendingEventTimestamp, null); }); diff --git a/packages/flutter/test/material/app_test.dart b/packages/flutter/test/material/app_test.dart index 116392ca35d..e5824b81329 100644 --- a/packages/flutter/test/material/app_test.dart +++ b/packages/flutter/test/material/app_test.dart @@ -1565,7 +1565,7 @@ void main() { await tester.pumpWidget(buildWidget()); await tester.pumpAndSettle(); - // Switch to dark theme with overriden animation curve. + // Switch to dark theme with overridden animation curve. await tester.pumpWidget(buildWidget( themeMode: ThemeMode.dark, animationStyle: AnimationStyle(curve: Curves.easeIn, @@ -1583,7 +1583,7 @@ void main() { // Scaffold background color is fully updated to dark theme. expect(tester.widget(find.byType(Material)).color, const Color(0xff1c1b1f)); - // Switch from dark to light theme with overriden animation duration. + // Switch from dark to light theme with overridden animation duration. await tester.pumpWidget(buildWidget(animationStyle: AnimationStyle.noAnimation)); await tester.pump(); await tester.pump(const Duration(milliseconds: 1)); diff --git a/packages/flutter/test/material/tab_bar_theme_test.dart b/packages/flutter/test/material/tab_bar_theme_test.dart index 2516e0d2114..dcb4fbfdd74 100644 --- a/packages/flutter/test/material/tab_bar_theme_test.dart +++ b/packages/flutter/test/material/tab_bar_theme_test.dart @@ -956,7 +956,7 @@ void main() { await tester.pumpWidget(buildTabBar(tabBarTheme: tabBarTheme)); final IconThemeData selectedTabIcon = IconTheme.of(tester.element(find.text(_tab1Text))); - final IconThemeData uselectedTabIcon = IconTheme.of(tester.element(find.text(_tab2Text))); + final IconThemeData unselectedTabIcon = IconTheme.of(tester.element(find.text(_tab2Text))); final TextStyle selectedTextStyle = tester.renderObject(find.text(_tab1Text)) .text.style!; final TextStyle unselectedTextStyle = tester.renderObject(find.text(_tab2Text)) @@ -967,7 +967,7 @@ void main() { expect(selectedTextStyle.color, labelStyle.color); expect(selectedTextStyle.fontStyle, labelStyle.fontStyle); // Unselected tab should use unselectedLabelStyle color. - expect(uselectedTabIcon.color, unselectedLabelStyle.color); + expect(unselectedTabIcon.color, unselectedLabelStyle.color); expect(unselectedTextStyle.color, unselectedLabelStyle.color); expect(unselectedTextStyle.fontStyle, unselectedLabelStyle.fontStyle); }); @@ -996,7 +996,7 @@ void main() { await tester.pumpWidget(buildTabBar()); IconThemeData selectedTabIcon = IconTheme.of(tester.element(find.text(_tab1Text))); - IconThemeData uselectedTabIcon = IconTheme.of(tester.element(find.text(_tab2Text))); + IconThemeData unselectedTabIcon = IconTheme.of(tester.element(find.text(_tab2Text))); TextStyle selectedTextStyle = tester.renderObject(find.text(_tab1Text)) .text.style!; TextStyle unselectedTextStyle = tester.renderObject(find.text(_tab2Text)) @@ -1007,7 +1007,7 @@ void main() { expect(selectedTextStyle.color, labelStyle.color); expect(selectedTextStyle.fontStyle, labelStyle.fontStyle); // Unselected tab should use the unselectedLabelStyle color. - expect(uselectedTabIcon.color, unselectedLabelStyle.color); + expect(unselectedTabIcon.color, unselectedLabelStyle.color); expect(unselectedTextStyle.color, unselectedLabelStyle.color); expect(unselectedTextStyle.fontStyle, unselectedLabelStyle.fontStyle); @@ -1022,7 +1022,7 @@ void main() { await tester.pumpAndSettle(); selectedTabIcon = IconTheme.of(tester.element(find.text(_tab1Text))); - uselectedTabIcon = IconTheme.of(tester.element(find.text(_tab2Text))); + unselectedTabIcon = IconTheme.of(tester.element(find.text(_tab2Text))); selectedTextStyle = tester.renderObject(find.text(_tab1Text)).text.style!; unselectedTextStyle = tester.renderObject(find.text(_tab2Text)).text.style!; @@ -1031,7 +1031,7 @@ void main() { expect(selectedTextStyle.color, labelColor); expect(selectedTextStyle.fontStyle, labelStyle.fontStyle); // Unselected tab should use the unselectedLabelColor. - expect(uselectedTabIcon.color, unselectedLabelColor); + expect(unselectedTabIcon.color, unselectedLabelColor); expect(unselectedTextStyle.color, unselectedLabelColor); expect(unselectedTextStyle.fontStyle, unselectedLabelStyle.fontStyle); }); @@ -1073,7 +1073,7 @@ void main() { await tester.pumpWidget(buildTabBar()); IconThemeData selectedTabIcon = IconTheme.of(tester.element(find.text(_tab1Text))); - IconThemeData uselectedTabIcon = IconTheme.of(tester.element(find.text(_tab2Text))); + IconThemeData unselectedTabIcon = IconTheme.of(tester.element(find.text(_tab2Text))); TextStyle selectedTextStyle = tester.renderObject(find.text(_tab1Text)) .text.style!; TextStyle unselectedTextStyle = tester.renderObject(find.text(_tab2Text)) @@ -1084,7 +1084,7 @@ void main() { expect(selectedTextStyle.color, labelStyle.color); expect(selectedTextStyle.fontStyle, labelStyle.fontStyle); // Unselected tab should use the [TabBar.unselectedLabelStyle] color. - expect(uselectedTabIcon.color, unselectedLabelStyle.color); + expect(unselectedTabIcon.color, unselectedLabelStyle.color); expect(unselectedTextStyle.color, unselectedLabelStyle.color); expect(unselectedTextStyle.fontStyle, unselectedLabelStyle.fontStyle); @@ -1096,7 +1096,7 @@ void main() { await tester.pumpAndSettle(); selectedTabIcon = IconTheme.of(tester.element(find.text(_tab1Text))); - uselectedTabIcon = IconTheme.of(tester.element(find.text(_tab2Text))); + unselectedTabIcon = IconTheme.of(tester.element(find.text(_tab2Text))); selectedTextStyle = tester.renderObject(find.text(_tab1Text)).text.style!; unselectedTextStyle = tester.renderObject(find.text(_tab2Text)).text.style!; @@ -1105,7 +1105,7 @@ void main() { expect(selectedTextStyle.color, labelColor); expect(selectedTextStyle.fontStyle, labelStyle.fontStyle); // Unselected tab should use the [TabBarTheme.unselectedLabelColor]. - expect(uselectedTabIcon.color, unselectedLabelColor); + expect(unselectedTabIcon.color, unselectedLabelColor); expect(unselectedTextStyle.color, unselectedLabelColor); expect(unselectedTextStyle.fontStyle, unselectedLabelStyle.fontStyle); }); @@ -1484,12 +1484,12 @@ void main() { await tester.pumpWidget(buildTabBar(tabBarTheme: tabBarTheme)); final IconThemeData selectedTabIcon = IconTheme.of(tester.element(find.text(_tab1Text))); - final IconThemeData uselectedTabIcon = IconTheme.of(tester.element(find.text(_tab2Text))); + final IconThemeData unselectedTabIcon = IconTheme.of(tester.element(find.text(_tab2Text))); final TextStyle selectedTextStyle = tester.renderObject(find.text(_tab1Text)).text.style!; final TextStyle unselectedTextStyle = tester.renderObject(find.text(_tab2Text)).text.style!; expect(selectedTabIcon.color, selectedColor); - expect(uselectedTabIcon.color, unselectedColor); + expect(unselectedTabIcon.color, unselectedColor); expect(selectedTextStyle.color, selectedColor); expect(unselectedTextStyle.color, unselectedColor); }); @@ -1513,12 +1513,12 @@ void main() { await tester.pumpWidget(buildTabBar(tabBarTheme: tabBarTheme)); IconThemeData selectedTabIcon = IconTheme.of(tester.element(find.text(_tab1Text))); - IconThemeData uselectedTabIcon = IconTheme.of(tester.element(find.text(_tab2Text))); + IconThemeData unselectedTabIcon = IconTheme.of(tester.element(find.text(_tab2Text))); TextStyle selectedTextStyle = tester.renderObject(find.text(_tab1Text)).text.style!; TextStyle unselectedTextStyle = tester.renderObject(find.text(_tab2Text)).text.style!; expect(selectedTabIcon.color, selectedStateColor); - expect(uselectedTabIcon.color, unselectedStateColor); + expect(unselectedTabIcon.color, unselectedStateColor); expect(selectedTextStyle.color, selectedStateColor); expect(unselectedTextStyle.color, unselectedStateColor); @@ -1531,12 +1531,12 @@ void main() { await tester.pumpAndSettle(); selectedTabIcon = IconTheme.of(tester.element(find.text(_tab1Text))); - uselectedTabIcon = IconTheme.of(tester.element(find.text(_tab2Text))); + unselectedTabIcon = IconTheme.of(tester.element(find.text(_tab2Text))); selectedTextStyle = tester.renderObject(find.text(_tab1Text)).text.style!; unselectedTextStyle = tester.renderObject(find.text(_tab2Text)).text.style!; expect(selectedTabIcon.color, selectedColor); - expect(uselectedTabIcon.color, unselectedColor); + expect(unselectedTabIcon.color, unselectedColor); expect(selectedTextStyle.color, selectedColor); expect(unselectedTextStyle.color, unselectedColor); }); diff --git a/packages/flutter/test/material/tabs_test.dart b/packages/flutter/test/material/tabs_test.dart index 536bbf04f1a..f2c6cb92023 100644 --- a/packages/flutter/test/material/tabs_test.dart +++ b/packages/flutter/test/material/tabs_test.dart @@ -4679,12 +4679,12 @@ void main() { )); final IconThemeData selectedTabIcon = IconTheme.of(tester.element(find.text(tab1))); - final IconThemeData uselectedTabIcon = IconTheme.of(tester.element(find.text(tab2))); + final IconThemeData unselectedTabIcon = IconTheme.of(tester.element(find.text(tab2))); final TextStyle selectedTextStyle = tester.renderObject(find.text(tab1)).text.style!; final TextStyle unselectedTextStyle = tester.renderObject(find.text(tab2)).text.style!; expect(selectedTabIcon.color, selectedColor); - expect(uselectedTabIcon.color, unselectedColor); + expect(unselectedTabIcon.color, unselectedColor); expect(selectedTextStyle.color, selectedColor); expect(unselectedTextStyle.color, unselectedColor); }); @@ -4723,12 +4723,12 @@ void main() { await tester.pumpWidget(buildTabBar()); IconThemeData selectedTabIcon = IconTheme.of(tester.element(find.text(tab1))); - IconThemeData uselectedTabIcon = IconTheme.of(tester.element(find.text(tab2))); + IconThemeData unselectedTabIcon = IconTheme.of(tester.element(find.text(tab2))); TextStyle selectedTextStyle = tester.renderObject(find.text(tab1)).text.style!; TextStyle unselectedTextStyle = tester.renderObject(find.text(tab2)).text.style!; expect(selectedTabIcon.color, selectedStateColor); - expect(uselectedTabIcon.color, unselectedStateColor); + expect(unselectedTabIcon.color, unselectedStateColor); expect(selectedTextStyle.color, selectedStateColor); expect(unselectedTextStyle.color, unselectedStateColor); @@ -4736,12 +4736,12 @@ void main() { await tester.pumpWidget(buildTabBar(stateColor: false)); selectedTabIcon = IconTheme.of(tester.element(find.text(tab1))); - uselectedTabIcon = IconTheme.of(tester.element(find.text(tab2))); + unselectedTabIcon = IconTheme.of(tester.element(find.text(tab2))); selectedTextStyle = tester.renderObject(find.text(tab1)).text.style!; unselectedTextStyle = tester.renderObject(find.text(tab2)).text.style!; expect(selectedTabIcon.color, selectedColor); - expect(uselectedTabIcon.color, unselectedColor); + expect(unselectedTabIcon.color, unselectedColor); expect(selectedTextStyle.color, selectedColor); expect(unselectedTextStyle.color, unselectedColor); }); @@ -6553,7 +6553,7 @@ void main() { )); final IconThemeData selectedTabIcon = IconTheme.of(tester.element(find.text(tab1))); - final IconThemeData uselectedTabIcon = IconTheme.of(tester.element(find.text(tab2))); + final IconThemeData unselectedTabIcon = IconTheme.of(tester.element(find.text(tab2))); final TextStyle selectedTextStyle = tester.renderObject(find.text(tab1)).text.style!; final TextStyle unselectedTextStyle = tester.renderObject(find.text(tab2)).text.style!; @@ -6562,7 +6562,7 @@ void main() { expect(selectedTextStyle.color, labelStyle.color); expect(selectedTextStyle.fontStyle, labelStyle.fontStyle); // Unselected tab should use the unselectedLabelStyle color. - expect(uselectedTabIcon.color, unselectedLabelStyle.color); + expect(unselectedTabIcon.color, unselectedLabelStyle.color); expect(unselectedTextStyle.color, unselectedLabelStyle.color); expect(unselectedTextStyle.fontStyle, unselectedLabelStyle.fontStyle); }); @@ -6604,7 +6604,7 @@ void main() { await tester.pumpWidget(buildTabBar()); IconThemeData selectedTabIcon = IconTheme.of(tester.element(find.text(tab1))); - IconThemeData uselectedTabIcon = IconTheme.of(tester.element(find.text(tab2))); + IconThemeData unselectedTabIcon = IconTheme.of(tester.element(find.text(tab2))); TextStyle selectedTextStyle = tester.renderObject(find.text(tab1)).text.style!; TextStyle unselectedTextStyle = tester.renderObject(find.text(tab2)).text.style!; @@ -6613,7 +6613,7 @@ void main() { expect(selectedTextStyle.color, labelStyle.color); expect(selectedTextStyle.fontStyle, labelStyle.fontStyle); // Unselected tab should use unselectedLabelStyle color. - expect(uselectedTabIcon.color, unselectedLabelStyle.color); + expect(unselectedTabIcon.color, unselectedLabelStyle.color); expect(unselectedTextStyle.color, unselectedLabelStyle.color); expect(unselectedTextStyle.fontStyle, unselectedLabelStyle.fontStyle); @@ -6622,7 +6622,7 @@ void main() { await tester.pumpAndSettle(); selectedTabIcon = IconTheme.of(tester.element(find.text(tab1))); - uselectedTabIcon = IconTheme.of(tester.element(find.text(tab2))); + unselectedTabIcon = IconTheme.of(tester.element(find.text(tab2))); selectedTextStyle = tester.renderObject(find.text(tab1)).text.style!; unselectedTextStyle = tester.renderObject(find.text(tab2)).text.style!; @@ -6631,7 +6631,7 @@ void main() { expect(selectedTextStyle.color, labelColor); expect(selectedTextStyle.fontStyle, labelStyle.fontStyle); // Unselected tab should use the unselectedLabelColor. - expect(uselectedTabIcon.color, unselectedLabelColor); + expect(unselectedTabIcon.color, unselectedLabelColor); expect(unselectedTextStyle.color, unselectedLabelColor); expect(unselectedTextStyle.fontStyle, unselectedLabelStyle.fontStyle); }); diff --git a/packages/flutter/test/material/text_field_test.dart b/packages/flutter/test/material/text_field_test.dart index 1b32956df4f..62746b42abb 100644 --- a/packages/flutter/test/material/text_field_test.dart +++ b/packages/flutter/test/material/text_field_test.dart @@ -11135,7 +11135,7 @@ void main() { TextSelection(baseOffset: 0, extentOffset: platformSelectsByLine ? 19 : 20), ); - // Clicking again moves the caret to the tapped positio. + // Clicking again moves the caret to the tapped position. await gesture.down(textFieldStart + const Offset(210.0, 9.0)); await tester.pump(); await gesture.up(); @@ -11768,7 +11768,7 @@ void main() { ), ); - // This extra pump is so autofocus can propogate to renderEditable. + // This extra pump is so autofocus can propagate to renderEditable. await tester.pump(); final Offset ePos = textOffsetToPosition(tester, 6); // Index of 'Atwate|r' @@ -11892,7 +11892,7 @@ void main() { ), ); - // This extra pump is so autofocus can propogate to renderEditable. + // This extra pump is so autofocus can propagate to renderEditable. await tester.pump(); final Offset textfieldStart = tester.getTopLeft(find.byType(TextField)); @@ -12209,7 +12209,7 @@ void main() { ), ); - // This extra pump is so autofocus can propogate to renderEditable. + // This extra pump is so autofocus can propagate to renderEditable. await tester.pump(); final RenderEditable renderEditable = findRenderEditable(tester); @@ -12442,7 +12442,7 @@ void main() { ), ); - // This extra pump is so autofocus can propogate to renderEditable. + // This extra pump is so autofocus can propagate to renderEditable. await tester.pump(); // Just testing the test and making sure that the last character is outside @@ -12733,7 +12733,7 @@ void main() { ), ); - // This extra pump is so autofocus can propogate to renderEditable. + // This extra pump is so autofocus can propagate to renderEditable. await tester.pump(); // The second tap is slightly higher to avoid tapping the context menu on diff --git a/packages/flutter/test/material/tooltip_test.dart b/packages/flutter/test/material/tooltip_test.dart index d48bc4aa0cd..c9849c070ab 100644 --- a/packages/flutter/test/material/tooltip_test.dart +++ b/packages/flutter/test/material/tooltip_test.dart @@ -2430,7 +2430,7 @@ void main() { expect(find.text(tooltipText), findsNothing); }); - testWidgets('Hovered tooltips with showDuration set do dismiss when hovering elswhere', (WidgetTester tester) async { + testWidgets('Hovered tooltips with showDuration set do dismiss when hovering elsewhere', (WidgetTester tester) async { const Duration waitDuration = Duration.zero; const Duration showDuration = Duration(seconds: 1); @@ -2521,7 +2521,7 @@ void main() { await tester.pump(const Duration(milliseconds: 100)); await tester.pumpAndSettle(); expect(find.text(tooltipText), findsOneWidget, - reason: 'Tooltip should wait untill exitDuration expires before being hidden'); + reason: 'Tooltip should wait until exitDuration expires before being hidden'); await tester.pump(const Duration(seconds: 1)); await tester.pumpAndSettle(); diff --git a/packages/flutter/test/rendering/table_test.dart b/packages/flutter/test/rendering/table_test.dart index ccda8304105..198e4c04ce4 100644 --- a/packages/flutter/test/rendering/table_test.dart +++ b/packages/flutter/test/rendering/table_test.dart @@ -310,7 +310,7 @@ void main() { expect(columnWidth.flex([]), flexValue); }); - test('TableRows with differents constraints, but vertically with intrisicHeight', () { + test('TableRows with different constraints, but vertically with intrinsicHeight', () { const BoxConstraints firstConstraints = BoxConstraints.tightFor(width: 100, height: 100); const BoxConstraints secondConstraints = BoxConstraints.tightFor(width: 200, height: 200); diff --git a/packages/flutter/test/semantics/semantics_test.dart b/packages/flutter/test/semantics/semantics_test.dart index ec6ae2d1fd2..77b16082f99 100644 --- a/packages/flutter/test/semantics/semantics_test.dart +++ b/packages/flutter/test/semantics/semantics_test.dart @@ -271,7 +271,7 @@ void main() { 'SemanticsNode#0(dirty, merge boundary ⛔️, Rect.fromLTRB(0.0, 0.0, 0.0, 10.0), invisible)\n' 'which was added as the root SemanticsNode\n' 'An invisible SemanticsNode is one whose rect is not on screen hence not reachable for users, and its semantic information is not merged into a visible parent.\n' - 'An invisible SemantiscNode makes the accessibility experience confusing, as it does not provide any visual indication when the user selects it via accessibility technologies.\n' + 'An invisible SemanticsNode makes the accessibility experience confusing, as it does not provide any visual indication when the user selects it via accessibility technologies.\n' 'Consider removing the above invisible SemanticsNodes if they were added by your RenderObject.assembleSemanticsNode implementation, or filing a bug on GitHub:\n' ' https://github.com/flutter/flutter/issues/new?template=2_bug.yml' ), @@ -294,7 +294,7 @@ void main() { 'which was added as a child of:\n' ' SemanticsNode#0(dirty, Rect.fromLTRB(0.0, 0.0, 10.0, 10.0))\n' 'An invisible SemanticsNode is one whose rect is not on screen hence not reachable for users, and its semantic information is not merged into a visible parent.\n' - 'An invisible SemantiscNode makes the accessibility experience confusing, as it does not provide any visual indication when the user selects it via accessibility technologies.\n' + 'An invisible SemanticsNode makes the accessibility experience confusing, as it does not provide any visual indication when the user selects it via accessibility technologies.\n' 'Consider removing the above invisible SemanticsNodes if they were added by your RenderObject.assembleSemanticsNode implementation, or filing a bug on GitHub:\n' ' https://github.com/flutter/flutter/issues/new?template=2_bug.yml' ), diff --git a/packages/flutter/test/widgets/editable_text_test.dart b/packages/flutter/test/widgets/editable_text_test.dart index c4f160ee5d3..c5b0ad0b5b9 100644 --- a/packages/flutter/test/widgets/editable_text_test.dart +++ b/packages/flutter/test/widgets/editable_text_test.dart @@ -6092,7 +6092,7 @@ void main() { await tester.pump(); expect((renderEditable.text! as TextSpan).children, isNull); - // Everything's just formated the same way now. + // Everything's just formatted the same way now. expect((renderEditable.text! as TextSpan).text, 'text composing text'); expect(renderEditable.text!.style!.decoration, isNull); }); diff --git a/packages/flutter/test/widgets/html_element_view_test.dart b/packages/flutter/test/widgets/html_element_view_test.dart index dd8866e9faa..8cc3fa5946b 100644 --- a/packages/flutter/test/widgets/html_element_view_test.dart +++ b/packages/flutter/test/widgets/html_element_view_test.dart @@ -28,7 +28,7 @@ void main() { setUp(() { fakePlatformViewRegistry = FakePlatformViewRegistry(); - // Simulate the engine registering default factores. + // Simulate the engine registering default factories. fakePlatformViewRegistry.registerViewFactory(ui_web.PlatformViewRegistry.defaultVisibleViewType, (int viewId, {Object? params}) { params!; params as Map; diff --git a/packages/flutter/test/widgets/restoration_mixin_test.dart b/packages/flutter/test/widgets/restoration_mixin_test.dart index e11a60ed4dd..82b81e7bed5 100644 --- a/packages/flutter/test/widgets/restoration_mixin_test.dart +++ b/packages/flutter/test/widgets/restoration_mixin_test.dart @@ -669,7 +669,7 @@ class _TestRestorableWidget extends StatefulWidget { class _TestRestorableWidgetState extends State<_TestRestorableWidget> with RestorationMixin { final _TestRestorableProperty property = _TestRestorableProperty(10); _TestRestorableProperty? additionalProperty; - bool _rerigisterAdditionalProperty = false; + bool _reregisterAdditionalProperty = false; final List restoreStateLog = []; final List toggleBucketLog = []; @@ -678,7 +678,7 @@ class _TestRestorableWidgetState extends State<_TestRestorableWidget> with Resto void restoreState(RestorationBucket? oldBucket, bool initialRestore) { restoreStateLog.add(oldBucket); registerForRestoration(property, 'foo'); - if (_rerigisterAdditionalProperty && additionalProperty != null) { + if (_reregisterAdditionalProperty && additionalProperty != null) { registerForRestoration(additionalProperty!, 'additional'); } } @@ -712,7 +712,7 @@ class _TestRestorableWidgetState extends State<_TestRestorableWidget> with Resto void registerAdditionalProperty({bool reregister = true}) { additionalProperty ??= _TestRestorableProperty(11); registerForRestoration(additionalProperty!, 'additional'); - _rerigisterAdditionalProperty = reregister; + _reregisterAdditionalProperty = reregister; } void unregisterAdditionalProperty() { diff --git a/packages/flutter/test/widgets/selectable_region_test.dart b/packages/flutter/test/widgets/selectable_region_test.dart index b20caf1c3ac..24c0f596239 100644 --- a/packages/flutter/test/widgets/selectable_region_test.dart +++ b/packages/flutter/test/widgets/selectable_region_test.dart @@ -2077,7 +2077,7 @@ void main() { ); final Offset gestureOffset = tester.getCenter(find.byKey(flutterLogo).first); - // Right click on unseletable element. + // Right click on unselectable element. final TestGesture gesture = await tester.startGesture(gestureOffset, kind: PointerDeviceKind.mouse, buttons: kSecondaryMouseButton); addTearDown(gesture.removePointer); await tester.pump(); diff --git a/packages/flutter/test/widgets/table_test.dart b/packages/flutter/test/widgets/table_test.dart index 3e7d813cfcb..50eac0e5759 100644 --- a/packages/flutter/test/widgets/table_test.dart +++ b/packages/flutter/test/widgets/table_test.dart @@ -1001,7 +1001,7 @@ void main() { expect(table.column(2).last.runtimeType, isNot(toBeReplaced)); }); - testWidgets('Do not crash if a child that has not been layed out in a previous build is removed', (WidgetTester tester) async { + testWidgets('Do not crash if a child that has not been laid out in a previous build is removed', (WidgetTester tester) async { // Regression test for https://github.com/flutter/flutter/issues/60488. Widget buildTable(Key key) { return Directionality( @@ -1023,7 +1023,7 @@ void main() { await tester.pumpWidget( buildTable(const ValueKey(1)), - null, EnginePhase.build, // Children are not layed out! + null, EnginePhase.build, // Children are not laid out! ); await tester.pumpWidget( @@ -1079,7 +1079,7 @@ void main() { ); }); - testWidgets('Set defaultVerticalAlignment to intrisic height and check their heights', (WidgetTester tester) async { + testWidgets('Set defaultVerticalAlignment to intrinsic height and check their heights', (WidgetTester tester) async { final Widget table = Directionality( textDirection: TextDirection.ltr, child: Table( diff --git a/packages/flutter/test/widgets/text_selection_test.dart b/packages/flutter/test/widgets/text_selection_test.dart index f0a08da5f6d..f2c4e18b39c 100644 --- a/packages/flutter/test/widgets/text_selection_test.dart +++ b/packages/flutter/test/widgets/text_selection_test.dart @@ -695,7 +695,7 @@ void main() { }, variant: const TargetPlatformVariant({ TargetPlatform.android })); - testWidgets('test TextSelectionGestureDetectorBuilder shows spell check toolbar on single tap on iOS if word misspelled and text selection toolbar on additonal taps', (WidgetTester tester) async { + testWidgets('test TextSelectionGestureDetectorBuilder shows spell check toolbar on single tap on iOS if word misspelled and text selection toolbar on additional taps', (WidgetTester tester) async { await pumpTextSelectionGestureDetectorBuilder(tester); final FakeEditableTextState state = tester.state(find.byType(FakeEditableText)); final FakeRenderEditable renderEditable = tester.renderObject(find.byType(FakeEditable)); diff --git a/packages/flutter_test/lib/src/finders.dart b/packages/flutter_test/lib/src/finders.dart index 308555d539c..d3a9584a6e0 100644 --- a/packages/flutter_test/lib/src/finders.dart +++ b/packages/flutter_test/lib/src/finders.dart @@ -23,7 +23,7 @@ typedef SemanticsNodePredicate = bool Function(SemanticsNode node); /// Signature for [FinderBase.describeMatch]. typedef DescribeMatchCallback = String Function(Plurality plurality); -/// The `CandidateType` of finders that search for and filter subtrings, +/// The `CandidateType` of finders that search for and filter substrings, /// within static text rendered by [RenderParagraph]s. final class TextRangeContext { const TextRangeContext._(this.view, this.renderObject, this.textRange); @@ -36,7 +36,7 @@ final class TextRangeContext { /// The RenderObject that contains the static text. final RenderParagraph renderObject; - /// The [TextRange] of the subtring within [renderObject]'s text. + /// The [TextRange] of the substring within [renderObject]'s text. final TextRange textRange; @override diff --git a/packages/flutter_test/lib/src/tree_traversal.dart b/packages/flutter_test/lib/src/tree_traversal.dart index 5ae34e797c7..71aa2d932d0 100644 --- a/packages/flutter_test/lib/src/tree_traversal.dart +++ b/packages/flutter_test/lib/src/tree_traversal.dart @@ -143,7 +143,7 @@ class _DepthFirstElementTreeIterator extends _DepthFirstTreeIterator { /// This will iterate in the same order expected from accessibility services, /// so the results can be used to simulate the same traversal the engine will /// make. The results are not filtered based on flags or visibility, so they -/// will need to be further filtered to fully simulate an accessiblity service. +/// will need to be further filtered to fully simulate an accessibility service. class _DepthFirstSemanticsTreeIterator extends _DepthFirstTreeIterator { _DepthFirstSemanticsTreeIterator(super.root, this.order); diff --git a/packages/flutter_tools/lib/src/android/README.md b/packages/flutter_tools/lib/src/android/README.md index fbc870bac46..a6b9580b115 100644 --- a/packages/flutter_tools/lib/src/android/README.md +++ b/packages/flutter_tools/lib/src/android/README.md @@ -26,7 +26,7 @@ When updating the Android `compileSdkVersion`, `minSdkVersion`, or - Framework integration & benchmark tests are running with at least that SDK version. - Flutter tools tests that perform String checks with the current template -SDK verisons are updated (you should see these fail if you do not fix them +SDK versions are updated (you should see these fail if you do not fix them preemptively). #### Gradle @@ -43,7 +43,7 @@ When updating the Kotlin Gradle Plugin (KGP) version used in project templates (`templateKotlinGradlePluginVersion`), make sure that the framework integration & benchmark tests are running with at least this KGP version. -For information aboout the latest version, check https://kotlinlang.org/docs/releases.html#release-details. +For information about the latest version, check https://kotlinlang.org/docs/releases.html#release-details. #### The Android Gradle Plugin (AGP) When updating the Android Gradle Plugin (AGP) versions used in project templates @@ -52,7 +52,7 @@ make sure that: - Framework integration & benchmark tests are running with at least this AGP version. - Flutter tools tests that perform String checks with the current template -AGP verisons are updated (you should see these fail if you do not fix them +AGP versions are updated (you should see these fail if you do not fix them preemptively). ### A new version becomes available for... diff --git a/packages/flutter_tools/lib/src/android/android_device.dart b/packages/flutter_tools/lib/src/android/android_device.dart index 90f029371e6..fe05a59cb1c 100644 --- a/packages/flutter_tools/lib/src/android/android_device.dart +++ b/packages/flutter_tools/lib/src/android/android_device.dart @@ -611,7 +611,7 @@ class AndroidDevice extends Device { if (debuggingOptions.debuggingEnabled) { vmServiceDiscovery = ProtocolDiscovery.vmService( // Avoid using getLogReader, which returns a singleton instance, because the - // VM Service discovery will dipose at the end. creating a new logger here allows + // VM Service discovery will dispose at the end. creating a new logger here allows // logs to be surfaced normally during `flutter drive`. await AdbLogReader.createLogReader( this, diff --git a/packages/flutter_tools/lib/src/android/gradle_utils.dart b/packages/flutter_tools/lib/src/android/gradle_utils.dart index bf9843e8421..b3faa13c608 100644 --- a/packages/flutter_tools/lib/src/android/gradle_utils.dart +++ b/packages/flutter_tools/lib/src/android/gradle_utils.dart @@ -643,7 +643,7 @@ bool validateJavaAndAgp(Logger logger, return null; } -/// Returns valid Java range for specified Gradle and AGP verisons. +/// Returns valid Java range for specified Gradle and AGP versions. /// /// Assumes that gradleV and agpV are compatible versions. VersionRange getJavaVersionFor({required String gradleV, required String agpV}) { @@ -793,7 +793,7 @@ void exitWithNoSdkMessage() { 'Try setting the ANDROID_HOME environment variable.'); } -// Data class to hold normal/defined Java <-> Gradle compatability criteria. +// Data class to hold normal/defined Java <-> Gradle compatibility criteria. // // The [javaMax] is exclusive in terms of supporting the noted [gradleMin], // whereas [javaMin] is inclusive. diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart index 2e146fd6eea..6d7d5e96169 100644 --- a/packages/flutter_tools/lib/src/commands/create.dart +++ b/packages/flutter_tools/lib/src/commands/create.dart @@ -977,7 +977,7 @@ String getIncompatibleJavaGradleAgpMessageHeader( final String incompatibleDependency = javaGradleVersionsCompatible ? 'Android Gradle Plugin (AGP)' :'Gradle' ; final String incompatibleDependencyVersion = javaGradleVersionsCompatible ? 'AGP version $templateAgpVersion' : 'Gradle version $templateGradleVersion'; final VersionRange validJavaRange = gradle.getJavaVersionFor(gradleV: templateGradleVersion, agpV: templateAgpVersion); - // validJavaRange should have non-null verisonMin and versionMax since it based on our template AGP and Gradle versions. + // validJavaRange should have non-null versionMin and versionMax since it based on our template AGP and Gradle versions. final String validJavaRangeMessage = '(Java ${validJavaRange.versionMin!} <= compatible Java version < Java ${validJavaRange.versionMax!})'; return ''' diff --git a/packages/flutter_tools/lib/src/drive/web_driver_service.dart b/packages/flutter_tools/lib/src/drive/web_driver_service.dart index 1945c2eb711..8f6241a5de5 100644 --- a/packages/flutter_tools/lib/src/drive/web_driver_service.dart +++ b/packages/flutter_tools/lib/src/drive/web_driver_service.dart @@ -127,7 +127,7 @@ class WebDriverService extends DriverService { } if (debuggingOptions.webLaunchUrl != null) { - // It should thow an error if the provided url is invalid so no tryParse + // It should throw an error if the provided url is invalid so no tryParse _webUri = Uri.parse(debuggingOptions.webLaunchUrl!); } else { _webUri = _residentRunner.uri; diff --git a/packages/flutter_tools/lib/src/ios/core_devices.dart b/packages/flutter_tools/lib/src/ios/core_devices.dart index 0d3bcdd2a98..1e49950c37d 100644 --- a/packages/flutter_tools/lib/src/ios/core_devices.dart +++ b/packages/flutter_tools/lib/src/ios/core_devices.dart @@ -370,7 +370,7 @@ class IOSCoreDevice { required this.connectionProperties, required this.deviceProperties, required this.hardwareProperties, - required this.coreDeviceIdentifer, + required this.coreDeviceIdentifier, required this.visibilityClass, }); @@ -432,7 +432,7 @@ class IOSCoreDevice { connectionProperties: connectionProperties, deviceProperties: deviceProperties, hardwareProperties: hardwareProperties, - coreDeviceIdentifer: data['identifier']?.toString(), + coreDeviceIdentifier: data['identifier']?.toString(), visibilityClass: data['visibilityClass']?.toString(), ); } @@ -462,7 +462,7 @@ class IOSCoreDevice { @visibleForTesting final _IOSCoreDeviceHardwareProperties? hardwareProperties; - final String? coreDeviceIdentifer; + final String? coreDeviceIdentifier; final String? visibilityClass; } diff --git a/packages/flutter_tools/lib/src/ios/devices.dart b/packages/flutter_tools/lib/src/ios/devices.dart index 298ac50cfc7..b6d45223b2b 100644 --- a/packages/flutter_tools/lib/src/ios/devices.dart +++ b/packages/flutter_tools/lib/src/ios/devices.dart @@ -787,7 +787,7 @@ class IOSDevice extends Device { deviceLogReader.debuggerStream = iosDeployDebugger; } } - // Don't port foward if debugging with a wireless device. + // Don't port forward if debugging with a wireless device. return ProtocolDiscovery.vmService( deviceLogReader, portForwarder: isWirelesslyConnected ? null : portForwarder, diff --git a/packages/flutter_tools/lib/src/ios/xcode_debug.dart b/packages/flutter_tools/lib/src/ios/xcode_debug.dart index 778bc1af729..ac86858693b 100644 --- a/packages/flutter_tools/lib/src/ios/xcode_debug.dart +++ b/packages/flutter_tools/lib/src/ios/xcode_debug.dart @@ -434,18 +434,18 @@ class XcodeDebug { return; } final XmlNode launchAction = nodes.first; - final XmlAttribute? debuggerIdentifer = launchAction.attributes + final XmlAttribute? debuggerIdentifier = launchAction.attributes .where((XmlAttribute attribute) => attribute.localName == 'selectedDebuggerIdentifier') .firstOrNull; - final XmlAttribute? launcherIdentifer = launchAction.attributes + final XmlAttribute? launcherIdentifier = launchAction.attributes .where((XmlAttribute attribute) => attribute.localName == 'selectedLauncherIdentifier') .firstOrNull; - if (debuggerIdentifer == null || - launcherIdentifer == null || - !debuggerIdentifer.value.contains('LLDB') || - !launcherIdentifer.value.contains('LLDB')) { + if (debuggerIdentifier == null || + launcherIdentifier == null || + !debuggerIdentifier.value.contains('LLDB') || + !launcherIdentifier.value.contains('LLDB')) { throwToolExit(''' Your Xcode project is not setup to start a debugger. To fix this, launch Xcode and select "Product > Scheme > Edit Scheme", select "Run" in the sidebar, @@ -501,7 +501,7 @@ class XcodeAutomationScriptDebugResult { ); } - /// Whether this scheme action has completed (sucessfully or otherwise). Will + /// Whether this scheme action has completed (successfully or otherwise). Will /// be false if still running. final bool? completed; diff --git a/packages/flutter_tools/lib/src/macos/xcdevice.dart b/packages/flutter_tools/lib/src/macos/xcdevice.dart index b145d8d9dd7..226b47c5c69 100644 --- a/packages/flutter_tools/lib/src/macos/xcdevice.dart +++ b/packages/flutter_tools/lib/src/macos/xcdevice.dart @@ -196,7 +196,7 @@ class XCDevice { /// Observe identifiers (UDIDs) of devices as they attach and detach. /// /// Each attach and detach event contains information on the event type, - /// the event interface, and the device identifer. + /// the event interface, and the device identifier. Stream? observedDeviceEvents() { if (!isInstalled) { _logger.printTrace("Xcode not found. Run 'flutter doctor' for more information."); diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart index c79ace80827..906c9aba7f2 100644 --- a/packages/flutter_tools/lib/src/runner/flutter_command.dart +++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart @@ -366,7 +366,7 @@ abstract class FlutterCommand extends Command { return bundle.defaultMainPath; } - /// Indicates if the currenet command running has a terminal attached. + /// Indicates if the current command running has a terminal attached. bool get hasTerminal => globals.stdio.hasTerminal; /// Path to the Dart's package config file. diff --git a/packages/flutter_tools/templates/package_ffi/README.md.tmpl b/packages/flutter_tools/templates/package_ffi/README.md.tmpl index 3a636eb722d..05b96b01d68 100644 --- a/packages/flutter_tools/templates/package_ffi/README.md.tmpl +++ b/packages/flutter_tools/templates/package_ffi/README.md.tmpl @@ -8,7 +8,7 @@ This project is a starting point for a Flutter [FFI package](https://docs.flutter.dev/development/platform-integration/c-interop), a specialized package that includes native code directly invoked with Dart FFI. -## Project stucture +## Project structure This template uses the following structure: @@ -20,7 +20,7 @@ This template uses the following structure: * `bin`: Contains the `build.dart` that performs the external native builds. -## Buidling and bundling native code +## Building and bundling native code `build.dart` does the building of native components. diff --git a/packages/flutter_tools/templates/package_ffi/lib/projectName.dart.tmpl b/packages/flutter_tools/templates/package_ffi/lib/projectName.dart.tmpl index 2c3d5cd443c..7ac1e9906a0 100644 --- a/packages/flutter_tools/templates/package_ffi/lib/projectName.dart.tmpl +++ b/packages/flutter_tools/templates/package_ffi/lib/projectName.dart.tmpl @@ -98,7 +98,7 @@ Future _helperIsolateSendPort = () async { throw UnsupportedError('Unsupported message type: ${data.runtimeType}'); }); - // Send the the port to the main isolate on which we can receive requests. + // Send the port to the main isolate on which we can receive requests. sendPort.send(helperReceivePort.sendPort); }, receivePort.sendPort); diff --git a/packages/flutter_tools/test/general.shard/android/gradle_utils_test.dart b/packages/flutter_tools/test/general.shard/android/gradle_utils_test.dart index c4a1149a28d..b27f71d3a32 100644 --- a/packages/flutter_tools/test/general.shard/android/gradle_utils_test.dart +++ b/packages/flutter_tools/test/general.shard/android/gradle_utils_test.dart @@ -714,7 +714,7 @@ include ":app" final List testData = [ // Values too new *these need to be updated* when // max supported java and max known gradle versions are updated: - // Newer tools version does not even meet current gradle version requiremnts. + // Newer tools version does not even meet current gradle version requirements. JavaGradleTestData(false, javaVersion: '20', gradleVersion: '7.5'), // Newer tools version requires newer gradle version. JavaGradleTestData(true, javaVersion: '20', gradleVersion: '8.1'), diff --git a/packages/flutter_tools/test/general.shard/ios/core_devices_test.dart b/packages/flutter_tools/test/general.shard/ios/core_devices_test.dart index a8aecf4540a..3a9f59721a9 100644 --- a/packages/flutter_tools/test/general.shard/ios/core_devices_test.dart +++ b/packages/flutter_tools/test/general.shard/ios/core_devices_test.dart @@ -1341,7 +1341,7 @@ invalid JSON fakeProcessManager.addCommand(FakeCommand( command: args, onRun: () { - // Simulate that this command threw and simulataneously the OS + // Simulate that this command threw and simultaneously the OS // deleted the temp directory expect(tempFile, exists); tempDir.deleteSync(recursive: true); @@ -1470,7 +1470,7 @@ invalid JSON expect(devices[0].connectionProperties, isNotNull); expect(devices[0].deviceProperties, isNotNull); expect(devices[0].hardwareProperties, isNotNull); - expect(devices[0].coreDeviceIdentifer, '123456BB5-AEDE-7A22-B890-1234567890DD'); + expect(devices[0].coreDeviceIdentifier, '123456BB5-AEDE-7A22-B890-1234567890DD'); expect(devices[0].visibilityClass, 'default'); expect(fakeProcessManager, hasNoRemainingExpectations); @@ -1533,7 +1533,7 @@ invalid JSON expect(devices[0].connectionProperties, isNull); expect(devices[0].deviceProperties, isNull); expect(devices[0].hardwareProperties, isNull); - expect(devices[0].coreDeviceIdentifer, '123456BB5-AEDE-7A22-B890-1234567890DD'); + expect(devices[0].coreDeviceIdentifier, '123456BB5-AEDE-7A22-B890-1234567890DD'); expect(devices[0].visibilityClass, 'default'); expect(fakeProcessManager, hasNoRemainingExpectations); diff --git a/packages/flutter_tools/test/general.shard/project_test.dart b/packages/flutter_tools/test/general.shard/project_test.dart index 2a835129925..bd84f9d553a 100644 --- a/packages/flutter_tools/test/general.shard/project_test.dart +++ b/packages/flutter_tools/test/general.shard/project_test.dart @@ -1573,7 +1573,7 @@ void _testInMemory( ProcessManager: () => processManager ?? FakeProcessManager.any(), Java : () => java, AndroidStudio: () => androidStudio ?? FakeAndroidStudio(), - // Intentionlly null if not set. Some ios tests fail if this is a fake. + // Intentionally null if not set. Some ios tests fail if this is a fake. AndroidSdk: () => androidSdk, Cache: () => Cache( logger: globals.logger, diff --git a/packages/flutter_tools/test/integration.shard/break_on_framework_exceptions_test.dart b/packages/flutter_tools/test/integration.shard/break_on_framework_exceptions_test.dart index ea59152b81e..6e592c48d3d 100644 --- a/packages/flutter_tools/test/integration.shard/break_on_framework_exceptions_test.dart +++ b/packages/flutter_tools/test/integration.shard/break_on_framework_exceptions_test.dart @@ -49,7 +49,7 @@ void main() { int? breakLine; await _timeoutAfter( - message: 'Timed out getting source location of top stack frome', + message: 'Timed out getting source location of top stack frame', work: () async => breakLine = (await flutter.getSourceLocation())?.line, );