From 26b6c1bedda2a62bb0ce84cdd7932769d99f1e52 Mon Sep 17 00:00:00 2001 From: Lioness100 Date: Thu, 23 Feb 2023 14:43:21 -0500 Subject: [PATCH] Fix typos (#121171) * Fix typos * lowercase animated & opacity * Undo typo fix --------- Co-authored-by: Michael Goderbauer --- analysis_options.yaml | 2 +- .../windows/runner/win32_window.cpp | 2 +- .../windows/runner/win32_window.h | 2 +- dev/benchmarks/macrobenchmarks/lib/main.dart | 2 +- .../src/animated_complex_image_filtered.dart | 2 +- .../lib/src/animated_complex_opacity.dart | 2 +- .../lib/src/opacity_peephole.dart | 2 +- dev/bots/analyze.dart | 2 +- dev/bots/analyze_snippet_code.dart | 4 ++-- dev/bots/prepare_package.dart | 4 ++-- dev/bots/test/test_test.dart | 2 +- dev/conductor/core/lib/src/context.dart | 2 +- dev/conductor/core/lib/src/repository.dart | 2 +- dev/devicelab/lib/microbenchmarks.dart | 2 +- .../lib/tasks/flutter_tool_startup.dart | 2 +- .../androidviews/MainActivity.java | 4 ++-- .../transformations_demo_board.dart | 2 +- .../windows/runner/win32_window.cpp | 2 +- .../windows/runner/win32_window.h | 2 +- .../androidviews/MainActivity.java | 4 ++-- .../ui/windows/runner/win32_window.cpp | 2 +- .../ui/windows/runner/win32_window.h | 2 +- .../windows/runner/win32_window.cpp | 2 +- .../windows/runner/win32_window.h | 2 +- .../windows/runner/win32_window.cpp | 2 +- .../windows/runner/win32_window.h | 2 +- dev/tools/dartdoc.dart | 2 +- .../lib/testing_key_codes_cc_gen.dart | 8 +++---- .../lib/testing_key_codes_java_gen.dart | 6 ++--- .../dialog/cupertino_action_sheet.0.dart | 2 +- .../nav_bar/cupertino_sliver_nav_bar.0.dart | 2 +- .../context_menu_controller.0.dart | 2 +- .../material/filter_chip/filter_chip.0.dart | 2 +- .../navigation_drawer.0.dart | 2 +- .../navigation_rail/navigation_rail.0.dart | 12 +++++----- .../navigation_rail/navigation_rail.1.dart | 12 +++++----- .../linear_border/linear_border.0.dart | 2 +- .../lib/widgets/magnifier/magnifier.0.dart | 8 +++---- .../lib/widgets/sliver/sliver_opacity.1.dart | 2 +- .../text_magnifier/text_magnifier.0.dart | 2 +- .../choice_chip/choice_chip.0_test.dart | 8 +++---- .../divider/vertical_divider.0_test.dart | 2 +- .../material/list_tile/list_tile.4_test.dart | 2 +- .../text_magnifier/text_magnifier.0_test.dart | 8 +++---- examples/api/windows/runner/win32_window.cpp | 2 +- examples/api/windows/runner/win32_window.h | 2 +- .../windows/runner/win32_window.cpp | 2 +- .../windows/runner/win32_window.h | 2 +- .../windows/runner/win32_window.cpp | 2 +- .../hello_world/windows/runner/win32_window.h | 2 +- .../windows/runner/win32_window.cpp | 2 +- .../windows/runner/win32_window.h | 2 +- .../windows/runner/win32_window.cpp | 2 +- .../windows/runner/win32_window.h | 2 +- .../lib/src/cupertino/context_menu.dart | 2 +- .../flutter/lib/src/cupertino/magnifier.dart | 2 +- .../flutter/lib/src/cupertino/nav_bar.dart | 4 ++-- .../flutter/lib/src/cupertino/switch.dart | 2 +- .../src/foundation/memory_allocations.dart | 2 +- .../flutter/lib/src/material/date_picker.dart | 2 +- .../lib/src/material/date_picker_theme.dart | 2 +- .../lib/src/material/expansion_panel.dart | 2 +- .../flutter/lib/src/material/ink_sparkle.dart | 2 +- .../flutter/lib/src/material/magnifier.dart | 2 +- .../lib/src/material/navigation_bar.dart | 2 +- .../lib/src/material/navigation_drawer.dart | 4 ++-- .../lib/src/material/navigation_rail.dart | 16 ++++++------- .../flutter/lib/src/material/scaffold.dart | 4 ++-- .../lib/src/material/segmented_button.dart | 6 ++--- .../flutter/lib/src/material/snack_bar.dart | 2 +- .../flutter/lib/src/painting/text_style.dart | 2 +- .../flutter/lib/src/rendering/editable.dart | 4 ++-- .../flutter/lib/src/rendering/object.dart | 2 +- .../flutter/lib/src/scheduler/binding.dart | 6 ++--- packages/flutter/lib/src/services/dom.dart | 6 ++--- .../lib/src/services/hardware_keyboard.dart | 2 +- .../lib/src/services/raw_keyboard.dart | 2 +- .../lib/src/services/system_chrome.dart | 4 ++-- .../lib/src/services/text_boundary.dart | 2 +- .../lib/src/services/text_editing_delta.dart | 8 +++---- packages/flutter/lib/src/widgets/basic.dart | 2 +- .../default_text_editing_shortcuts.dart | 4 ++-- .../lib/src/widgets/editable_text.dart | 12 +++++----- .../flutter/lib/src/widgets/focus_scope.dart | 2 +- .../lib/src/widgets/focus_traversal.dart | 2 +- .../lib/src/widgets/implicit_animations.dart | 2 +- .../lib/src/widgets/modal_barrier.dart | 2 +- .../lib/src/widgets/platform_view.dart | 2 +- .../flutter/lib/src/widgets/scrollbar.dart | 2 +- .../lib/src/widgets/selectable_region.dart | 2 +- .../flutter/lib/src/widgets/spell_check.dart | 2 +- .../src/widgets/tap_and_drag_gestures.dart | 6 ++--- .../lib/src/widgets/text_selection.dart | 8 +++---- .../lib/src/widgets/widget_inspector.dart | 2 +- .../test/cupertino/magnifier_test.dart | 4 ++-- .../flutter/test/cupertino/nav_bar_test.dart | 2 +- .../cupertino/nav_bar_transition_test.dart | 2 +- .../test/cupertino/text_field_test.dart | 2 +- .../foundation/memory_allocations_test.dart | 10 ++++---- .../gesture_config_regression_test.dart | 6 ++--- .../flutter/test/gestures/resampler_test.dart | 2 +- .../flutter/test/material/checkbox_test.dart | 2 +- .../flutter/test/material/dialog_test.dart | 2 +- .../flutter/test/material/dropdown_test.dart | 2 +- .../test/material/input_decorator_test.dart | 2 +- .../flutter/test/material/magnifier_test.dart | 2 +- .../test/material/outlined_button_test.dart | 2 +- .../flutter/test/material/scaffold_test.dart | 6 ++--- .../flutter/test/material/slider_test.dart | 2 +- .../flutter/test/material/snack_bar_test.dart | 6 ++--- packages/flutter/test/material/tabs_test.dart | 2 +- .../test/material/text_field_test.dart | 2 +- .../test/material/typography_test.dart | 4 ++-- .../test/rendering/paragraph_test.dart | 24 +++++++++---------- .../test/semantics/semantics_test.dart | 2 +- .../test/services/text_formatter_test.dart | 2 +- .../test/widgets/default_colors_test.dart | 2 +- .../test/widgets/image_filter_test.dart | 6 ++--- .../test/widgets/media_query_test.dart | 2 +- .../flutter/test/widgets/scrollable_test.dart | 2 +- .../test/widgets/selectable_region_test.dart | 2 +- .../test/widgets/snapshot_widget_test.dart | 2 +- .../test/widgets/widget_inspector_test.dart | 6 ++--- packages/flutter/test_profile/README.md | 2 +- packages/flutter/test_release/README.md | 2 +- .../foundation/memory_allocations_test.dart | 6 ++--- .../rendering/memory_allocations_test.dart | 6 ++--- .../widgets/memory_allocations_test.dart | 6 ++--- .../lib/skia_client.dart | 2 +- packages/flutter_test/lib/src/controller.dart | 4 ++-- packages/flutter_test/lib/src/finders.dart | 2 +- .../flutter_test/test/controller_test.dart | 2 +- .../test/event_simulation_test.dart | 2 +- .../test/live_widget_controller_test.dart | 2 +- packages/flutter_tools/doc/daemon.md | 2 +- .../lib/src/android/android_device.dart | 2 +- .../flutter_tools/lib/src/base/build.dart | 2 +- packages/flutter_tools/lib/src/base/io.dart | 2 +- .../flutter_tools/lib/src/base/logger.dart | 4 ++-- packages/flutter_tools/lib/src/base/os.dart | 10 ++++---- .../lib/src/commands/custom_devices.dart | 4 ++-- .../flutter_tools/lib/src/commands/run.dart | 2 +- packages/flutter_tools/lib/src/daemon.dart | 2 +- packages/flutter_tools/lib/src/dart/pub.dart | 2 +- .../lib/src/debug_adapters/README.md | 2 +- .../src/debug_adapters/flutter_adapter.dart | 2 +- .../lib/src/flutter_project_metadata.dart | 2 +- .../lib/src/http_host_validator.dart | 2 +- .../flutter_tools/lib/src/ios/devices.dart | 2 +- packages/flutter_tools/lib/src/project.dart | 2 +- .../lib/src/resident_runner.dart | 2 +- .../flutter_tools/lib/src/web/bootstrap.dart | 1 + .../flutter_tools/lib/src/web/chrome.dart | 2 +- .../flutter_tools/lib/src/web/web_device.dart | 2 +- .../lib/src/windows/visual_studio.dart | 4 ++-- .../windows.tmpl/runner/win32_window.cpp | 2 +- .../windows.tmpl/runner/win32_window.h | 2 +- .../test/pluginClassSnakeCase_test.cc.tmpl | 2 +- .../templates/plugin_ffi/README.md.tmpl | 4 ++-- .../hermetic/custom_devices_test.dart | 4 ++-- .../commands.shard/hermetic/drive_test.dart | 2 +- .../commands.shard/permeable/create_test.dart | 2 +- ...ed_components_prebuild_validator_test.dart | 6 ++--- .../build_system/depfile_test.dart | 6 ++--- .../targets/shader_compiler_test.dart | 2 +- .../test/general.shard/dap/mocks.dart | 2 +- .../flutter_project_metadata_test.dart | 2 +- .../generate_localizations_test.dart | 2 +- .../proxied_devices/file_transfer_test.dart | 2 +- .../analyze_suggestions_integration_test.dart | 2 +- .../deprecated_gradle_settings_test.dart | 6 ++--- .../src/navigation_non_web/url_strategy.dart | 4 ++-- .../FlutterDeviceScreenshot.java | 2 +- packages/integration_test/lib/common.dart | 2 +- .../lib/integration_test.dart | 2 +- 175 files changed, 285 insertions(+), 284 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 8d8a4e1a35..1a69f9c157 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -221,7 +221,7 @@ linter: - unnecessary_string_interpolations - unnecessary_this - unnecessary_to_list_in_spreads - # - unreachable_from_main # Do not enable this rule until it is un-marked as "experimental" and carefully re-evaulated. + # - unreachable_from_main # Do not enable this rule until it is un-marked as "experimental" and carefully re-evaluated. - unrelated_type_equality_checks - unsafe_html - use_build_context_synchronously diff --git a/dev/benchmarks/complex_layout/windows/runner/win32_window.cpp b/dev/benchmarks/complex_layout/windows/runner/win32_window.cpp index 4021a2cfd4..8fef19b0fb 100644 --- a/dev/benchmarks/complex_layout/windows/runner/win32_window.cpp +++ b/dev/benchmarks/complex_layout/windows/runner/win32_window.cpp @@ -46,7 +46,7 @@ class WindowClassRegistrar { public: ~WindowClassRegistrar() = default; - // Returns the singleton registar instance. + // Returns the singleton registrar instance. static WindowClassRegistrar* GetInstance() { if (!instance_) { instance_ = new WindowClassRegistrar(); diff --git a/dev/benchmarks/complex_layout/windows/runner/win32_window.h b/dev/benchmarks/complex_layout/windows/runner/win32_window.h index 1dab1777c4..33786ecd6f 100644 --- a/dev/benchmarks/complex_layout/windows/runner/win32_window.h +++ b/dev/benchmarks/complex_layout/windows/runner/win32_window.h @@ -80,7 +80,7 @@ class Win32Window { // OS callback called by message pump. Handles the WM_NCCREATE message which // is passed when the non-client area is being created and enables automatic // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by + // responds to changes in DPI. All other messages are handled by // MessageHandler. static LRESULT CALLBACK WndProc(HWND const window, UINT const message, diff --git a/dev/benchmarks/macrobenchmarks/lib/main.dart b/dev/benchmarks/macrobenchmarks/lib/main.dart index 1a6f020f73..3dc1608a5a 100644 --- a/dev/benchmarks/macrobenchmarks/lib/main.dart +++ b/dev/benchmarks/macrobenchmarks/lib/main.dart @@ -201,7 +201,7 @@ class HomePage extends StatelessWidget { ), ElevatedButton( key: const Key(kColorFilterWithUnstableChildName), - child: const Text('Color Filter with Ustable Child'), + child: const Text('Color Filter with Unstable Child'), onPressed: () { Navigator.pushNamed(context, kColorFilterWithUnstableChildName); }, diff --git a/dev/benchmarks/macrobenchmarks/lib/src/animated_complex_image_filtered.dart b/dev/benchmarks/macrobenchmarks/lib/src/animated_complex_image_filtered.dart index e7a508c8f8..a231d668c3 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/animated_complex_image_filtered.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/animated_complex_image_filtered.dart @@ -5,7 +5,7 @@ import 'dart:ui' as ui; import 'package:flutter/material.dart'; -// Various tests to verify that Animated image filtered layers do not +// Various tests to verify that animated image filtered layers do not // dirty children even without explicit repaint boundaries. These intentionally use // text to ensure we don't measure the opacity peephole case. class AnimatedComplexImageFiltered extends StatefulWidget { diff --git a/dev/benchmarks/macrobenchmarks/lib/src/animated_complex_opacity.dart b/dev/benchmarks/macrobenchmarks/lib/src/animated_complex_opacity.dart index 3aecfcccc0..2dd0bccfa9 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/animated_complex_opacity.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/animated_complex_opacity.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; -// Various tests to verify that Aniamted opacity layers (i.e. FadeTransition) do not +// Various tests to verify that animated opacity layers (i.e. FadeTransition) do not // dirty children even without explicit repaint boundaries. These intentionally use // text to ensure we don't measure the opacity peephole case. class AnimatedComplexOpacity extends StatefulWidget { diff --git a/dev/benchmarks/macrobenchmarks/lib/src/opacity_peephole.dart b/dev/benchmarks/macrobenchmarks/lib/src/opacity_peephole.dart index c1ebc9249c..a596050a03 100644 --- a/dev/benchmarks/macrobenchmarks/lib/src/opacity_peephole.dart +++ b/dev/benchmarks/macrobenchmarks/lib/src/opacity_peephole.dart @@ -8,7 +8,7 @@ import 'package:flutter/material.dart'; import '../common.dart'; -// Various tests to verify that the Opacity layer propagates the opacity to various +// Various tests to verify that the opacity layer propagates the opacity to various // combinations of children that can apply it themselves. // See https://github.com/flutter/flutter/issues/75697 class OpacityPeepholePage extends StatelessWidget { diff --git a/dev/bots/analyze.dart b/dev/bots/analyze.dart index b76ba681f3..cfa3cc4ecc 100644 --- a/dev/bots/analyze.dart +++ b/dev/bots/analyze.dart @@ -1859,7 +1859,7 @@ Future verifyTabooDocumentation(String workingDirectory, { int minimumMatc if (errors.isNotEmpty) { foundError([ '${bold}Avoid the word "simply" in documentation. See https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#use-the-passive-voice-recommend-do-not-require-never-say-things-are-simple for details.$reset', - '${bold}In many cases thes words can be omitted without loss of generality; in other cases it may require a bit of rewording to avoid implying that the task is simple.$reset', + '${bold}In many cases these words can be omitted without loss of generality; in other cases it may require a bit of rewording to avoid implying that the task is simple.$reset', '${bold}Similarly, avoid using "note:" or the phrase "note that". See https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#avoid-empty-prose for details.$reset', ...errors, ]); diff --git a/dev/bots/analyze_snippet_code.dart b/dev/bots/analyze_snippet_code.dart index bc2cb99add..f6b6120ed4 100644 --- a/dev/bots/analyze_snippet_code.dart +++ b/dev/bots/analyze_snippet_code.dart @@ -385,7 +385,7 @@ class _SnippetChecker { /// A RegExp that matches the start of a code block within a regular comment. /// Such blocks are not analyzed. They can be used to give sample code for - /// internal (private) APIs where visibilty would make analyzing the sample + /// internal (private) APIs where visibility would make analyzing the sample /// code problematic. static final RegExp _uncheckedCodeBlockStartRegex = RegExp(r'^ *// *```dart$'); @@ -419,7 +419,7 @@ class _SnippetChecker { /// A RegExp that matches a line that ends with a semicolon (and maybe a comment) static final RegExp _trailingSemicolonRegExp = RegExp(r'^(.*);(| *//.*)$'); - /// A RegExp that matches a line that ends with a closing blace (and maybe a comment) + /// A RegExp that matches a line that ends with a closing brace (and maybe a comment) static final RegExp _trailingCloseBraceRegExp = RegExp(r'^(.*)}(| *//.*)$'); /// A RegExp that matches a line that only contains a commented-out ellipsis diff --git a/dev/bots/prepare_package.dart b/dev/bots/prepare_package.dart index 3222ca2692..85034e5742 100644 --- a/dev/bots/prepare_package.dart +++ b/dev/bots/prepare_package.dart @@ -287,7 +287,7 @@ class ArchiveCreator { /// Used when an output filename is not given. Future get _archiveName async { final String os = platform.operatingSystem.toLowerCase(); - // Include the intended host archetecture in the file name for non-x64. + // Include the intended host architecture in the file name for non-x64. final String arch = await _dartArch == 'x64' ? '' : '${await _dartArch}_'; // We don't use .tar.xz on Mac because although it can unpack them // on the command line (with tar), the "Archive Utility" that runs @@ -330,7 +330,7 @@ class ArchiveCreator { /// Validates the integrity of the release package. /// /// Currently only checks that macOS binaries are codesigned. Will throw a - /// [PreparePackageException] if the test failes. + /// [PreparePackageException] if the test fails. Future _validate() async { // Only validate in strict mode, which means `--publish` if (!strict || !platform.isMacOS) { diff --git a/dev/bots/test/test_test.dart b/dev/bots/test/test_test.dart index 9d9d4cc28f..c5c794f8aa 100644 --- a/dev/bots/test/test_test.dart +++ b/dev/bots/test/test_test.dart @@ -18,7 +18,7 @@ import 'common.dart'; void expectExitCode(ProcessResult result, int expectedExitCode) { if (result.exitCode != expectedExitCode) { fail( - 'Process ${result.pid} exitted with the wrong exit code.\n' + 'Process ${result.pid} exited with the wrong exit code.\n' '\n' 'EXPECTED: exit code $expectedExitCode\n' 'ACTUAL: exit code ${result.exitCode}\n' diff --git a/dev/conductor/core/lib/src/context.dart b/dev/conductor/core/lib/src/context.dart index e15b9c0939..0e15394cd1 100644 --- a/dev/conductor/core/lib/src/context.dart +++ b/dev/conductor/core/lib/src/context.dart @@ -26,7 +26,7 @@ abstract class Context { /// Confirm an action with the user before proceeding. /// - /// The default implementation reads from STDIN. This can be overriden in UI + /// The default implementation reads from STDIN. This can be overridden in UI /// implementations that capture user interaction differently. Future prompt(String message) async { stdio.write('${message.trim()} (y/n) '); diff --git a/dev/conductor/core/lib/src/repository.dart b/dev/conductor/core/lib/src/repository.dart index 525ef92614..fd505a4792 100644 --- a/dev/conductor/core/lib/src/repository.dart +++ b/dev/conductor/core/lib/src/repository.dart @@ -695,7 +695,7 @@ class FrameworkRepository extends Repository { /// Create a release candidate branch version file. /// - /// This file allows for easily traversing what candidadate branch was used + /// This file allows for easily traversing what candidate branch was used /// from a release channel. /// /// Returns [true] if the version file was updated and a commit is needed. diff --git a/dev/devicelab/lib/microbenchmarks.dart b/dev/devicelab/lib/microbenchmarks.dart index 72430f2791..0cf3d81924 100644 --- a/dev/devicelab/lib/microbenchmarks.dart +++ b/dev/devicelab/lib/microbenchmarks.dart @@ -6,7 +6,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; -/// Reades through the print commands from [process] waiting for the magic phase +/// Reads through the print commands from [process] waiting for the magic phase /// that contains microbenchmarks results as defined in /// `dev/benchmarks/microbenchmarks/lib/common.dart`. Future> readJsonResults(Process process) { diff --git a/dev/devicelab/lib/tasks/flutter_tool_startup.dart b/dev/devicelab/lib/tasks/flutter_tool_startup.dart index 771dfe9c60..6219dc5b60 100644 --- a/dev/devicelab/lib/tasks/flutter_tool_startup.dart +++ b/dev/devicelab/lib/tasks/flutter_tool_startup.dart @@ -33,7 +33,7 @@ Future flutterToolStartupBenchmarkTask() async { ).run()) .asMap('flutter_tool_startup_test'), - // `flutter test -d foo_device` in dir woth no `test` folder. + // `flutter test -d foo_device` in dir with no `test` folder. ...(await _Benchmark( projectDirectory, 'test startup with specified device', diff --git a/dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MainActivity.java b/dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MainActivity.java index 42b1c22418..39ae4eb28d 100644 --- a/dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MainActivity.java +++ b/dev/integration_tests/android_views/android/app/src/main/java/io/flutter/integration/androidviews/MainActivity.java @@ -82,8 +82,8 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { if (requestCode != STORAGE_PERMISSION_CODE || permissionResult == null) return; - boolean permisisonGranted = grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED; - sendPermissionResult(permisisonGranted); + boolean permissionGranted = grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED; + sendPermissionResult(permissionGranted); } diff --git a/dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart b/dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart index c1e02bef5e..080b902ced 100644 --- a/dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart +++ b/dev/integration_tests/flutter_gallery/lib/demo/transformations/transformations_demo_board.dart @@ -110,7 +110,7 @@ class Board extends IterableMixin { return distanceFromCenter <= boardRadius; } - // Get the distance between two BoardPoins. + // Get the distance between two BoardPoints. static int getDistance(BoardPoint a, BoardPoint b) { final Vector3 a3 = a.cubeCoordinates; final Vector3 b3 = b.cubeCoordinates; diff --git a/dev/integration_tests/flutter_gallery/windows/runner/win32_window.cpp b/dev/integration_tests/flutter_gallery/windows/runner/win32_window.cpp index 6a753c7633..14a183d7ea 100644 --- a/dev/integration_tests/flutter_gallery/windows/runner/win32_window.cpp +++ b/dev/integration_tests/flutter_gallery/windows/runner/win32_window.cpp @@ -64,7 +64,7 @@ class WindowClassRegistrar { public: ~WindowClassRegistrar() = default; - // Returns the singleton registar instance. + // Returns the singleton registrar instance. static WindowClassRegistrar* GetInstance() { if (!instance_) { instance_ = new WindowClassRegistrar(); diff --git a/dev/integration_tests/flutter_gallery/windows/runner/win32_window.h b/dev/integration_tests/flutter_gallery/windows/runner/win32_window.h index 84a27dc75d..bb93e88791 100644 --- a/dev/integration_tests/flutter_gallery/windows/runner/win32_window.h +++ b/dev/integration_tests/flutter_gallery/windows/runner/win32_window.h @@ -81,7 +81,7 @@ class Win32Window { // OS callback called by message pump. Handles the WM_NCCREATE message which // is passed when the non-client area is being created and enables automatic // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by + // responds to changes in DPI. All other messages are handled by // MessageHandler. static LRESULT CALLBACK WndProc(HWND const window, UINT const message, diff --git a/dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/MainActivity.java b/dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/MainActivity.java index 2f1e1b59d9..100f98dd3d 100644 --- a/dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/MainActivity.java +++ b/dev/integration_tests/hybrid_android_views/android/app/src/main/java/io/flutter/integration/androidviews/MainActivity.java @@ -143,8 +143,8 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { if (requestCode != STORAGE_PERMISSION_CODE || permissionResult == null) return; - boolean permisisonGranted = grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED; - sendPermissionResult(permisisonGranted); + boolean permissionGranted = grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED; + sendPermissionResult(permissionGranted); } private void getExternalStoragePermissions() { diff --git a/dev/integration_tests/ui/windows/runner/win32_window.cpp b/dev/integration_tests/ui/windows/runner/win32_window.cpp index 6a753c7633..14a183d7ea 100644 --- a/dev/integration_tests/ui/windows/runner/win32_window.cpp +++ b/dev/integration_tests/ui/windows/runner/win32_window.cpp @@ -64,7 +64,7 @@ class WindowClassRegistrar { public: ~WindowClassRegistrar() = default; - // Returns the singleton registar instance. + // Returns the singleton registrar instance. static WindowClassRegistrar* GetInstance() { if (!instance_) { instance_ = new WindowClassRegistrar(); diff --git a/dev/integration_tests/ui/windows/runner/win32_window.h b/dev/integration_tests/ui/windows/runner/win32_window.h index 84a27dc75d..bb93e88791 100644 --- a/dev/integration_tests/ui/windows/runner/win32_window.h +++ b/dev/integration_tests/ui/windows/runner/win32_window.h @@ -81,7 +81,7 @@ class Win32Window { // OS callback called by message pump. Handles the WM_NCCREATE message which // is passed when the non-client area is being created and enables automatic // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by + // responds to changes in DPI. All other messages are handled by // MessageHandler. static LRESULT CALLBACK WndProc(HWND const window, UINT const message, diff --git a/dev/integration_tests/windows_startup_test/windows/runner/win32_window.cpp b/dev/integration_tests/windows_startup_test/windows/runner/win32_window.cpp index 6a753c7633..14a183d7ea 100644 --- a/dev/integration_tests/windows_startup_test/windows/runner/win32_window.cpp +++ b/dev/integration_tests/windows_startup_test/windows/runner/win32_window.cpp @@ -64,7 +64,7 @@ class WindowClassRegistrar { public: ~WindowClassRegistrar() = default; - // Returns the singleton registar instance. + // Returns the singleton registrar instance. static WindowClassRegistrar* GetInstance() { if (!instance_) { instance_ = new WindowClassRegistrar(); diff --git a/dev/integration_tests/windows_startup_test/windows/runner/win32_window.h b/dev/integration_tests/windows_startup_test/windows/runner/win32_window.h index 84a27dc75d..bb93e88791 100644 --- a/dev/integration_tests/windows_startup_test/windows/runner/win32_window.h +++ b/dev/integration_tests/windows_startup_test/windows/runner/win32_window.h @@ -81,7 +81,7 @@ class Win32Window { // OS callback called by message pump. Handles the WM_NCCREATE message which // is passed when the non-client area is being created and enables automatic // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by + // responds to changes in DPI. All other messages are handled by // MessageHandler. static LRESULT CALLBACK WndProc(HWND const window, UINT const message, diff --git a/dev/manual_tests/windows/runner/win32_window.cpp b/dev/manual_tests/windows/runner/win32_window.cpp index 6a753c7633..14a183d7ea 100644 --- a/dev/manual_tests/windows/runner/win32_window.cpp +++ b/dev/manual_tests/windows/runner/win32_window.cpp @@ -64,7 +64,7 @@ class WindowClassRegistrar { public: ~WindowClassRegistrar() = default; - // Returns the singleton registar instance. + // Returns the singleton registrar instance. static WindowClassRegistrar* GetInstance() { if (!instance_) { instance_ = new WindowClassRegistrar(); diff --git a/dev/manual_tests/windows/runner/win32_window.h b/dev/manual_tests/windows/runner/win32_window.h index 84a27dc75d..bb93e88791 100644 --- a/dev/manual_tests/windows/runner/win32_window.h +++ b/dev/manual_tests/windows/runner/win32_window.h @@ -81,7 +81,7 @@ class Win32Window { // OS callback called by message pump. Handles the WM_NCCREATE message which // is passed when the non-client area is being created and enables automatic // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by + // responds to changes in DPI. All other messages are handled by // MessageHandler. static LRESULT CALLBACK WndProc(HWND const window, UINT const message, diff --git a/dev/tools/dartdoc.dart b/dev/tools/dartdoc.dart index b36464eeb7..8e9115d991 100644 --- a/dev/tools/dartdoc.dart +++ b/dev/tools/dartdoc.dart @@ -437,7 +437,7 @@ void sanityCheckDocs([Platform platform = const LocalPlatform()]) { // Check a "dartpad" example, any one will do, and check for the correct URL // arguments. - // Just use "master" for any branch other than the LUCH_BRANCH. + // Just use "master" for any branch other than the LUCI_BRANCH. final String? luciBranch = platform.environment['LUCI_BRANCH']?.trim(); final String expectedBranch = luciBranch != null && luciBranch.isNotEmpty ? luciBranch : 'master'; final List argumentRegExps = [ diff --git a/dev/tools/gen_keycodes/lib/testing_key_codes_cc_gen.dart b/dev/tools/gen_keycodes/lib/testing_key_codes_cc_gen.dart index 69cb48fce6..24d49abf7f 100644 --- a/dev/tools/gen_keycodes/lib/testing_key_codes_cc_gen.dart +++ b/dev/tools/gen_keycodes/lib/testing_key_codes_cc_gen.dart @@ -9,8 +9,8 @@ import 'logical_key_data.dart'; import 'physical_key_data.dart'; import 'utils.dart'; -String _toUpperCammel(String lowerCammel) { - return lowerCammel.substring(0, 1).toUpperCase() + lowerCammel.substring(1); +String _toUpperCamel(String lowerCamel) { + return lowerCamel.substring(0, 1).toUpperCase() + lowerCamel.substring(1); } /// Generates the common/testing/key_codes.h based on the information in the key @@ -23,7 +23,7 @@ class KeyCodesCcGenerator extends BaseCodeGenerator { final OutputLines lines = OutputLines('Physical Key list'); for (final PhysicalKeyEntry entry in keyData.entries) { lines.add(entry.usbHidCode, ''' -constexpr uint64_t kPhysical${_toUpperCammel(entry.constantName)} = ${toHex(entry.usbHidCode)};'''); +constexpr uint64_t kPhysical${_toUpperCamel(entry.constantName)} = ${toHex(entry.usbHidCode)};'''); } return lines.sortedJoin().trimRight(); } @@ -33,7 +33,7 @@ constexpr uint64_t kPhysical${_toUpperCammel(entry.constantName)} = ${toHex(entr final OutputLines lines = OutputLines('Logical Key list', behavior: DeduplicateBehavior.kSkip); for (final LogicalKeyEntry entry in logicalData.entries) { lines.add(entry.value, ''' -constexpr uint64_t kLogical${_toUpperCammel(entry.constantName)} = ${toHex(entry.value, digits: 11)};'''); +constexpr uint64_t kLogical${_toUpperCamel(entry.constantName)} = ${toHex(entry.value, digits: 11)};'''); } return lines.sortedJoin().trimRight(); } diff --git a/dev/tools/gen_keycodes/lib/testing_key_codes_java_gen.dart b/dev/tools/gen_keycodes/lib/testing_key_codes_java_gen.dart index bd1bd80626..91e808afa0 100644 --- a/dev/tools/gen_keycodes/lib/testing_key_codes_java_gen.dart +++ b/dev/tools/gen_keycodes/lib/testing_key_codes_java_gen.dart @@ -9,9 +9,9 @@ import 'logical_key_data.dart'; import 'physical_key_data.dart'; import 'utils.dart'; -String _toUpperSnake(String lowerCammel) { +String _toUpperSnake(String lowerCamel) { // Converts 'myTVFoo' to 'myTvFoo'. - final String trueUpperCammel = lowerCammel.replaceAllMapped( + final String trueUpperCamel = lowerCamel.replaceAllMapped( RegExp(r'([A-Z]{3,})'), (Match match) { final String matched = match.group(1)!; @@ -20,7 +20,7 @@ String _toUpperSnake(String lowerCammel) { + matched.substring(matched.length - 2, matched.length - 1); }); // Converts 'myTvFoo' to 'MY_TV_FOO'. - return trueUpperCammel.replaceAllMapped( + return trueUpperCamel.replaceAllMapped( RegExp(r'([A-Z])'), (Match match) => '_${match.group(1)!}').toUpperCase(); } diff --git a/examples/api/lib/cupertino/dialog/cupertino_action_sheet.0.dart b/examples/api/lib/cupertino/dialog/cupertino_action_sheet.0.dart index aa382ef7cc..5da52bbeaa 100644 --- a/examples/api/lib/cupertino/dialog/cupertino_action_sheet.0.dart +++ b/examples/api/lib/cupertino/dialog/cupertino_action_sheet.0.dart @@ -33,7 +33,7 @@ class ActionSheetExample extends StatelessWidget { actions: [ CupertinoActionSheetAction( /// This parameter indicates the action would be a default - /// defualt behavior, turns the action's text to bold text. + /// default behavior, turns the action's text to bold text. isDefaultAction: true, onPressed: () { Navigator.pop(context); diff --git a/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart b/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart index 281368337f..9175381a39 100644 --- a/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart +++ b/examples/api/lib/cupertino/nav_bar/cupertino_sliver_nav_bar.0.dart @@ -82,7 +82,7 @@ class NextPage extends StatelessWidget { ), // The middle widget is visible in both collapsed and expanded states. middle: const Text('Contacts Group'), - // When the "middle" parameter is implemented, the larget title is only visible + // When the "middle" parameter is implemented, the largest title is only visible // when the CupertinoSliverNavigationBar is fully expanded. largeTitle: const Text('Family'), ), diff --git a/examples/api/lib/material/context_menu/context_menu_controller.0.dart b/examples/api/lib/material/context_menu/context_menu_controller.0.dart index 2a901cf17b..9e128ea347 100644 --- a/examples/api/lib/material/context_menu/context_menu_controller.0.dart +++ b/examples/api/lib/material/context_menu/context_menu_controller.0.dart @@ -78,7 +78,7 @@ class _MyAppState extends State { }, // In this case this wraps a big open space in a GestureDetector in // order to show the context menu, but it could also wrap a single - // wiget like an Image to give it a context menu. + // widget like an Image to give it a context menu. child: ListView( children: [ Container(height: 20.0), diff --git a/examples/api/lib/material/filter_chip/filter_chip.0.dart b/examples/api/lib/material/filter_chip/filter_chip.0.dart index 0c62193c68..734b0dd209 100644 --- a/examples/api/lib/material/filter_chip/filter_chip.0.dart +++ b/examples/api/lib/material/filter_chip/filter_chip.0.dart @@ -45,7 +45,7 @@ class _FilterChipExampleState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Text('Choose an execise', style: textTheme.labelLarge), + Text('Choose an exercise', style: textTheme.labelLarge), const SizedBox(height: 5.0), Wrap( spacing: 5.0, diff --git a/examples/api/lib/material/navigation_drawer/navigation_drawer.0.dart b/examples/api/lib/material/navigation_drawer/navigation_drawer.0.dart index fa66195de5..5a69c74c98 100644 --- a/examples/api/lib/material/navigation_drawer/navigation_drawer.0.dart +++ b/examples/api/lib/material/navigation_drawer/navigation_drawer.0.dart @@ -7,7 +7,7 @@ // Builds an adaptive navigation widget layout. When the screen width is less than // 450, A [NavigationBar] will be displayed. Otherwise, a [NavigationRail] will be // displayed on the left side, and also a button to open the [NavigationDrawer]. -// All of these navigation widgets are built from an indentical list of data. +// All of these navigation widgets are built from an identical list of data. import 'package:flutter/material.dart'; diff --git a/examples/api/lib/material/navigation_rail/navigation_rail.0.dart b/examples/api/lib/material/navigation_rail/navigation_rail.0.dart index e43c68f419..d6ac9ad8de 100644 --- a/examples/api/lib/material/navigation_rail/navigation_rail.0.dart +++ b/examples/api/lib/material/navigation_rail/navigation_rail.0.dart @@ -31,7 +31,7 @@ class _NavRailExampleState extends State { NavigationRailLabelType labelType = NavigationRailLabelType.all; bool showLeading = false; bool showTrailing = false; - double groupAligment = -1.0; + double groupAlignment = -1.0; @override Widget build(BuildContext context) { @@ -40,7 +40,7 @@ class _NavRailExampleState extends State { children: [ NavigationRail( selectedIndex: _selectedIndex, - groupAlignment: groupAligment, + groupAlignment: groupAlignment, onDestinationSelected: (int index) { setState(() { _selectedIndex = index; @@ -118,7 +118,7 @@ class _NavRailExampleState extends State { ], ), const SizedBox(height: 20), - Text('Group alignment: $groupAligment'), + Text('Group alignment: $groupAlignment'), const SizedBox(height: 10), OverflowBar( spacing: 10.0, @@ -126,7 +126,7 @@ class _NavRailExampleState extends State { ElevatedButton( onPressed: () { setState(() { - groupAligment = -1.0; + groupAlignment = -1.0; }); }, child: const Text('Top'), @@ -134,7 +134,7 @@ class _NavRailExampleState extends State { ElevatedButton( onPressed: () { setState(() { - groupAligment = 0.0; + groupAlignment = 0.0; }); }, child: const Text('Center'), @@ -142,7 +142,7 @@ class _NavRailExampleState extends State { ElevatedButton( onPressed: () { setState(() { - groupAligment = 1.0; + groupAlignment = 1.0; }); }, child: const Text('Bottom'), diff --git a/examples/api/lib/material/navigation_rail/navigation_rail.1.dart b/examples/api/lib/material/navigation_rail/navigation_rail.1.dart index 838e0725e6..9345d58edd 100644 --- a/examples/api/lib/material/navigation_rail/navigation_rail.1.dart +++ b/examples/api/lib/material/navigation_rail/navigation_rail.1.dart @@ -32,7 +32,7 @@ class _NavRailExampleState extends State { NavigationRailLabelType labelType = NavigationRailLabelType.all; bool showLeading = false; bool showTrailing = false; - double groupAligment = -1.0; + double groupAlignment = -1.0; @override Widget build(BuildContext context) { @@ -42,7 +42,7 @@ class _NavRailExampleState extends State { children: [ NavigationRail( selectedIndex: _selectedIndex, - groupAlignment: groupAligment, + groupAlignment: groupAlignment, onDestinationSelected: (int index) { setState(() { _selectedIndex = index; @@ -120,7 +120,7 @@ class _NavRailExampleState extends State { ], ), const SizedBox(height: 20), - Text('Group alignment: $groupAligment'), + Text('Group alignment: $groupAlignment'), const SizedBox(height: 10), OverflowBar( spacing: 10.0, @@ -128,7 +128,7 @@ class _NavRailExampleState extends State { ElevatedButton( onPressed: () { setState(() { - groupAligment = -1.0; + groupAlignment = -1.0; }); }, child: const Text('Top'), @@ -136,7 +136,7 @@ class _NavRailExampleState extends State { ElevatedButton( onPressed: () { setState(() { - groupAligment = 0.0; + groupAlignment = 0.0; }); }, child: const Text('Center'), @@ -144,7 +144,7 @@ class _NavRailExampleState extends State { ElevatedButton( onPressed: () { setState(() { - groupAligment = 1.0; + groupAlignment = 1.0; }); }, child: const Text('Bottom'), diff --git a/examples/api/lib/painting/linear_border/linear_border.0.dart b/examples/api/lib/painting/linear_border/linear_border.0.dart index c011cedb7d..4ca28e349b 100644 --- a/examples/api/lib/painting/linear_border/linear_border.0.dart +++ b/examples/api/lib/painting/linear_border/linear_border.0.dart @@ -93,7 +93,7 @@ class _HomeState extends State { // side parameter. The side can also be specified as a // LinearBorder parameter and if both are specified then the // ButtonStyle's side is used. This set up makes it possible - // for a button theme to specify the shape and for indidividual + // for a button theme to specify the shape and for individual // buttons to specify the shape border's color and width. SampleCard( title: 'LinearBorder.bottom()', diff --git a/examples/api/lib/widgets/magnifier/magnifier.0.dart b/examples/api/lib/widgets/magnifier/magnifier.0.dart index 5817533034..8603a23624 100644 --- a/examples/api/lib/widgets/magnifier/magnifier.0.dart +++ b/examples/api/lib/widgets/magnifier/magnifier.0.dart @@ -15,7 +15,7 @@ class MyApp extends StatefulWidget { } class _MyAppState extends State { - Offset dragGesturePositon = Offset.zero; + Offset dragGesturePosition = Offset.zero; @override Widget build(BuildContext context) { @@ -32,14 +32,14 @@ class _MyAppState extends State { GestureDetector( onPanUpdate: (DragUpdateDetails details) => setState( () { - dragGesturePositon = details.localPosition; + dragGesturePosition = details.localPosition; }, ), child: const FlutterLogo(size: 200), ), Positioned( - left: dragGesturePositon.dx, - top: dragGesturePositon.dy, + left: dragGesturePosition.dx, + top: dragGesturePosition.dy, child: const RawMagnifier( decoration: MagnifierDecoration( shape: CircleBorder( diff --git a/examples/api/lib/widgets/sliver/sliver_opacity.1.dart b/examples/api/lib/widgets/sliver/sliver_opacity.1.dart index af1d7719f4..64e0434f32 100644 --- a/examples/api/lib/widgets/sliver/sliver_opacity.1.dart +++ b/examples/api/lib/widgets/sliver/sliver_opacity.1.dart @@ -46,7 +46,7 @@ class _MyStatefulWidgetState extends State { body: CustomScrollView( slivers: [ const SliverToBoxAdapter( - child: ListTile(title: Text('Press on the button to toggle the list visibilty.')), + child: ListTile(title: Text('Press on the button to toggle the list visibility.')), ), const SliverToBoxAdapter( child: ListTile(title: Text('Before the list...')), diff --git a/examples/api/lib/widgets/text_magnifier/text_magnifier.0.dart b/examples/api/lib/widgets/text_magnifier/text_magnifier.0.dart index b53aec9f47..86501d63cc 100644 --- a/examples/api/lib/widgets/text_magnifier/text_magnifier.0.dart +++ b/examples/api/lib/widgets/text_magnifier/text_magnifier.0.dart @@ -82,7 +82,7 @@ class CustomMagnifier extends StatelessWidget { ), ); - // Finally, align the magnifier to the bottom center. The inital anchor is + // Finally, align the magnifier to the bottom center. The initial anchor is // the top left, so subtract bottom center alignment. magnifierPosition -= Alignment.bottomCenter.alongSize(magnifierSize); diff --git a/examples/api/test/material/choice_chip/choice_chip.0_test.dart b/examples/api/test/material/choice_chip/choice_chip.0_test.dart index b44c985408..bf744810d7 100644 --- a/examples/api/test/material/choice_chip/choice_chip.0_test.dart +++ b/examples/api/test/material/choice_chip/choice_chip.0_test.dart @@ -12,13 +12,13 @@ void main() { const example.ChipApp(), ); - ChoiceChip choosenChip = tester.widget(find.byType(ChoiceChip).at(1)); - expect(choosenChip.selected, true); + ChoiceChip chosenChip = tester.widget(find.byType(ChoiceChip).at(1)); + expect(chosenChip.selected, true); await tester.tap(find.byType(ChoiceChip).at(0)); await tester.pumpAndSettle(); - choosenChip = tester.widget(find.byType(ChoiceChip).at(0)); - expect(choosenChip.selected, true); + chosenChip = tester.widget(find.byType(ChoiceChip).at(0)); + expect(chosenChip.selected, true); }); } diff --git a/examples/api/test/material/divider/vertical_divider.0_test.dart b/examples/api/test/material/divider/vertical_divider.0_test.dart index 63c7513557..41e0b988a9 100644 --- a/examples/api/test/material/divider/vertical_divider.0_test.dart +++ b/examples/api/test/material/divider/vertical_divider.0_test.dart @@ -18,7 +18,7 @@ void main() { expect(find.byType(VerticalDivider), findsOneWidget); - // Divider is positioned horizintally. + // Divider is positioned horizontally. Offset expanded = tester.getTopRight(find.byType(Expanded).first); expect(expanded.dx, tester.getTopLeft(find.byType(VerticalDivider)).dx); diff --git a/examples/api/test/material/list_tile/list_tile.4_test.dart b/examples/api/test/material/list_tile/list_tile.4_test.dart index 5e2b8460c7..5cd47ad026 100644 --- a/examples/api/test/material/list_tile/list_tile.4_test.dart +++ b/examples/api/test/material/list_tile/list_tile.4_test.dart @@ -7,7 +7,7 @@ import 'package:flutter_api_samples/material/list_tile/list_tile.4.dart' as exam import 'package:flutter_test/flutter_test.dart'; void main() { - testWidgets('Can choose different title aligments from popup menu', (WidgetTester tester) async { + testWidgets('Can choose different title alignments from popup menu', (WidgetTester tester) async { await tester.pumpWidget( const example.ListTileApp(), ); diff --git a/examples/api/test/widgets/text_magnifier/text_magnifier.0_test.dart b/examples/api/test/widgets/text_magnifier/text_magnifier.0_test.dart index c20d5d3f1e..c7c9a54a83 100644 --- a/examples/api/test/widgets/text_magnifier/text_magnifier.0_test.dart +++ b/examples/api/test/widgets/text_magnifier/text_magnifier.0_test.dart @@ -43,7 +43,7 @@ Offset _textOffsetToPosition>(WidgetTester teste } void main() { - const Duration durationBetweenActons = Duration(milliseconds: 20); + const Duration durationBetweenActions = Duration(milliseconds: 20); const String defaultText = 'I am a magnifier, fear me!'; Future showMagnifier(WidgetTester tester, String characterToTapOn) async { @@ -51,11 +51,11 @@ void main() { // Double tap 'Magnifier' word to show the selection handles. final TestGesture testGesture = await tester.startGesture(tapOffset); - await tester.pump(durationBetweenActons); + await tester.pump(durationBetweenActions); await testGesture.up(); - await tester.pump(durationBetweenActons); + await tester.pump(durationBetweenActions); await testGesture.down(tapOffset); - await tester.pump(durationBetweenActons); + await tester.pump(durationBetweenActions); await testGesture.up(); await tester.pumpAndSettle(); diff --git a/examples/api/windows/runner/win32_window.cpp b/examples/api/windows/runner/win32_window.cpp index 4021a2cfd4..8fef19b0fb 100644 --- a/examples/api/windows/runner/win32_window.cpp +++ b/examples/api/windows/runner/win32_window.cpp @@ -46,7 +46,7 @@ class WindowClassRegistrar { public: ~WindowClassRegistrar() = default; - // Returns the singleton registar instance. + // Returns the singleton registrar instance. static WindowClassRegistrar* GetInstance() { if (!instance_) { instance_ = new WindowClassRegistrar(); diff --git a/examples/api/windows/runner/win32_window.h b/examples/api/windows/runner/win32_window.h index 1dab1777c4..33786ecd6f 100644 --- a/examples/api/windows/runner/win32_window.h +++ b/examples/api/windows/runner/win32_window.h @@ -80,7 +80,7 @@ class Win32Window { // OS callback called by message pump. Handles the WM_NCCREATE message which // is passed when the non-client area is being created and enables automatic // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by + // responds to changes in DPI. All other messages are handled by // MessageHandler. static LRESULT CALLBACK WndProc(HWND const window, UINT const message, diff --git a/examples/flutter_view/windows/runner/win32_window.cpp b/examples/flutter_view/windows/runner/win32_window.cpp index 635a5b29f5..6ea6293674 100644 --- a/examples/flutter_view/windows/runner/win32_window.cpp +++ b/examples/flutter_view/windows/runner/win32_window.cpp @@ -46,7 +46,7 @@ class WindowClassRegistrar { public: ~WindowClassRegistrar() = default; - // Returns the singleton registar instance. + // Returns the singleton registrar instance. static WindowClassRegistrar* GetInstance() { if (!instance_) { instance_ = new WindowClassRegistrar(); diff --git a/examples/flutter_view/windows/runner/win32_window.h b/examples/flutter_view/windows/runner/win32_window.h index b161e9b84b..758b4d6bdd 100644 --- a/examples/flutter_view/windows/runner/win32_window.h +++ b/examples/flutter_view/windows/runner/win32_window.h @@ -81,7 +81,7 @@ class Win32Window { // OS callback called by message pump. Handles the WM_NCCREATE message which // is passed when the non-client area is being created and enables automatic // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by + // responds to changes in DPI. All other messages are handled by // MessageHandler. static LRESULT CALLBACK WndProc(HWND const window, UINT const message, diff --git a/examples/hello_world/windows/runner/win32_window.cpp b/examples/hello_world/windows/runner/win32_window.cpp index c28efc1641..f76301b17f 100644 --- a/examples/hello_world/windows/runner/win32_window.cpp +++ b/examples/hello_world/windows/runner/win32_window.cpp @@ -64,7 +64,7 @@ class WindowClassRegistrar { public: ~WindowClassRegistrar() = default; - // Returns the singleton registar instance. + // Returns the singleton registrar instance. static WindowClassRegistrar* GetInstance() { if (!instance_) { instance_ = new WindowClassRegistrar(); diff --git a/examples/hello_world/windows/runner/win32_window.h b/examples/hello_world/windows/runner/win32_window.h index 84a27dc75d..bb93e88791 100644 --- a/examples/hello_world/windows/runner/win32_window.h +++ b/examples/hello_world/windows/runner/win32_window.h @@ -81,7 +81,7 @@ class Win32Window { // OS callback called by message pump. Handles the WM_NCCREATE message which // is passed when the non-client area is being created and enables automatic // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by + // responds to changes in DPI. All other messages are handled by // MessageHandler. static LRESULT CALLBACK WndProc(HWND const window, UINT const message, diff --git a/examples/platform_channel/windows/runner/win32_window.cpp b/examples/platform_channel/windows/runner/win32_window.cpp index 6a753c7633..14a183d7ea 100644 --- a/examples/platform_channel/windows/runner/win32_window.cpp +++ b/examples/platform_channel/windows/runner/win32_window.cpp @@ -64,7 +64,7 @@ class WindowClassRegistrar { public: ~WindowClassRegistrar() = default; - // Returns the singleton registar instance. + // Returns the singleton registrar instance. static WindowClassRegistrar* GetInstance() { if (!instance_) { instance_ = new WindowClassRegistrar(); diff --git a/examples/platform_channel/windows/runner/win32_window.h b/examples/platform_channel/windows/runner/win32_window.h index 84a27dc75d..bb93e88791 100644 --- a/examples/platform_channel/windows/runner/win32_window.h +++ b/examples/platform_channel/windows/runner/win32_window.h @@ -81,7 +81,7 @@ class Win32Window { // OS callback called by message pump. Handles the WM_NCCREATE message which // is passed when the non-client area is being created and enables automatic // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by + // responds to changes in DPI. All other messages are handled by // MessageHandler. static LRESULT CALLBACK WndProc(HWND const window, UINT const message, diff --git a/examples/platform_view/windows/runner/win32_window.cpp b/examples/platform_view/windows/runner/win32_window.cpp index 4021a2cfd4..8fef19b0fb 100644 --- a/examples/platform_view/windows/runner/win32_window.cpp +++ b/examples/platform_view/windows/runner/win32_window.cpp @@ -46,7 +46,7 @@ class WindowClassRegistrar { public: ~WindowClassRegistrar() = default; - // Returns the singleton registar instance. + // Returns the singleton registrar instance. static WindowClassRegistrar* GetInstance() { if (!instance_) { instance_ = new WindowClassRegistrar(); diff --git a/examples/platform_view/windows/runner/win32_window.h b/examples/platform_view/windows/runner/win32_window.h index 1dab1777c4..33786ecd6f 100644 --- a/examples/platform_view/windows/runner/win32_window.h +++ b/examples/platform_view/windows/runner/win32_window.h @@ -80,7 +80,7 @@ class Win32Window { // OS callback called by message pump. Handles the WM_NCCREATE message which // is passed when the non-client area is being created and enables automatic // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by + // responds to changes in DPI. All other messages are handled by // MessageHandler. static LRESULT CALLBACK WndProc(HWND const window, UINT const message, diff --git a/packages/flutter/lib/src/cupertino/context_menu.dart b/packages/flutter/lib/src/cupertino/context_menu.dart index 52fc841569..7ffbb7fa23 100644 --- a/packages/flutter/lib/src/cupertino/context_menu.dart +++ b/packages/flutter/lib/src/cupertino/context_menu.dart @@ -277,7 +277,7 @@ class CupertinoContextMenu extends StatefulWidget { /// opened in the default way to match a native iOS 16.0 app. The behavior /// will match what will happen if the simple child image was passed as just /// the [child] parameter, instead of [builder]. This can be manipulated to - /// add more custamizability to the widget's animation. + /// add more customizability to the widget's animation. /// /// ```dart /// CupertinoContextMenu.builder( diff --git a/packages/flutter/lib/src/cupertino/magnifier.dart b/packages/flutter/lib/src/cupertino/magnifier.dart index e5e1075170..74aef3fe26 100644 --- a/packages/flutter/lib/src/cupertino/magnifier.dart +++ b/packages/flutter/lib/src/cupertino/magnifier.dart @@ -77,7 +77,7 @@ class CupertinoTextMagnifier extends StatefulWidget { class _CupertinoTextMagnifierState extends State with SingleTickerProviderStateMixin { - // Initalize to dummy values for the event that the inital call to + // Initialize to dummy values for the event that the initial call to // _determineMagnifierPositionAndFocalPoint calls hide, and thus does not // set these values. Offset _currentAdjustedMagnifierPosition = Offset.zero; diff --git a/packages/flutter/lib/src/cupertino/nav_bar.dart b/packages/flutter/lib/src/cupertino/nav_bar.dart index 4c12180323..56e49bea99 100644 --- a/packages/flutter/lib/src/cupertino/nav_bar.dart +++ b/packages/flutter/lib/src/cupertino/nav_bar.dart @@ -967,8 +967,8 @@ class _RenderLargeTitle extends RenderShiftedBox { return; } - final BoxConstraints childConstriants = constraints.widthConstraints().loosen(); - child.layout(childConstriants, parentUsesSize: true); + final BoxConstraints childConstraints = constraints.widthConstraints().loosen(); + child.layout(childConstraints, parentUsesSize: true); final double maxScale = child.size.width != 0.0 ? clampDouble(constraints.maxWidth / child.size.width, 1.0, 1.1) diff --git a/packages/flutter/lib/src/cupertino/switch.dart b/packages/flutter/lib/src/cupertino/switch.dart index 0d12795677..f690b25066 100644 --- a/packages/flutter/lib/src/cupertino/switch.dart +++ b/packages/flutter/lib/src/cupertino/switch.dart @@ -364,7 +364,7 @@ class _CupertinoSwitchState extends State with TickerProviderSt activeColor: activeColor, trackColor: CupertinoDynamicColor.resolve(widget.trackColor ?? CupertinoColors.secondarySystemFill, context), thumbColor: CupertinoDynamicColor.resolve(widget.thumbColor ?? CupertinoColors.white, context), - // Opacity, lightness, and saturation values were aproximated with + // Opacity, lightness, and saturation values were approximated with // color pickers on the switches in the macOS settings. focusColor: CupertinoDynamicColor.resolve( widget.focusColor ?? diff --git a/packages/flutter/lib/src/foundation/memory_allocations.dart b/packages/flutter/lib/src/foundation/memory_allocations.dart index f0d84b91c9..dd918dd625 100644 --- a/packages/flutter/lib/src/foundation/memory_allocations.dart +++ b/packages/flutter/lib/src/foundation/memory_allocations.dart @@ -39,7 +39,7 @@ abstract class ObjectEvent{ /// long living place as it will prevent garbage collection. final Object object; - /// The representation of the event in a form, acceptible by a + /// The representation of the event in a form, acceptable by a /// pure dart library, that cannot depend on Flutter. /// /// The method enables code like: diff --git a/packages/flutter/lib/src/material/date_picker.dart b/packages/flutter/lib/src/material/date_picker.dart index db9fd8be2e..16915e4874 100644 --- a/packages/flutter/lib/src/material/date_picker.dart +++ b/packages/flutter/lib/src/material/date_picker.dart @@ -467,7 +467,7 @@ class _DatePickerDialogState extends State with RestorationMix color: headerForegroundColor, ) // Material2 has support for landscape and the current M3 spec doesn't - // address this layout, so handling it seperately here. + // address this layout, so handling it separately here. : (orientation == Orientation.landscape ? textTheme.headlineSmall?.copyWith(color: headerForegroundColor) : textTheme.headlineMedium?.copyWith(color: headerForegroundColor)); diff --git a/packages/flutter/lib/src/material/date_picker_theme.dart b/packages/flutter/lib/src/material/date_picker_theme.dart index 33c590bda7..77654079f9 100644 --- a/packages/flutter/lib/src/material/date_picker_theme.dart +++ b/packages/flutter/lib/src/material/date_picker_theme.dart @@ -152,7 +152,7 @@ class DatePickerThemeData with Diagnosticable { /// day labels in the grid of the date picker. final MaterialStateProperty? dayBackgroundColor; - /// Overriddes the default highlight color that's typically used to + /// Overrides the default highlight color that's typically used to /// indicate that a day in the grid is focused, hovered, or pressed. final MaterialStateProperty? dayOverlayColor; diff --git a/packages/flutter/lib/src/material/expansion_panel.dart b/packages/flutter/lib/src/material/expansion_panel.dart index 53dedceb9e..62c9adf328 100644 --- a/packages/flutter/lib/src/material/expansion_panel.dart +++ b/packages/flutter/lib/src/material/expansion_panel.dart @@ -139,7 +139,7 @@ class ExpansionPanelRadio extends ExpansionPanel { /// expansions. /// /// The [expansionCallback] is called when the expansion state changes. For -/// normal [ExpansionPanelList] widgets, it is the responsibilty of the parent +/// normal [ExpansionPanelList] widgets, it is the responsibility of the parent /// widget to rebuild the [ExpansionPanelList] with updated values for /// [ExpansionPanel.isExpanded]. For [ExpansionPanelList.radio] widgets, the /// open state is tracked internally and the callback is invoked both for the diff --git a/packages/flutter/lib/src/material/ink_sparkle.dart b/packages/flutter/lib/src/material/ink_sparkle.dart index 043af8a074..1a7a97caa5 100644 --- a/packages/flutter/lib/src/material/ink_sparkle.dart +++ b/packages/flutter/lib/src/material/ink_sparkle.dart @@ -203,7 +203,7 @@ class InkSparkle extends InteractiveInkFeature { ], ).animate(_animationController); - // Creates an element of randomness so that ink eminating from the same + // Creates an element of randomness so that ink emanating from the same // pixel have slightly different rings and sparkles. _turbulenceSeed = turbulenceSeed ?? math.Random().nextDouble() * 1000.0; } diff --git a/packages/flutter/lib/src/material/magnifier.dart b/packages/flutter/lib/src/material/magnifier.dart index ce6b960ba0..6206d0e16b 100644 --- a/packages/flutter/lib/src/material/magnifier.dart +++ b/packages/flutter/lib/src/material/magnifier.dart @@ -86,7 +86,7 @@ class _TextMagnifierState extends State { // Should _only_ be null on construction. This is because of the animation logic. // // Animations are added when `last_build_y != current_build_y`. This condition - // is true on the inital render, which would mean that the inital + // is true on the initial render, which would mean that the initial // build would be animated - this is undesired. Thus, this is null for the // first frame and the condition becomes `magnifierPosition != null && last_build_y != this_build_y`. Offset? _magnifierPosition; diff --git a/packages/flutter/lib/src/material/navigation_bar.dart b/packages/flutter/lib/src/material/navigation_bar.dart index 237079a8ac..694afcc0ff 100644 --- a/packages/flutter/lib/src/material/navigation_bar.dart +++ b/packages/flutter/lib/src/material/navigation_bar.dart @@ -169,7 +169,7 @@ class NavigationBar extends StatelessWidget { /// is used. Otherwise, [ColorScheme.secondary] with an opacity of 0.24 is used. final Color? indicatorColor; - /// The shape of the selected inidicator. + /// The shape of the selected indicator. /// /// If null, [NavigationBarThemeData.indicatorShape] is used. If that /// is also null and [ThemeData.useMaterial3] is true, [StadiumBorder] is used. diff --git a/packages/flutter/lib/src/material/navigation_drawer.dart b/packages/flutter/lib/src/material/navigation_drawer.dart index 9d954a55d3..f7aeb64d7a 100644 --- a/packages/flutter/lib/src/material/navigation_drawer.dart +++ b/packages/flutter/lib/src/material/navigation_drawer.dart @@ -98,7 +98,7 @@ class NavigationDrawer extends StatelessWidget { /// If that is also null, defaults to [ColorScheme.secondaryContainer]. final Color? indicatorColor; - /// The shape of the selected inidicator. + /// The shape of the selected indicator. /// /// If this is null, [NavigationDrawerThemeData.indicatorShape] is used. /// If that is also null, defaults to [StadiumBorder]. @@ -114,7 +114,7 @@ class NavigationDrawer extends StatelessWidget { /// [NavigationDrawerDestination] or null if no destination is selected. /// /// A valid [selectedIndex] satisfies 0 <= [selectedIndex] < number of [NavigationDrawerDestination]. - /// For an invalid [selectedIndex] like `-1`, all desitinations will appear unselected. + /// For an invalid [selectedIndex] like `-1`, all destinations will appear unselected. final int? selectedIndex; /// Called when one of the [NavigationDrawerDestination] children is selected. diff --git a/packages/flutter/lib/src/material/navigation_rail.dart b/packages/flutter/lib/src/material/navigation_rail.dart index 51dd77d531..a7a9230b28 100644 --- a/packages/flutter/lib/src/material/navigation_rail.dart +++ b/packages/flutter/lib/src/material/navigation_rail.dart @@ -578,7 +578,7 @@ class _RailDestination extends StatelessWidget { ); final bool material3 = Theme.of(context).useMaterial3; - final EdgeInsets destionationPadding = (padding ?? EdgeInsets.zero).resolve(Directionality.of(context)); + final EdgeInsets destinationPadding = (padding ?? EdgeInsets.zero).resolve(Directionality.of(context)); Offset indicatorOffset; final Widget themedIcon = IconTheme( @@ -597,8 +597,8 @@ class _RailDestination extends StatelessWidget { // Split the destination spacing across the top and bottom to keep the icon centered. final Widget? spacing = material3 ? const SizedBox(height: _verticalDestinationSpacingM3 / 2) : null; indicatorOffset = Offset( - minWidth / 2 + destionationPadding.left, - _verticalDestinationSpacingM3 / 2 + destionationPadding.top, + minWidth / 2 + destinationPadding.left, + _verticalDestinationSpacingM3 / 2 + destinationPadding.top, ); final Widget iconPart = Column( children: [ @@ -675,8 +675,8 @@ class _RailDestination extends StatelessWidget { final Widget topSpacing = SizedBox(height: material3 ? 0 : verticalPadding); final Widget labelSpacing = SizedBox(height: material3 ? lerpDouble(0, _verticalIconLabelSpacingM3, appearingAnimationValue)! : 0); final Widget bottomSpacing = SizedBox(height: material3 ? _verticalDestinationSpacingM3 : verticalPadding); - final double indicatorHorizontalPadding = (destionationPadding.left / 2) - (destionationPadding.right / 2); - final double indicatorVerticalPadding = destionationPadding.top; + final double indicatorHorizontalPadding = (destinationPadding.left / 2) - (destinationPadding.right / 2); + final double indicatorVerticalPadding = destinationPadding.top; indicatorOffset = Offset(minWidth / 2 + indicatorHorizontalPadding, indicatorVerticalPadding); if (minWidth < _NavigationRailDefaultsM2(context).minWidth!) { indicatorOffset = Offset(minWidth / 2 + _horizontalDestinationSpacingM3, indicatorVerticalPadding); @@ -723,8 +723,8 @@ class _RailDestination extends StatelessWidget { final Widget topSpacing = SizedBox(height: material3 ? 0 : _verticalDestinationPaddingWithLabel); final Widget labelSpacing = SizedBox(height: material3 ? _verticalIconLabelSpacingM3 : 0); final Widget bottomSpacing = SizedBox(height: material3 ? _verticalDestinationSpacingM3 : _verticalDestinationPaddingWithLabel); - final double indicatorHorizontalPadding = (destionationPadding.left / 2) - (destionationPadding.right / 2); - final double indicatorVerticalPadding = destionationPadding.top; + final double indicatorHorizontalPadding = (destinationPadding.left / 2) - (destinationPadding.right / 2); + final double indicatorVerticalPadding = destinationPadding.top; indicatorOffset = Offset(minWidth / 2 + indicatorHorizontalPadding, indicatorVerticalPadding); if (minWidth < _NavigationRailDefaultsM2(context).minWidth!) { indicatorOffset = Offset(minWidth / 2 + _horizontalDestinationSpacingM3, indicatorVerticalPadding); @@ -944,7 +944,7 @@ class NavigationRailDestination { /// The color of the [indicatorShape] when this destination is selected. final Color? indicatorColor; - /// The shape of the selection inidicator. + /// The shape of the selection indicator. final ShapeBorder? indicatorShape; /// The label for the destination. diff --git a/packages/flutter/lib/src/material/scaffold.dart b/packages/flutter/lib/src/material/scaffold.dart index edbf782f9e..a8bbf3b5b3 100644 --- a/packages/flutter/lib/src/material/scaffold.dart +++ b/packages/flutter/lib/src/material/scaffold.dart @@ -1158,9 +1158,9 @@ class _ScaffoldLayout extends MultiChildLayoutDelegate { positionChild(_ScaffoldSlot.snackBar, Offset(xOffset, snackBarYOffsetBase - snackBarSize.height)); assert((){ - // Whether a floating SnackBar has been offsetted too high. + // Whether a floating SnackBar has been offset too high. // - // To improve the developper experience, this assert is done after the call to positionChild. + // To improve the developer experience, this assert is done after the call to positionChild. // if we assert sooner the SnackBar is visible because its defaults position is (0,0) and // it can cause confusion to the user as the error message states that the SnackBar is off screen. if (isSnackBarFloating) { diff --git a/packages/flutter/lib/src/material/segmented_button.dart b/packages/flutter/lib/src/material/segmented_button.dart index 11b5500c35..f42bd59d8a 100644 --- a/packages/flutter/lib/src/material/segmented_button.dart +++ b/packages/flutter/lib/src/material/segmented_button.dart @@ -100,7 +100,7 @@ class SegmentedButton extends StatelessWidget { /// more than five options, consider using [FilterChip] or [ChoiceChip] /// widgets. /// - /// If [onSelectionChanged] is null, then the entire segemented button will + /// If [onSelectionChanged] is null, then the entire segmented button will /// be disabled. /// /// By default [selected] must only contain one entry. However, if @@ -163,7 +163,7 @@ class SegmentedButton extends StatelessWidget { /// Determines if having no selected segments is allowed. /// - /// If true, then it is acceptable for none of the segements to be selected. + /// If true, then it is acceptable for none of the segments to be selected. /// This means that [selected] can be empty. If the user taps on a /// selected segment, it will be removed from the selection set passed into /// [onSelectionChanged]. @@ -183,7 +183,7 @@ class SegmentedButton extends StatelessWidget { /// dividers between segments. /// * [ButtonStyle.shape] /// - /// The following style properties are applied to each of the invidual + /// The following style properties are applied to each of the individual /// button segments. For properties that are a [MaterialStateProperty], /// they will be resolved with the current state of the segment: /// diff --git a/packages/flutter/lib/src/material/snack_bar.dart b/packages/flutter/lib/src/material/snack_bar.dart index b2155e6c52..9c77d2490f 100644 --- a/packages/flutter/lib/src/material/snack_bar.dart +++ b/packages/flutter/lib/src/material/snack_bar.dart @@ -516,7 +516,7 @@ class _SnackBarState extends State { // the surrounding theme. final Brightness brightness = isThemeDark ? Brightness.light : Brightness.dark; - // Invert the theme values for Material 2. Material 3 values are tokenzied to pre-inverted values. + // Invert the theme values for Material 2. Material 3 values are tokenized to pre-inverted values. final ThemeData effectiveTheme = theme.useMaterial3 ? theme : theme.copyWith( diff --git a/packages/flutter/lib/src/painting/text_style.dart b/packages/flutter/lib/src/painting/text_style.dart index 9e90fe13a4..58ed9300ee 100644 --- a/packages/flutter/lib/src/painting/text_style.dart +++ b/packages/flutter/lib/src/painting/text_style.dart @@ -1077,7 +1077,7 @@ class TextStyle with Diagnosticable { /// implementation uses the non-null value throughout the transition for /// lerpable fields such as colors (for example, if one [TextStyle] specified /// `fontSize` but the other didn't, the returned [TextStyle] will use the - /// `fontSize` from the [TextStyle] that specified it, regarless of the `t` + /// `fontSize` from the [TextStyle] that specified it, regardless of the `t` /// value). /// /// This method throws when the given [TextStyle]s don't have the same diff --git a/packages/flutter/lib/src/rendering/editable.dart b/packages/flutter/lib/src/rendering/editable.dart index 9faec0ee9a..c3ad20412b 100644 --- a/packages/flutter/lib/src/rendering/editable.dart +++ b/packages/flutter/lib/src/rendering/editable.dart @@ -729,7 +729,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin, // Check if the selection is visible with an approximation because a // difference between rounded and unrounded values causes the caret to be // reported as having a slightly (< 0.5) negative y offset. This rounding - // happens in paragraph.cc's layout and TextPainer's + // happens in paragraph.cc's layout and TextPainter's // _applyFloatingPointHack. Ideally, the rounding mismatch will be fixed and // this can be changed to be a strict check instead of an approximation. const double visibleRegionSlop = 0.5; @@ -775,7 +775,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin, @override void markNeedsPaint() { super.markNeedsPaint(); - // Tell the painers to repaint since text layout may have changed. + // Tell the painters to repaint since text layout may have changed. _foregroundRenderObject?.markNeedsPaint(); _backgroundRenderObject?.markNeedsPaint(); } diff --git a/packages/flutter/lib/src/rendering/object.dart b/packages/flutter/lib/src/rendering/object.dart index b2c6d47e4d..c59e9fb22b 100644 --- a/packages/flutter/lib/src/rendering/object.dart +++ b/packages/flutter/lib/src/rendering/object.dart @@ -2370,7 +2370,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im /// needing to paint and needing a composited layer update, this method is only /// called once. // TODO(jonahwilliams): https://github.com/flutter/flutter/issues/102102 revisit the - // contraint that the instance/type of layer cannot be changed at runtime. + // constraint that the instance/type of layer cannot be changed at runtime. OffsetLayer updateCompositedLayer({required covariant OffsetLayer? oldLayer}) { assert(isRepaintBoundary); return oldLayer ?? OffsetLayer(); diff --git a/packages/flutter/lib/src/scheduler/binding.dart b/packages/flutter/lib/src/scheduler/binding.dart index a38c136e47..118fe9e1bb 100644 --- a/packages/flutter/lib/src/scheduler/binding.dart +++ b/packages/flutter/lib/src/scheduler/binding.dart @@ -189,7 +189,7 @@ enum SchedulerPhase { /// See also: /// /// * [PerformanceModeRequestHandle] for more information on the lifecycle of the handle. -typedef _PerformanceModeCleaupCallback = VoidCallback; +typedef _PerformanceModeCleanupCallback = VoidCallback; /// An opaque handle that keeps a request for [DartPerformanceMode] active until /// disposed. @@ -197,9 +197,9 @@ typedef _PerformanceModeCleaupCallback = VoidCallback; /// To create a [PerformanceModeRequestHandle], use [SchedulerBinding.requestPerformanceMode]. /// The component that makes the request is responsible for disposing the handle. class PerformanceModeRequestHandle { - PerformanceModeRequestHandle._(_PerformanceModeCleaupCallback this._cleanup); + PerformanceModeRequestHandle._(_PerformanceModeCleanupCallback this._cleanup); - _PerformanceModeCleaupCallback? _cleanup; + _PerformanceModeCleanupCallback? _cleanup; /// Call this method to signal to [SchedulerBinding] that a request for a [DartPerformanceMode] /// is no longer needed. diff --git a/packages/flutter/lib/src/services/dom.dart b/packages/flutter/lib/src/services/dom.dart index fad6f161f2..7b3f8655de 100644 --- a/packages/flutter/lib/src/services/dom.dart +++ b/packages/flutter/lib/src/services/dom.dart @@ -115,7 +115,7 @@ typedef DomEventListener = void Function(DomEvent event); @staticInterop class DomEvent {} -/// [DomEvent] reqiured extension. +/// [DomEvent] required extension. extension DomEventExtension on DomEvent { /// Get the event type. external String get type; @@ -134,7 +134,7 @@ extension DomEventExtension on DomEvent { @staticInterop class DomProgressEvent extends DomEvent {} -/// [DomProgressEvent] reqiured extension. +/// [DomProgressEvent] required extension. extension DomProgressEventExtension on DomProgressEvent { /// Amount of work done. external int? get loaded; @@ -182,7 +182,7 @@ extension DomDocumentExtension on DomDocument { @JS('window.document') external DomDocument get domDocument; -/// Cretaes a new DOM event. +/// Creates a new DOM event. DomEvent createDomEvent(String type, String name) { final DomEvent event = domDocument.createEvent(type); event.initEvent(name, true, true); diff --git a/packages/flutter/lib/src/services/hardware_keyboard.dart b/packages/flutter/lib/src/services/hardware_keyboard.dart index 0622d9b54a..17febb115b 100644 --- a/packages/flutter/lib/src/services/hardware_keyboard.dart +++ b/packages/flutter/lib/src/services/hardware_keyboard.dart @@ -864,7 +864,7 @@ class KeyEventManager { return false; case KeyDataTransitMode.keyDataThenRawKeyData: // Having 0 as the physical and logical ID indicates an empty key data - // (the only occassion either field can be 0,) transmitted to ensure + // (the only occasion either field can be 0,) transmitted to ensure // that the transit mode is correctly inferred. These events should be // ignored. if (data.physical == 0 && data.logical == 0) { diff --git a/packages/flutter/lib/src/services/raw_keyboard.dart b/packages/flutter/lib/src/services/raw_keyboard.dart index a36f0de6dd..0d85b88497 100644 --- a/packages/flutter/lib/src/services/raw_keyboard.dart +++ b/packages/flutter/lib/src/services/raw_keyboard.dart @@ -864,7 +864,7 @@ class RawKeyboard { // exist in the modifier list. Enforce the pressing state. if (event is RawKeyDownEvent && thisKeyModifier != null && !_keysPressed.containsKey(event.physicalKey)) { - // This inconsistancy is found on Linux GTK for AltRight: + // This inconsistency is found on Linux GTK for AltRight: // https://github.com/flutter/flutter/issues/93278 // And also on Android and iOS: // https://github.com/flutter/flutter/issues/101090 diff --git a/packages/flutter/lib/src/services/system_chrome.dart b/packages/flutter/lib/src/services/system_chrome.dart index cce5dd7194..167dac4f9b 100644 --- a/packages/flutter/lib/src/services/system_chrome.dart +++ b/packages/flutter/lib/src/services/system_chrome.dart @@ -531,9 +531,9 @@ class SystemChrome { /// to configure the system styles when an app bar is not used. When an app /// bar is used, apps should not enclose the app bar in an annotated region /// because one is automatically created. If an app bar is used and the app - /// bar is enclosed in an annotated region, the app bar overlay style supercedes + /// bar is enclosed in an annotated region, the app bar overlay style supersedes /// the status bar properties defined in the enclosing annotated region overlay - /// style and the enclosing annotated region overlay style supercedes the app bar + /// style and the enclosing annotated region overlay style supersedes the app bar /// overlay style navigation bar properties. /// /// {@tool sample} diff --git a/packages/flutter/lib/src/services/text_boundary.dart b/packages/flutter/lib/src/services/text_boundary.dart index 4e2414ef14..ff6f318bc2 100644 --- a/packages/flutter/lib/src/services/text_boundary.dart +++ b/packages/flutter/lib/src/services/text_boundary.dart @@ -59,7 +59,7 @@ abstract class TextBoundary { } } -/// A [TextBoundary] subclass for retriving the range of the grapheme the given +/// A [TextBoundary] subclass for retrieving the range of the grapheme the given /// `position` is in. /// /// The class is implemented using the diff --git a/packages/flutter/lib/src/services/text_editing_delta.dart b/packages/flutter/lib/src/services/text_editing_delta.dart index 4f4baac47f..a93c46ad49 100644 --- a/packages/flutter/lib/src/services/text_editing_delta.dart +++ b/packages/flutter/lib/src/services/text_editing_delta.dart @@ -277,7 +277,7 @@ class TextEditingDeltaInsertion extends TextEditingDelta { @override TextEditingValue apply(TextEditingValue value) { // To stay inline with the plain text model we should follow a last write wins - // policy and apply the delta to the oldText. This is due to the asyncronous + // policy and apply the delta to the oldText. This is due to the asynchronous // nature of the connection between the framework and platform text input plugins. String newText = oldText; assert(_debugTextRangeIsValid(TextRange.collapsed(insertionOffset), newText), 'Applying TextEditingDeltaInsertion failed, the insertionOffset: $insertionOffset is not within the bounds of $newText of length: ${newText.length}'); @@ -323,7 +323,7 @@ class TextEditingDeltaDeletion extends TextEditingDelta { @override TextEditingValue apply(TextEditingValue value) { // To stay inline with the plain text model we should follow a last write wins - // policy and apply the delta to the oldText. This is due to the asyncronous + // policy and apply the delta to the oldText. This is due to the asynchronous // nature of the connection between the framework and platform text input plugins. String newText = oldText; assert(_debugTextRangeIsValid(deletedRange, newText), 'Applying TextEditingDeltaDeletion failed, the deletedRange: $deletedRange is not within the bounds of $newText of length: ${newText.length}'); @@ -379,7 +379,7 @@ class TextEditingDeltaReplacement extends TextEditingDelta { @override TextEditingValue apply(TextEditingValue value) { // To stay inline with the plain text model we should follow a last write wins - // policy and apply the delta to the oldText. This is due to the asyncronous + // policy and apply the delta to the oldText. This is due to the asynchronous // nature of the connection between the framework and platform text input plugins. String newText = oldText; assert(_debugTextRangeIsValid(replacedRange, newText), 'Applying TextEditingDeltaReplacement failed, the replacedRange: $replacedRange is not within the bounds of $newText of length: ${newText.length}'); @@ -425,7 +425,7 @@ class TextEditingDeltaNonTextUpdate extends TextEditingDelta { @override TextEditingValue apply(TextEditingValue value) { // To stay inline with the plain text model we should follow a last write wins - // policy and apply the delta to the oldText. This is due to the asyncronous + // policy and apply the delta to the oldText. This is due to the asynchronous // nature of the connection between the framework and platform text input plugins. assert(_debugTextRangeIsValid(selection, oldText), 'Applying TextEditingDeltaNonTextUpdate failed, the selection range: $selection is not within the bounds of $oldText of length: ${oldText.length}'); assert(_debugTextRangeIsValid(composing, oldText), 'Applying TextEditingDeltaNonTextUpdate failed, the composing region: $composing is not within the bounds of $oldText of length: ${oldText.length}'); diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart index 120487b84f..c9855dfb9e 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart @@ -6811,7 +6811,7 @@ class MetaData extends SingleChildRenderObjectWidget { /// A widget that annotates the widget tree with a description of the meaning of /// the widgets. /// -/// Used by assitive technologies, search engines, and other semantic analysis +/// Used by assistive technologies, search engines, and other semantic analysis /// software to determine the meaning of the application. /// /// {@youtube 560 315 https://www.youtube.com/watch?v=NvtMt_DtFrQ} diff --git a/packages/flutter/lib/src/widgets/default_text_editing_shortcuts.dart b/packages/flutter/lib/src/widgets/default_text_editing_shortcuts.dart index 9ca135bc7e..41945b951f 100644 --- a/packages/flutter/lib/src/widgets/default_text_editing_shortcuts.dart +++ b/packages/flutter/lib/src/widgets/default_text_editing_shortcuts.dart @@ -34,7 +34,7 @@ import 'text_editing_intents.dart'; /// ```dart /// @override /// Widget build(BuildContext context) { -/// // If using WidgetsApp or its descendents MaterialApp or CupertinoApp, +/// // If using WidgetsApp or its descendants MaterialApp or CupertinoApp, /// // then DefaultTextEditingShortcuts is already being inserted into the /// // widget tree. /// return const DefaultTextEditingShortcuts( @@ -89,7 +89,7 @@ import 'text_editing_intents.dart'; /// /// @override /// Widget build(BuildContext context) { -/// // If using WidgetsApp or its descendents MaterialApp or CupertinoApp, +/// // If using WidgetsApp or its descendants MaterialApp or CupertinoApp, /// // then DefaultTextEditingShortcuts is already being inserted into the /// // widget tree. /// return DefaultTextEditingShortcuts( diff --git a/packages/flutter/lib/src/widgets/editable_text.dart b/packages/flutter/lib/src/widgets/editable_text.dart index f34fddcb27..5b3419bc4c 100644 --- a/packages/flutter/lib/src/widgets/editable_text.dart +++ b/packages/flutter/lib/src/widgets/editable_text.dart @@ -2368,7 +2368,7 @@ class EditableTextState extends State with AutomaticKeepAliveClien SuggestionSpan? findSuggestionSpanAtCursorIndex(int cursorIndex) { if (!_spellCheckResultsReceived || spellCheckResults!.suggestionSpans.last.range.end < cursorIndex) { - // No spell check results have been recieved or the cursor index is out + // No spell check results have been received or the cursor index is out // of range that suggestionSpans covers. return null; } @@ -2533,7 +2533,7 @@ class EditableTextState extends State with AutomaticKeepAliveClien /// /// * [EditableText.getEditableButtonItems], which performs a similar role, /// but for any editable field, not just specifically EditableText. - /// * [SelectableRegionState.contextMenuButtonItems], which peforms a similar + /// * [SelectableRegionState.contextMenuButtonItems], which performs a similar /// role but for content that is selectable but not editable. /// * [contextMenuAnchors], which provides the anchor points for the default /// context menu. @@ -2789,7 +2789,7 @@ class EditableTextState extends State with AutomaticKeepAliveClien } // Wherever the value is changed by the user, schedule a showCaretOnScreen - // to make sure the user can see the changes they just made. Programmatical + // to make sure the user can see the changes they just made. Programmatic // changes to `textEditingValue` do not trigger the behavior even if the // text field is focused. _scheduleShowCaretOnScreen(withAnimation: true); @@ -4565,14 +4565,14 @@ class EditableTextState extends State with AutomaticKeepAliveClien String text = _value.text; text = widget.obscuringCharacter * text.length; // Reveal the latest character in an obscured field only on mobile. - // Newer verions of iOS (iOS 15+) no longer reveal the most recently + // Newer versions of iOS (iOS 15+) no longer reveal the most recently // entered character. const Set mobilePlatforms = { TargetPlatform.android, TargetPlatform.fuchsia, }; - final bool breiflyShowPassword = WidgetsBinding.instance.platformDispatcher.brieflyShowPassword + final bool brieflyShowPassword = WidgetsBinding.instance.platformDispatcher.brieflyShowPassword && mobilePlatforms.contains(defaultTargetPlatform); - if (breiflyShowPassword) { + if (brieflyShowPassword) { final int? o = _obscureShowCharTicksPending > 0 ? _obscureLatestCharIndex : null; if (o != null && o >= 0 && o < text.length) { text = text.replaceRange(o, o + 1, _value.text.substring(o, o + 1)); diff --git a/packages/flutter/lib/src/widgets/focus_scope.dart b/packages/flutter/lib/src/widgets/focus_scope.dart index 61c27ba2ca..c0bfb06a8e 100644 --- a/packages/flutter/lib/src/widgets/focus_scope.dart +++ b/packages/flutter/lib/src/widgets/focus_scope.dart @@ -319,7 +319,7 @@ class Focus extends StatefulWidget { /// {@template flutter.widgets.Focus.descendantsAreTraversable} /// If false, will make this widget's descendants untraversable. /// - /// Defaults to true. Does not affect traversablility of this node (just its + /// Defaults to true. Does not affect traversability of this node (just its /// descendants): for that, use [FocusNode.skipTraversal]. /// /// Does not affect the value of [FocusNode.skipTraversal] on the diff --git a/packages/flutter/lib/src/widgets/focus_traversal.dart b/packages/flutter/lib/src/widgets/focus_traversal.dart index 3e26c1bb07..3c3a4c78ea 100644 --- a/packages/flutter/lib/src/widgets/focus_traversal.dart +++ b/packages/flutter/lib/src/widgets/focus_traversal.dart @@ -114,7 +114,7 @@ enum TraversalEdgeBehavior { /// current [FlutterView]. For example, [NextFocusAction] invoked via keyboard /// (typically the TAB key) would receive [KeyEventResult.skipRemainingHandlers] /// allowing the embedder handle the shortcut. On the web, typically the - /// control is transfered to the browser, allowing the user to reach the + /// control is transferred to the browser, allowing the user to reach the /// address bar, escape an `iframe`, or focus on HTML elements other than /// those managed by Flutter. leaveFlutterView, diff --git a/packages/flutter/lib/src/widgets/implicit_animations.dart b/packages/flutter/lib/src/widgets/implicit_animations.dart index 10c3a13b09..e91dc8189b 100644 --- a/packages/flutter/lib/src/widgets/implicit_animations.dart +++ b/packages/flutter/lib/src/widgets/implicit_animations.dart @@ -185,7 +185,7 @@ class Matrix4Tween extends Tween { end!.decompose(endTranslation, endRotation, endScale); final Vector3 lerpTranslation = beginTranslation * (1.0 - t) + endTranslation * t; - // TODO(alangardner): Implement slerp for constant rotation + // TODO(alangardner): Implement lerp for constant rotation final Quaternion lerpRotation = (beginRotation.scaled(1.0 - t) + endRotation.scaled(t)).normalized(); final Vector3 lerpScale = beginScale * (1.0 - t) + endScale * t; diff --git a/packages/flutter/lib/src/widgets/modal_barrier.dart b/packages/flutter/lib/src/widgets/modal_barrier.dart index 02f8df6db1..e1e532a8cf 100644 --- a/packages/flutter/lib/src/widgets/modal_barrier.dart +++ b/packages/flutter/lib/src/widgets/modal_barrier.dart @@ -53,7 +53,7 @@ class _SemanticsClipper extends SingleChildRenderObjectWidget{ /// Updates the [SemanticsNode.rect] of its child based on the value inside /// provided [ValueNotifier]. class _RenderSemanticsClipper extends RenderProxyBox { - /// Creats a [RenderProxyBox] that Updates the [SemanticsNode.rect] of its child + /// Creates a [RenderProxyBox] that Updates the [SemanticsNode.rect] of its child /// based on the value inside provided [ValueNotifier]. _RenderSemanticsClipper({ required ValueNotifier clipDetailsNotifier, diff --git a/packages/flutter/lib/src/widgets/platform_view.dart b/packages/flutter/lib/src/widgets/platform_view.dart index 34026a290e..9288ee14d6 100644 --- a/packages/flutter/lib/src/widgets/platform_view.dart +++ b/packages/flutter/lib/src/widgets/platform_view.dart @@ -1088,7 +1088,7 @@ class _AndroidViewSurfaceState extends State { void initState() { super.initState(); if (!widget.controller.isCreated) { - // Schedule a rebuild once creation is complete and the final dislay + // Schedule a rebuild once creation is complete and the final display // type is known. widget.controller.addOnPlatformViewCreatedListener(_onPlatformViewCreated); } diff --git a/packages/flutter/lib/src/widgets/scrollbar.dart b/packages/flutter/lib/src/widgets/scrollbar.dart index 3f577795f6..9a3440735d 100644 --- a/packages/flutter/lib/src/widgets/scrollbar.dart +++ b/packages/flutter/lib/src/widgets/scrollbar.dart @@ -396,7 +396,7 @@ class ScrollbarPainter extends ChangeNotifier implements CustomPainter { Rect? _thumbRect; // The current scroll position + _leadingThumbMainAxisOffset late double _thumbOffset; - // The fraction visible in relation to the trversable length of the track. + // The fraction visible in relation to the traversable length of the track. late double _thumbExtent; // Thumb Offsets // The thumb is offset by padding and margins. diff --git a/packages/flutter/lib/src/widgets/selectable_region.dart b/packages/flutter/lib/src/widgets/selectable_region.dart index 8159f060da..a0a68b32cc 100644 --- a/packages/flutter/lib/src/widgets/selectable_region.dart +++ b/packages/flutter/lib/src/widgets/selectable_region.dart @@ -973,7 +973,7 @@ class SelectableRegionState extends State with TextSelectionDe /// /// * [SelectableRegion.getSelectableButtonItems], which performs a similar role, /// but for any selectable text, not just specifically SelectableRegion. - /// * [EditableTextState.contextMenuButtonItems], which peforms a similar role + /// * [EditableTextState.contextMenuButtonItems], which performs a similar role /// but for content that is not just selectable but also editable. /// * [contextMenuAnchors], which provides the anchor points for the default /// context menu. diff --git a/packages/flutter/lib/src/widgets/spell_check.dart b/packages/flutter/lib/src/widgets/spell_check.dart index 341ee70e71..32f77478ab 100644 --- a/packages/flutter/lib/src/widgets/spell_check.dart +++ b/packages/flutter/lib/src/widgets/spell_check.dart @@ -75,7 +75,7 @@ class SpellCheckConfiguration { spell check enabled : $_spellCheckEnabled spell check service : $spellCheckService misspelled text style : $misspelledTextStyle - spell check suggesstions toolbar builder: $spellCheckSuggestionsToolbarBuilder + spell check suggestions toolbar builder: $spellCheckSuggestionsToolbarBuilder ''' .trim(); } diff --git a/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart b/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart index 6a635cb09f..17d6aeccda 100644 --- a/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart +++ b/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart @@ -335,7 +335,7 @@ class TapDragUpdateDetails with Diagnosticable { /// coordinates (the present [globalPosition]) when this callback is triggered. /// /// When considering a [GestureRecognizer] that tracks the number of consecutive taps, - /// this offset is associated with the most recent [PointerDownEvent] that occured. + /// this offset is associated with the most recent [PointerDownEvent] that occurred. final Offset offsetFromOrigin; /// A local delta offset from the point where the drag initially contacted @@ -343,7 +343,7 @@ class TapDragUpdateDetails with Diagnosticable { /// coordinates (the present [localPosition]) when this callback is triggered. /// /// When considering a [GestureRecognizer] that tracks the number of consecutive taps, - /// this offset is associated with the most recent [PointerDownEvent] that occured. + /// this offset is associated with the most recent [PointerDownEvent] that occurred. final Offset localOffsetFromOrigin; /// If this tap is in a series of taps, then this value represents @@ -678,7 +678,7 @@ mixin _TapStatusTrackerMixin on OneSequenceGestureRecognizer { /// ### When competing with `TapGestureRecognizer` and `DragGestureRecognizer` /// /// Similar to [TapGestureRecognizer] and [DragGestureRecognizer], -/// [TapAndDragGestureRecognizer] will not aggresively declare victory when it detects +/// [TapAndDragGestureRecognizer] will not aggressively declare victory when it detects /// a tap, so when it is competing with those gesture recognizers and others it has a chance /// of losing. /// diff --git a/packages/flutter/lib/src/widgets/text_selection.dart b/packages/flutter/lib/src/widgets/text_selection.dart index 9c3e4ccbb0..79ba17dab4 100644 --- a/packages/flutter/lib/src/widgets/text_selection.dart +++ b/packages/flutter/lib/src/widgets/text_selection.dart @@ -983,13 +983,13 @@ class SelectionOverlay { /// since magnifiers may hide themselves. If this info is needed, check /// [MagnifierController.shown]. /// {@endtemplate} - void showMagnifier(MagnifierInfo initalMagnifierInfo) { + void showMagnifier(MagnifierInfo initialMagnifierInfo) { if (_toolbar != null || _contextMenuControllerIsShown) { hideToolbar(); } - // Start from empty, so we don't utilize any rememnant values. - _magnifierInfo.value = initalMagnifierInfo; + // Start from empty, so we don't utilize any remnant values. + _magnifierInfo.value = initialMagnifierInfo; // Pre-build the magnifiers so we can tell if we've built something // or not. If we don't build a magnifiers, then we should not @@ -3076,7 +3076,7 @@ enum ClipboardStatus { /// waiting to receive the clipboard contents for the first time. unknown, - /// The content on the clipboard is not pastable, such as when it is empty. + /// The content on the clipboard is not pasteable, such as when it is empty. notPasteable, } diff --git a/packages/flutter/lib/src/widgets/widget_inspector.dart b/packages/flutter/lib/src/widgets/widget_inspector.dart index 71158304dd..6db53bf0e5 100644 --- a/packages/flutter/lib/src/widgets/widget_inspector.dart +++ b/packages/flutter/lib/src/widgets/widget_inspector.dart @@ -3587,7 +3587,7 @@ class InspectorSerializationDelegate implements DiagnosticsSerializationDelegate /// Whether the tree should only include nodes created by the local project. final bool summaryTree; - /// Maximum descendents of [DiagnosticsNode] before truncating. + /// Maximum descendants of [DiagnosticsNode] before truncating. final int maxDescendantsTruncatableNode; @override diff --git a/packages/flutter/test/cupertino/magnifier_test.dart b/packages/flutter/test/cupertino/magnifier_test.dart index 670283704f..ffa160d035 100644 --- a/packages/flutter/test/cupertino/magnifier_test.dart +++ b/packages/flutter/test/cupertino/magnifier_test.dart @@ -189,7 +189,7 @@ void main() { ), ); - // Show the magnifier initally, so that we get it in a not hidden state. + // Show the magnifier initially, so that we get it in a not hidden state. await showCupertinoMagnifier(context, tester, magnifierinfo); // Move the gesture to one that should hide it. @@ -228,7 +228,7 @@ void main() { ), ); - // Show the magnifier initally, so that we get it in a not hidden state. + // Show the magnifier initially, so that we get it in a not hidden state. await showCupertinoMagnifier(context, tester, magnifierInfo); // Move the gesture to one that should hide it. diff --git a/packages/flutter/test/cupertino/nav_bar_test.dart b/packages/flutter/test/cupertino/nav_bar_test.dart index cc95fdd5dc..5bb009eb7f 100644 --- a/packages/flutter/test/cupertino/nav_bar_test.dart +++ b/packages/flutter/test/cupertino/nav_bar_test.dart @@ -188,7 +188,7 @@ void main() { } // Regression test for https://github.com/flutter/flutter/issues/119270 - testWidgets('System navigation bar properties are not overriden', (WidgetTester tester) async { + testWidgets('System navigation bar properties are not overridden', (WidgetTester tester) async { await tester.pumpWidget( const CupertinoApp( home: CupertinoNavigationBar( diff --git a/packages/flutter/test/cupertino/nav_bar_transition_test.dart b/packages/flutter/test/cupertino/nav_bar_transition_test.dart index 029b770579..b82955422c 100644 --- a/packages/flutter/test/cupertino/nav_bar_transition_test.dart +++ b/packages/flutter/test/cupertino/nav_bar_transition_test.dart @@ -465,7 +465,7 @@ void main() { mode = SchedulerBinding.instance.debugGetRequestedPerformanceMode(); expect(mode, equals(DartPerformanceMode.latency)); - // end of transitio, go back to no requests active. + // end of transition, go back to no requests active. await tester.pump(const Duration(milliseconds: 500)); mode = SchedulerBinding.instance.debugGetRequestedPerformanceMode(); expect(mode, isNull); diff --git a/packages/flutter/test/cupertino/text_field_test.dart b/packages/flutter/test/cupertino/text_field_test.dart index c5db1dd088..cb6d8c0590 100644 --- a/packages/flutter/test/cupertino/text_field_test.dart +++ b/packages/flutter/test/cupertino/text_field_test.dart @@ -650,7 +650,7 @@ void main() { ); testWidgets( - 'decoration can be overrriden', + 'decoration can be overridden', (WidgetTester tester) async { await tester.pumpWidget( const CupertinoApp( diff --git a/packages/flutter/test/foundation/memory_allocations_test.dart b/packages/flutter/test/foundation/memory_allocations_test.dart index 37bd29d166..e802531305 100644 --- a/packages/flutter/test/foundation/memory_allocations_test.dart +++ b/packages/flutter/test/foundation/memory_allocations_test.dart @@ -38,20 +38,20 @@ void main() { test('addListener and removeListener add and remove listeners.', () { final ObjectEvent event = ObjectDisposed(object: 'object'); - ObjectEvent? recievedEvent; - void listener(ObjectEvent event) => recievedEvent = event; + ObjectEvent? receivedEvent; + void listener(ObjectEvent event) => receivedEvent = event; expect(ma.hasListeners, isFalse); ma.addListener(listener); _checkSdkHandlersSet(); ma.dispatchObjectEvent(event); - expect(recievedEvent, equals(event)); + expect(receivedEvent, equals(event)); expect(ma.hasListeners, isTrue); - recievedEvent = null; + receivedEvent = null; ma.removeListener(listener); ma.dispatchObjectEvent(event); - expect(recievedEvent, isNull); + expect(receivedEvent, isNull); expect(ma.hasListeners, isFalse); _checkSdkHandlersNotSet(); }); diff --git a/packages/flutter/test/gestures/gesture_config_regression_test.dart b/packages/flutter/test/gestures/gesture_config_regression_test.dart index 7ac1ad832c..f7b40b8c7f 100644 --- a/packages/flutter/test/gestures/gesture_config_regression_test.dart +++ b/packages/flutter/test/gestures/gesture_config_regression_test.dart @@ -50,8 +50,8 @@ class NestedScrollableCase extends StatelessWidget { } } -class NestedDragableCase extends StatelessWidget { - const NestedDragableCase({super.key, required this.testResult}); +class NestedDraggableCase extends StatelessWidget { + const NestedDraggableCase({super.key, required this.testResult}); final TestResult testResult; @@ -120,7 +120,7 @@ void main() { await tester.pumpWidget(MaterialApp( title: 'Scroll Bug', - home: NestedDragableCase(testResult: result), + home: NestedDraggableCase(testResult: result), )); // By dragging the scroll view more than the configured touch slop above but less than diff --git a/packages/flutter/test/gestures/resampler_test.dart b/packages/flutter/test/gestures/resampler_test.dart index c138d121e7..3e96f795e8 100644 --- a/packages/flutter/test/gestures/resampler_test.dart +++ b/packages/flutter/test/gestures/resampler_test.dart @@ -505,7 +505,7 @@ void main() { resampler.sample(const Duration(microseconds: 2500), Duration.zero, result.add); - // Addeds and down pointer events should have been returned. + // Added and down pointer events should have been returned. expect(result.length, 2); expect(result[0].timeStamp, const Duration(microseconds: 2500)); expect(result[0] is PointerAddedEvent, true); diff --git a/packages/flutter/test/material/checkbox_test.dart b/packages/flutter/test/material/checkbox_test.dart index fccdcff448..aa179c2f6d 100644 --- a/packages/flutter/test/material/checkbox_test.dart +++ b/packages/flutter/test/material/checkbox_test.dart @@ -1467,7 +1467,7 @@ void main() { await tester.pumpAndSettle(); expectBorder(); - // Checkbox is selected/interdeterminate, so the specified BorderSide + // Checkbox is selected/indeterminate, so the specified BorderSide // does not appear. await tester.pumpWidget(buildApp(value: true)); diff --git a/packages/flutter/test/material/dialog_test.dart b/packages/flutter/test/material/dialog_test.dart index fc9949989c..5b734dda0d 100644 --- a/packages/flutter/test/material/dialog_test.dart +++ b/packages/flutter/test/material/dialog_test.dart @@ -1513,7 +1513,7 @@ void main() { ElevatedButton( key: key1, onPressed: () {}, - child: const Text('Loooooooooog button 1'), + child: const Text('Loooooooooong button 1'), ), ElevatedButton( key: key2, diff --git a/packages/flutter/test/material/dropdown_test.dart b/packages/flutter/test/material/dropdown_test.dart index 71da466541..49375f5796 100644 --- a/packages/flutter/test/material/dropdown_test.dart +++ b/packages/flutter/test/material/dropdown_test.dart @@ -1543,7 +1543,7 @@ void main() { }); testWidgets( - 'DropdowwnButton hint displays when the items list is empty, ' + 'DropdownButton hint displays when the items list is empty, ' 'items is null, and disabledHint is null', (WidgetTester tester) async { final Key buttonKey = UniqueKey(); diff --git a/packages/flutter/test/material/input_decorator_test.dart b/packages/flutter/test/material/input_decorator_test.dart index 887b6986ae..f078ea4121 100644 --- a/packages/flutter/test/material/input_decorator_test.dart +++ b/packages/flutter/test/material/input_decorator_test.dart @@ -2412,7 +2412,7 @@ void main() { - contentPadding.vertical; // TextAlignVertical.center is specified so `child` needs to be centered - // in the avaiable space. + // in the available space. final double childMargin = (childVerticalSpaceAffordance - childHeight) / 2; final double childTop = visualDensity.baseSizeAdjustment.dy / 2.0 + contentPadding.top diff --git a/packages/flutter/test/material/magnifier_test.dart b/packages/flutter/test/material/magnifier_test.dart index 59ec1edc0c..9abf8906b2 100644 --- a/packages/flutter/test/material/magnifier_test.dart +++ b/packages/flutter/test/material/magnifier_test.dart @@ -354,7 +354,7 @@ void main() { return animatedPositioned.duration.compareTo(Duration.zero) != 0; } - testWidgets('should not be animated on the inital state', + testWidgets('should not be animated on the initial state', (WidgetTester tester) async { await tester.pumpWidget(const MaterialApp( home: Placeholder(), diff --git a/packages/flutter/test/material/outlined_button_test.dart b/packages/flutter/test/material/outlined_button_test.dart index d53af3efbc..e48671a0ac 100644 --- a/packages/flutter/test/material/outlined_button_test.dart +++ b/packages/flutter/test/material/outlined_button_test.dart @@ -1584,7 +1584,7 @@ void main() { expect(tester.takeException(), null); }); - testWidgets('OultinedButton.icon icon,label layout', (WidgetTester tester) async { + testWidgets('OutlinedButton.icon icon,label layout', (WidgetTester tester) async { final Key buttonKey = UniqueKey(); final Key iconKey = UniqueKey(); final Key labelKey = UniqueKey(); diff --git a/packages/flutter/test/material/scaffold_test.dart b/packages/flutter/test/material/scaffold_test.dart index 4921ff1850..a8167bbab9 100644 --- a/packages/flutter/test/material/scaffold_test.dart +++ b/packages/flutter/test/material/scaffold_test.dart @@ -601,7 +601,7 @@ void main() { }); testWidgets('Persistent bottom buttons alignment', (WidgetTester tester) async { - Widget buildApp(AlignmentDirectional persistentAligment) { + Widget buildApp(AlignmentDirectional persistentAlignment) { return MaterialApp( home: Scaffold( body: SingleChildScrollView( @@ -611,7 +611,7 @@ void main() { child: const Text('body'), ), ), - persistentFooterAlignment: persistentAligment, + persistentFooterAlignment: persistentAlignment, persistentFooterButtons: [ TextButton( onPressed: () { }, @@ -1908,7 +1908,7 @@ void main() { expect(scaffoldState.isDrawerOpen, false); }, variant: TargetPlatformVariant.mobile()); - testWidgets('Drawer does not open with a drag gesture on dekstop', (WidgetTester tester) async { + testWidgets('Drawer does not open with a drag gesture on desktop', (WidgetTester tester) async { await tester.pumpWidget( MaterialApp( home: Scaffold( diff --git a/packages/flutter/test/material/slider_test.dart b/packages/flutter/test/material/slider_test.dart index fb0266bf6f..a65985358d 100644 --- a/packages/flutter/test/material/slider_test.dart +++ b/packages/flutter/test/material/slider_test.dart @@ -3522,7 +3522,7 @@ void main() { final TestGesture gesture = await tester .startGesture(tester.getRect(find.byType(Slider)).centerLeft); - // Intentioanlly not calling `await tester.pumpAndSettle()` to allow drag + // Intentionally not calling `await tester.pumpAndSettle()` to allow drag // event performed on `Slider` before it is about to get unmounted. shouldShowSliderListenable.value = false; diff --git a/packages/flutter/test/material/snack_bar_test.dart b/packages/flutter/test/material/snack_bar_test.dart index b111355af7..e000e8bc9b 100644 --- a/packages/flutter/test/material/snack_bar_test.dart +++ b/packages/flutter/test/material/snack_bar_test.dart @@ -1865,7 +1865,7 @@ void main() { expect(exception.message, message); } - testWidgets('Snackbar with SnackBarBehavior.floating will assert when offsetted too high by a large Scaffold.floatingActionButton', (WidgetTester tester) async { + testWidgets('Snackbar with SnackBarBehavior.floating will assert when offset too high by a large Scaffold.floatingActionButton', (WidgetTester tester) async { // Regression test for https://github.com/flutter/flutter/issues/84263 Future boilerplate({required double? fabHeight}) { return tester.pumpWidget( @@ -1900,7 +1900,7 @@ void main() { expect(tester.takeException(), isNull); }); - testWidgets('Snackbar with SnackBarBehavior.floating will assert when offsetted too high by a large Scaffold.persistentFooterButtons', (WidgetTester tester) async { + testWidgets('Snackbar with SnackBarBehavior.floating will assert when offset too high by a large Scaffold.persistentFooterButtons', (WidgetTester tester) async { // Regression test for https://github.com/flutter/flutter/issues/84263 await tester.pumpWidget( const MaterialApp( @@ -1915,7 +1915,7 @@ void main() { expectSnackBarNotVisibleError(tester); }); - testWidgets('Snackbar with SnackBarBehavior.floating will assert when offsetted too high by a large Scaffold.bottomNavigationBar', (WidgetTester tester) async { + testWidgets('Snackbar with SnackBarBehavior.floating will assert when offset too high by a large Scaffold.bottomNavigationBar', (WidgetTester tester) async { // Regression test for https://github.com/flutter/flutter/issues/84263 await tester.pumpWidget( const MaterialApp( diff --git a/packages/flutter/test/material/tabs_test.dart b/packages/flutter/test/material/tabs_test.dart index ce47d897ab..0eeeb1e808 100644 --- a/packages/flutter/test/material/tabs_test.dart +++ b/packages/flutter/test/material/tabs_test.dart @@ -3568,7 +3568,7 @@ void main() { expect(tester.getCenter(find.byKey(lastTabKey)).dx, equals(750.0)); }); - testWidgets('Do not throw when switching beetween a scrollable TabBar and a non-scrollable TabBar', (WidgetTester tester) async { + testWidgets('Do not throw when switching between a scrollable TabBar and a non-scrollable TabBar', (WidgetTester tester) async { // This is a regression test for https://github.com/flutter/flutter/issues/120649 final TabController controller1 = TabController( vsync: const TestVSync(), diff --git a/packages/flutter/test/material/text_field_test.dart b/packages/flutter/test/material/text_field_test.dart index 812fa34b7e..fada6046e2 100644 --- a/packages/flutter/test/material/text_field_test.dart +++ b/packages/flutter/test/material/text_field_test.dart @@ -2621,7 +2621,7 @@ void main() { expect(feedback.hapticCount, 2); }); - testWidgets('Draging a collapsed handle should trigger feedback.', (WidgetTester tester) async { + testWidgets('Dragging a collapsed handle should trigger feedback.', (WidgetTester tester) async { final FeedbackTester feedback = FeedbackTester(); addTearDown(feedback.dispose); final TextEditingController controller = TextEditingController(); diff --git a/packages/flutter/test/material/typography_test.dart b/packages/flutter/test/material/typography_test.dart index 2ffb4baf2b..87bc4b821f 100644 --- a/packages/flutter/test/material/typography_test.dart +++ b/packages/flutter/test/material/typography_test.dart @@ -114,10 +114,10 @@ void main() { ]; for (final Typography fromTypography in all) { - for (final Typography toTypegraphy in all) { + for (final Typography toTypography in all) { Object? error; try { - Typography.lerp(fromTypography, toTypegraphy, 0.5); + Typography.lerp(fromTypography, toTypography, 0.5); } catch (e) { error = e; } diff --git a/packages/flutter/test/rendering/paragraph_test.dart b/packages/flutter/test/rendering/paragraph_test.dart index 3cad6c3663..b64de81124 100644 --- a/packages/flutter/test/rendering/paragraph_test.dart +++ b/packages/flutter/test/rendering/paragraph_test.dart @@ -869,19 +869,19 @@ void main() { layout(paragraph); final MockPaintingContext paintingContext = MockPaintingContext(); paragraph.paint(paintingContext, Offset.zero); - expect(paintingContext.canvas.drawedRect, isNull); - expect(paintingContext.canvas.drawedRectPaint, isNull); + expect(paintingContext.canvas.drawnRect, isNull); + expect(paintingContext.canvas.drawnRectPaint, isNull); selectionParagraph(paragraph, const TextPosition(offset: 1), const TextPosition(offset: 5)); paragraph.paint(paintingContext, Offset.zero); - expect(paintingContext.canvas.drawedRect, const Rect.fromLTWH(14.0, 0.0, 56.0, 14.0)); - expect(paintingContext.canvas.drawedRectPaint!.style, PaintingStyle.fill); - expect(paintingContext.canvas.drawedRectPaint!.color, selectionColor); + expect(paintingContext.canvas.drawnRect, const Rect.fromLTWH(14.0, 0.0, 56.0, 14.0)); + expect(paintingContext.canvas.drawnRectPaint!.style, PaintingStyle.fill); + expect(paintingContext.canvas.drawnRectPaint!.color, selectionColor); selectionParagraph(paragraph, const TextPosition(offset: 2), const TextPosition(offset: 4)); paragraph.paint(paintingContext, Offset.zero); - expect(paintingContext.canvas.drawedRect, const Rect.fromLTWH(28.0, 0.0, 28.0, 14.0)); - expect(paintingContext.canvas.drawedRectPaint!.style, PaintingStyle.fill); - expect(paintingContext.canvas.drawedRectPaint!.color, selectionColor); + expect(paintingContext.canvas.drawnRect, const Rect.fromLTWH(28.0, 0.0, 28.0, 14.0)); + expect(paintingContext.canvas.drawnRectPaint!.style, PaintingStyle.fill); + expect(paintingContext.canvas.drawnRectPaint!.color, selectionColor); }); test('getPositionForOffset works', () async { @@ -1357,13 +1357,13 @@ void main() { } class MockCanvas extends Fake implements Canvas { - Rect? drawedRect; - Paint? drawedRectPaint; + Rect? drawnRect; + Paint? drawnRectPaint; @override void drawRect(Rect rect, Paint paint) { - drawedRect = rect; - drawedRectPaint = paint; + drawnRect = rect; + drawnRectPaint = paint; } @override diff --git a/packages/flutter/test/semantics/semantics_test.dart b/packages/flutter/test/semantics/semantics_test.dart index 85916b0594..16a97847f0 100644 --- a/packages/flutter/test/semantics/semantics_test.dart +++ b/packages/flutter/test/semantics/semantics_test.dart @@ -678,7 +678,7 @@ void main() { ); }); - test('Attributed String can concate', () { + test('Attributed String can concat', () { final AttributedString string1 = AttributedString( 'string1', attributes: [ diff --git a/packages/flutter/test/services/text_formatter_test.dart b/packages/flutter/test/services/text_formatter_test.dart index 0202e9507c..dd2d3a2fc7 100644 --- a/packages/flutter/test/services/text_formatter_test.dart +++ b/packages/flutter/test/services/text_formatter_test.dart @@ -392,7 +392,7 @@ void main() { expect(truncated.selection.extentOffset, stringTruncated.length); }); - test('Counts grapheme clustsers as single characters', () async { + test('Counts grapheme clusters as single characters', () async { const String stringOverflowing = '👨‍👩‍👦01234567890'; const TextEditingValue value = TextEditingValue( text: stringOverflowing, diff --git a/packages/flutter/test/widgets/default_colors_test.dart b/packages/flutter/test/widgets/default_colors_test.dart index 14a965195c..c076577546 100644 --- a/packages/flutter/test/widgets/default_colors_test.dart +++ b/packages/flutter/test/widgets/default_colors_test.dart @@ -98,7 +98,7 @@ void main() { find.byType(Align), { const Color(0xFFFFFFFF) }, ); - // fake a "select all" event to selecte the text + // fake a "select all" event to select the text Actions.invoke(key.currentContext!, const SelectAllTextIntent(SelectionChangedCause.keyboard)); await tester.pump(); await _expectColors( diff --git a/packages/flutter/test/widgets/image_filter_test.dart b/packages/flutter/test/widgets/image_filter_test.dart index c4f00e6c12..6124566811 100644 --- a/packages/flutter/test/widgets/image_filter_test.dart +++ b/packages/flutter/test/widgets/image_filter_test.dart @@ -179,7 +179,7 @@ void main() { }); testWidgets('Image filter - enabled and disabled', (WidgetTester tester) async { - Future pumpWithEnabledStaet(bool enabled) async { + Future pumpWithEnabledState(bool enabled) async { await tester.pumpWidget( RepaintBoundary( child: ImageFiltered( @@ -191,11 +191,11 @@ void main() { ); } - await pumpWithEnabledStaet(false); + await pumpWithEnabledState(false); expect(tester.layers, isNot(contains(isA()))); - await pumpWithEnabledStaet(true); + await pumpWithEnabledState(true); expect(tester.layers, contains(isA())); }); } diff --git a/packages/flutter/test/widgets/media_query_test.dart b/packages/flutter/test/widgets/media_query_test.dart index f42f4e3d4b..8de8f5628f 100644 --- a/packages/flutter/test/widgets/media_query_test.dart +++ b/packages/flutter/test/widgets/media_query_test.dart @@ -300,7 +300,7 @@ void main() { expect(data.displayFeatures, view.displayFeatures); }); - testWidgets('MediaQuery.fromView injects a new MediaQuery with data from view when no sourrounding MediaQuery exists', (WidgetTester tester) async { + testWidgets('MediaQuery.fromView injects a new MediaQuery with data from view when no surrounding MediaQuery exists', (WidgetTester tester) async { final TestPlatformDispatcher platformDispatcher = TestPlatformDispatcher(platformDispatcher: tester.binding.platformDispatcher); platformDispatcher ..textScaleFactorTestValue = 123 diff --git a/packages/flutter/test/widgets/scrollable_test.dart b/packages/flutter/test/widgets/scrollable_test.dart index 0a7501062b..9229df2a5b 100644 --- a/packages/flutter/test/widgets/scrollable_test.dart +++ b/packages/flutter/test/widgets/scrollable_test.dart @@ -336,7 +336,7 @@ void main() { expect(getScrollOffset(tester), 0.0); }); - testWidgets('Scroll pointer signals are handled when there is competion', (WidgetTester tester) async { + testWidgets('Scroll pointer signals are handled when there is competition', (WidgetTester tester) async { // This is a regression test. When there are multiple scrollables listening // to the same event, for example when scrollables are nested, there used // to be exceptions at scrolling events. diff --git a/packages/flutter/test/widgets/selectable_region_test.dart b/packages/flutter/test/widgets/selectable_region_test.dart index c91a4465a1..b842591446 100644 --- a/packages/flutter/test/widgets/selectable_region_test.dart +++ b/packages/flutter/test/widgets/selectable_region_test.dart @@ -1604,7 +1604,7 @@ void main() { testWidgets('Can drag handles to show, unshow, and update magnifier', (WidgetTester tester) async { - const String text = 'Monkies and rabbits in my soup'; + const String text = 'Monkeys and rabbits in my soup'; await tester.pumpWidget( MaterialApp( diff --git a/packages/flutter/test/widgets/snapshot_widget_test.dart b/packages/flutter/test/widgets/snapshot_widget_test.dart index 2750bb03da..86d14da63b 100644 --- a/packages/flutter/test/widgets/snapshot_widget_test.dart +++ b/packages/flutter/test/widgets/snapshot_widget_test.dart @@ -241,7 +241,7 @@ void main() { expect(tester.takeException(), isNull); }, skip: kIsWeb); // TODO(jonahwilliams): https://github.com/flutter/flutter/issues/106689 - testWidgets('RenderSnapshotWidget does not take a snapshot if a platform view is encounted with SnapshotMode.permissive', (WidgetTester tester) async { + testWidgets('RenderSnapshotWidget does not take a snapshot if a platform view is encountered with SnapshotMode.permissive', (WidgetTester tester) async { final SnapshotController controller = SnapshotController(allowSnapshotting: true); await tester.pumpWidget( Center( diff --git a/packages/flutter/test/widgets/widget_inspector_test.dart b/packages/flutter/test/widgets/widget_inspector_test.dart index 216a6c8039..bf9342c803 100644 --- a/packages/flutter/test/widgets/widget_inspector_test.dart +++ b/packages/flutter/test/widgets/widget_inspector_test.dart @@ -1397,7 +1397,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { expect(pubRoots, unorderedEquals(directories)); }); - test('can add multiple directories seperately', () async { + test('can add multiple directories separately', () async { service.addPubRootDirectories([directoryA]); service.addPubRootDirectories([directoryB]); service.addPubRootDirectories([]); @@ -1439,7 +1439,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { expect(pubRoots, equals([directoryC])); }); - test('removes multiple directories seperately', () async { + test('removes multiple directories separately', () async { service.removePubRootDirectories([directoryA]); service.removePubRootDirectories([directoryB]); service.removePubRootDirectories([]); @@ -1595,7 +1595,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { ); testWidgets( - 'does not have createdByLocalProject when thePubRootDirecty has a different suffix', + 'does not have createdByLocalProject when thePubRootDirectory has a different suffix', (WidgetTester tester) async { const Widget widget = Directionality( textDirection: TextDirection.ltr, diff --git a/packages/flutter/test_profile/README.md b/packages/flutter/test_profile/README.md index 9ce3dd47ab..9194d32482 100644 --- a/packages/flutter/test_profile/README.md +++ b/packages/flutter/test_profile/README.md @@ -1,3 +1,3 @@ -This folder contains unit tests that are run with `kProfileMode` set to true. This can be used for unit testing code that is guarded by this boolean, such as in cases where debug code is intentionally ellided for performance or code size reasons. The unit tests are still run in the VM and are not otherwise precompiled. +This folder contains unit tests that are run with `kProfileMode` set to true. This can be used for unit testing code that is guarded by this boolean, such as in cases where debug code is intentionally elided for performance or code size reasons. The unit tests are still run in the VM and are not otherwise precompiled. To run these test from the command line, use the command: `flutter test --dart-define=dart.vm.profile=true test_release/` diff --git a/packages/flutter/test_release/README.md b/packages/flutter/test_release/README.md index 97d66a62b9..e36dcbfc20 100644 --- a/packages/flutter/test_release/README.md +++ b/packages/flutter/test_release/README.md @@ -1,3 +1,3 @@ -This folder contains unit tests that are run with `kReleaseMode` set to true. This can be used for unit testing code that is guarded by this boolean, such as in cases where debug code is intentionally ellided for performance or code size reasons. The unit tests are still run in the VM and are not otherwise precompiled. +This folder contains unit tests that are run with `kReleaseMode` set to true. This can be used for unit testing code that is guarded by this boolean, such as in cases where debug code is intentionally elided for performance or code size reasons. The unit tests are still run in the VM and are not otherwise precompiled. To run these test from the command line, use the command: `flutter test --dart-define=dart.vm.product=true test_release/` diff --git a/packages/flutter/test_release/foundation/memory_allocations_test.dart b/packages/flutter/test_release/foundation/memory_allocations_test.dart index 0fe4d3e1d8..cac6c140bc 100644 --- a/packages/flutter/test_release/foundation/memory_allocations_test.dart +++ b/packages/flutter/test_release/foundation/memory_allocations_test.dart @@ -22,8 +22,8 @@ void main() { testWidgets( '$MemoryAllocations is noop when kFlutterMemoryAllocationsEnabled is false.', (WidgetTester tester) async { - ObjectEvent? recievedEvent; - ObjectEvent listener(ObjectEvent event) => recievedEvent = event; + ObjectEvent? receivedEvent; + ObjectEvent listener(ObjectEvent event) => receivedEvent = event; ma.addListener(listener); _checkSdkHandlersNotSet(); @@ -31,7 +31,7 @@ void main() { await _activateFlutterObjects(tester); _checkSdkHandlersNotSet(); - expect(recievedEvent, isNull); + expect(receivedEvent, isNull); expect(ma.hasListeners, isFalse); ma.removeListener(listener); diff --git a/packages/flutter/test_release/rendering/memory_allocations_test.dart b/packages/flutter/test_release/rendering/memory_allocations_test.dart index e8a14d7869..f82b2f6786 100644 --- a/packages/flutter/test_release/rendering/memory_allocations_test.dart +++ b/packages/flutter/test_release/rendering/memory_allocations_test.dart @@ -18,14 +18,14 @@ void main() { testWidgets( '$MemoryAllocations is noop when kFlutterMemoryAllocationsEnabled is false.', (WidgetTester tester) async { - ObjectEvent? recievedEvent; - ObjectEvent listener(ObjectEvent event) => recievedEvent = event; + ObjectEvent? receivedEvent; + ObjectEvent listener(ObjectEvent event) => receivedEvent = event; ma.addListener(listener); expect(ma.hasListeners, isFalse); await _activateFlutterObjects(tester); - expect(recievedEvent, isNull); + expect(receivedEvent, isNull); expect(ma.hasListeners, isFalse); ma.removeListener(listener); diff --git a/packages/flutter/test_release/widgets/memory_allocations_test.dart b/packages/flutter/test_release/widgets/memory_allocations_test.dart index 77c22cc33c..1545b931ba 100644 --- a/packages/flutter/test_release/widgets/memory_allocations_test.dart +++ b/packages/flutter/test_release/widgets/memory_allocations_test.dart @@ -16,14 +16,14 @@ void main() { testWidgets( '$MemoryAllocations is noop when kFlutterMemoryAllocationsEnabled is false.', (WidgetTester tester) async { - ObjectEvent? recievedEvent; - ObjectEvent listener(ObjectEvent event) => recievedEvent = event; + ObjectEvent? receivedEvent; + ObjectEvent listener(ObjectEvent event) => receivedEvent = event; ma.addListener(listener); expect(ma.hasListeners, isFalse); await _activateFlutterObjects(tester); - expect(recievedEvent, isNull); + expect(receivedEvent, isNull); expect(ma.hasListeners, isFalse); ma.removeListener(listener); diff --git a/packages/flutter_goldens_client/lib/skia_client.dart b/packages/flutter_goldens_client/lib/skia_client.dart index b30b736bc3..06555747a4 100644 --- a/packages/flutter_goldens_client/lib/skia_client.dart +++ b/packages/flutter_goldens_client/lib/skia_client.dart @@ -427,7 +427,7 @@ class SkiaGoldClient { } expectation = jsonResponse['digest'] as String?; } on FormatException catch (error) { - // Ideally we'd use something like package:test's printOnError, but best reliabilty + // Ideally we'd use something like package:test's printOnError, but best reliability // in getting logs on CI for now we're just using print. // See also: https://github.com/flutter/flutter/issues/91285 print( // ignore: avoid_print diff --git a/packages/flutter_test/lib/src/controller.dart b/packages/flutter_test/lib/src/controller.dart index d454878fcb..55b226f1f0 100644 --- a/packages/flutter_test/lib/src/controller.dart +++ b/packages/flutter_test/lib/src/controller.dart @@ -23,7 +23,7 @@ const double kDragSlopDefault = 20.0; const String _defaultPlatform = kIsWeb ? 'web' : 'android'; -/// Class that programatically interacts with the [Semantics] tree. +/// Class that programmatically interacts with the [Semantics] tree. /// /// Allows for testing of the [Semantics] tree, which is used by assistive /// technology, search engines, and other analysis software to determine the @@ -187,7 +187,7 @@ class SemanticsController { } /// Whether or not the node is important for semantics. Should match most cases - /// on the platforms, but certain edge cases will be inconsisent. + /// on the platforms, but certain edge cases will be inconsistent. /// /// Based on: /// diff --git a/packages/flutter_test/lib/src/finders.dart b/packages/flutter_test/lib/src/finders.dart index cfd7ecb115..de3a1134ea 100644 --- a/packages/flutter_test/lib/src/finders.dart +++ b/packages/flutter_test/lib/src/finders.dart @@ -74,7 +74,7 @@ class CommonFinders { /// [Text] and [Text.rich] widgets) are matched by comparing the /// [InlineSpan.toPlainText] with the given `pattern`. /// - /// For [EditableText] widgets, the `pattern` is always compared to the currentt + /// For [EditableText] widgets, the `pattern` is always compared to the current /// value of the [EditableText.controller]. /// /// If the `skipOffstage` argument is true (the default), then this skips diff --git a/packages/flutter_test/test/controller_test.dart b/packages/flutter_test/test/controller_test.dart index 35d4761932..b82ad818d1 100644 --- a/packages/flutter_test/test/controller_test.dart +++ b/packages/flutter_test/test/controller_test.dart @@ -876,7 +876,7 @@ void main() { await tester.pumpWidget(const MaterialApp(home: _SemanticsTestWidget())); // We look for a SingleChildScrollView since the view itself isn't - // important for accessiblity, so it won't show up in the traversal + // important for accessibility, so it won't show up in the traversal expect( () => tester.semantics.simulatedAccessibilityTraversal(start: find.byType(SingleChildScrollView)), throwsA(isA()), diff --git a/packages/flutter_test/test/event_simulation_test.dart b/packages/flutter_test/test/event_simulation_test.dart index 344f77b22d..8844b95051 100644 --- a/packages/flutter_test/test/event_simulation_test.dart +++ b/packages/flutter_test/test/event_simulation_test.dart @@ -340,7 +340,7 @@ void main() { // A (physical keyA, logical keyB) is released. // // Since this event is transmitted to HardwareKeyboard as-is, it will be rejected due to - // inconsistent logical key. This does not indicate behaviral difference, + // inconsistent logical key. This does not indicate behavioral difference, // since KeyData is will never send malformed data sequence in real applications. await _shouldThrow(() => simulateKeyUpEvent(LogicalKeyboardKey.keyB, physicalKey: PhysicalKeyboardKey.keyA)); diff --git a/packages/flutter_test/test/live_widget_controller_test.dart b/packages/flutter_test/test/live_widget_controller_test.dart index 261cd3b5df..86b2709384 100644 --- a/packages/flutter_test/test/live_widget_controller_test.dart +++ b/packages/flutter_test/test/live_widget_controller_test.dart @@ -147,7 +147,7 @@ void main() { expect(timeDiffs.length, records.length); for (final Duration diff in timeDiffs) { // Allow some freedom of time delay in real world. - // TODO(pdblasi-google): The expected wiggle room should be -1, but occassional + // TODO(pdblasi-google): The expected wiggle room should be -1, but occasional // results were reaching -6. This assert has been adjusted to reduce flakiness, // but the root cause is still unknown. (https://github.com/flutter/flutter/issues/109638) assert(diff.inMilliseconds > -7, 'timeDiffs were: $timeDiffs (offending time was ${diff.inMilliseconds}ms)'); diff --git a/packages/flutter_tools/doc/daemon.md b/packages/flutter_tools/doc/daemon.md index 15d144cf93..7ea369014d 100644 --- a/packages/flutter_tools/doc/daemon.md +++ b/packages/flutter_tools/doc/daemon.md @@ -296,7 +296,7 @@ See the [source](https://github.com/flutter/flutter/blob/master/packages/flutter ## Changelog -- 0.6.1: Added `coldBoot` option to `emulator.lauch` command. +- 0.6.1: Added `coldBoot` option to `emulator.launch` command. - 0.6.0: Added `debounce` option to `app.restart` command. - 0.5.3: Added `emulatorId` field to device. - 0.5.2: Added `platformType` and `category` fields to emulator. diff --git a/packages/flutter_tools/lib/src/android/android_device.dart b/packages/flutter_tools/lib/src/android/android_device.dart index 964c07845a..7b43e0891b 100644 --- a/packages/flutter_tools/lib/src/android/android_device.dart +++ b/packages/flutter_tools/lib/src/android/android_device.dart @@ -604,7 +604,7 @@ class AndroidDevice extends Device { if (debuggingOptions.debuggingEnabled) { observatoryDiscovery = ProtocolDiscovery.observatory( // Avoid using getLogReader, which returns a singleton instance, because the - // observatory discovery will dipose at the end. creating a new logger here allows + // observatory 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/base/build.dart b/packages/flutter_tools/lib/src/base/build.dart index 4de019096a..f169082dcc 100644 --- a/packages/flutter_tools/lib/src/base/build.dart +++ b/packages/flutter_tools/lib/src/base/build.dart @@ -169,7 +169,7 @@ class AOTSnapshotter { ]); } - // When buiding for iOS and splitting out debug info, we want to strip + // When building for iOS and splitting out debug info, we want to strip // manually after the dSYM export, instead of in the `gen_snapshot`. final bool stripAfterBuild; if (targetingApplePlatform) { diff --git a/packages/flutter_tools/lib/src/base/io.dart b/packages/flutter_tools/lib/src/base/io.dart index cf239912db..2a6352737b 100644 --- a/packages/flutter_tools/lib/src/base/io.dart +++ b/packages/flutter_tools/lib/src/base/io.dart @@ -231,7 +231,7 @@ class PosixProcessSignal extends ProcessSignal { /// * by throwing an exception asynchronously, and /// * by completing the Future stdout.done with an error. /// -/// This class enapsulates all three so that we don't have to worry about it +/// This class encapsulates all three so that we don't have to worry about it /// anywhere else. class Stdio { Stdio(); diff --git a/packages/flutter_tools/lib/src/base/logger.dart b/packages/flutter_tools/lib/src/base/logger.dart index 49aa2a7bff..e1a54c7490 100644 --- a/packages/flutter_tools/lib/src/base/logger.dart +++ b/packages/flutter_tools/lib/src/base/logger.dart @@ -625,7 +625,7 @@ class StdoutLogger extends Logger { } } -typedef _Writter = void Function(String message); +typedef _Writer = void Function(String message); /// Wraps the message in a box, and writes the bytes by calling [write]. /// @@ -643,7 +643,7 @@ typedef _Writter = void Function(String message); void _generateBox({ required String message, required int wrapColumn, - required _Writter write, + required _Writer write, required Terminal terminal, String? title, }) { diff --git a/packages/flutter_tools/lib/src/base/os.dart b/packages/flutter_tools/lib/src/base/os.dart index 230018e7e0..b983ddd0bb 100644 --- a/packages/flutter_tools/lib/src/base/os.dart +++ b/packages/flutter_tools/lib/src/base/os.dart @@ -318,13 +318,13 @@ class _LinuxUtils extends _PosixUtils { try { // Split the operating system version which should be formatted as // "Linux kernelRelease build", by spaces. - final List osVersionSplitted = _platform.operatingSystemVersion.split(' '); - if (osVersionSplitted.length < 3) { + final List osVersionSplit = _platform.operatingSystemVersion.split(' '); + if (osVersionSplit.length < 3) { // The operating system version didn't have the expected format. // Initialize as an empty string. kernelRelease = ''; } else { - kernelRelease = ' ${osVersionSplitted[1]}'; + kernelRelease = ' ${osVersionSplit[1]}'; } } on Exception catch (e) { _logger.printTrace('Failed obtaining kernel release for Linux: $e'); @@ -336,8 +336,8 @@ class _LinuxUtils extends _PosixUtils { } String _getOsReleaseValueForKey(String osRelease, String key) { - final List osReleaseSplitted = osRelease.split('\n'); - for (String entry in osReleaseSplitted) { + final List osReleaseSplit = osRelease.split('\n'); + for (String entry in osReleaseSplit) { entry = entry.trim(); final List entryKeyValuePair = entry.split('='); if(entryKeyValuePair[0] == key) { diff --git a/packages/flutter_tools/lib/src/commands/custom_devices.dart b/packages/flutter_tools/lib/src/commands/custom_devices.dart index 40dc89ca84..c667acec16 100644 --- a/packages/flutter_tools/lib/src/commands/custom_devices.dart +++ b/packages/flutter_tools/lib/src/commands/custom_devices.dart @@ -281,9 +281,9 @@ If a file already exists at the backup location, it will be overwritten. logger.printStatus( wasBackedUp - ? 'Successfully resetted the custom devices config file and created a ' + ? 'Successfully reset the custom devices config file and created a ' 'backup at "$configBackupPath".' - : 'Successfully resetted the custom devices config file.' + : 'Successfully reset the custom devices config file.' ); return FlutterCommandResult.success(); } diff --git a/packages/flutter_tools/lib/src/commands/run.dart b/packages/flutter_tools/lib/src/commands/run.dart index d56b3a03d6..b137b0b100 100644 --- a/packages/flutter_tools/lib/src/commands/run.dart +++ b/packages/flutter_tools/lib/src/commands/run.dart @@ -140,7 +140,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment ..addFlag('enable-dart-profiling', defaultsTo: true, help: 'Whether the Dart VM sampling CPU profiler is enabled. This flag ' - 'is only meaningnful in debug and profile builds.', + 'is only meaningful in debug and profile builds.', ) ..addFlag('enable-software-rendering', negatable: false, diff --git a/packages/flutter_tools/lib/src/daemon.dart b/packages/flutter_tools/lib/src/daemon.dart index 154df4cb6d..898d2ee1b0 100644 --- a/packages/flutter_tools/lib/src/daemon.dart +++ b/packages/flutter_tools/lib/src/daemon.dart @@ -57,7 +57,7 @@ enum _InputStreamParseState { /// message data. /// /// If the JSON object contains the key [_binaryLengthKey] with an integer -/// value (will be refered to as N), the following N bytes after the newline +/// value (will be referred to as N), the following N bytes after the newline /// character will contain the binary part of the message. @visibleForTesting class DaemonInputStreamConverter { diff --git a/packages/flutter_tools/lib/src/dart/pub.dart b/packages/flutter_tools/lib/src/dart/pub.dart index a75efc1f75..3bba942a3a 100644 --- a/packages/flutter_tools/lib/src/dart/pub.dart +++ b/packages/flutter_tools/lib/src/dart/pub.dart @@ -231,7 +231,7 @@ abstract class Pub { /// should be passed appropriately in [arguments]. This ensures output from /// pub will refer to relative paths correctly. /// - /// [touchesPackageConfig] should be true if this is a command expexted to + /// [touchesPackageConfig] should be true if this is a command expected to /// create a new `.dart_tool/package_config.json` file. Future interactively( List arguments, { diff --git a/packages/flutter_tools/lib/src/debug_adapters/README.md b/packages/flutter_tools/lib/src/debug_adapters/README.md index 2d426d299f..108ce14707 100644 --- a/packages/flutter_tools/lib/src/debug_adapters/README.md +++ b/packages/flutter_tools/lib/src/debug_adapters/README.md @@ -2,7 +2,7 @@ This document is Flutter-specific. For information on the standard Dart DAP implementation, [see this document](https://github.com/dart-lang/sdk/blob/main/pkg/dds/tool/dap/README.md). -Flutter includes support for debugging using [the Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/) as an alternative to using the [VM Service](https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md) directly, simplying the integration for new editors. +Flutter includes support for debugging using [the Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/) as an alternative to using the [VM Service](https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md) directly, simplifying the integration for new editors. The debug adapters are started with the `flutter debug-adapter` command and are intended to be consumed by DAP-compliant tools such as Flutter-specific extensions for editors, or configured by users whose editors include generic configurable DAP clients. diff --git a/packages/flutter_tools/lib/src/debug_adapters/flutter_adapter.dart b/packages/flutter_tools/lib/src/debug_adapters/flutter_adapter.dart index 4465bc7021..635cffc709 100644 --- a/packages/flutter_tools/lib/src/debug_adapters/flutter_adapter.dart +++ b/packages/flutter_tools/lib/src/debug_adapters/flutter_adapter.dart @@ -591,7 +591,7 @@ class FlutterDebugAdapter extends FlutterBaseDebugAdapter { // debugging, we must try to detect which messages are likely Flutter // messages as reliably as possible, as trying to process users output // as a Flutter message may result in an unhandled error that will - // terminate the debug adater in a way that does not provide feedback + // terminate the debug adapter in a way that does not provide feedback // because the standard crash violates the DAP protocol. Object? jsonData; try { diff --git a/packages/flutter_tools/lib/src/flutter_project_metadata.dart b/packages/flutter_tools/lib/src/flutter_project_metadata.dart index 37a7461c5c..08e95daa06 100644 --- a/packages/flutter_tools/lib/src/flutter_project_metadata.dart +++ b/packages/flutter_tools/lib/src/flutter_project_metadata.dart @@ -210,7 +210,7 @@ class MigrateConfig { this.unmanagedFiles = kDefaultUnmanagedFiles }) : platformConfigs = platformConfigs ?? {}; - /// A mapping of the files that are unmanaged by defult for each platform. + /// A mapping of the files that are unmanaged by default for each platform. static const List kDefaultUnmanagedFiles = [ 'lib/main.dart', 'ios/Runner.xcodeproj/project.pbxproj', diff --git a/packages/flutter_tools/lib/src/http_host_validator.dart b/packages/flutter_tools/lib/src/http_host_validator.dart index 37a7b7bdf1..71f1dec5c1 100644 --- a/packages/flutter_tools/lib/src/http_host_validator.dart +++ b/packages/flutter_tools/lib/src/http_host_validator.dart @@ -59,7 +59,7 @@ class HttpHostValidator extends DoctorValidator { } on HttpException catch (error) { return 'An HTTP error occurred while checking "$host": ${error.message}'; } on HandshakeException catch (error) { - return 'A crytographic error occurred while checking "$host": ${error.message}\n' + return 'A cryptographic error occurred while checking "$host": ${error.message}\n' 'You may be experiencing a man-in-the-middle attack, your network may be ' 'compromised, or you may have malware installed on your computer.'; } on OSError catch (error) { diff --git a/packages/flutter_tools/lib/src/ios/devices.dart b/packages/flutter_tools/lib/src/ios/devices.dart index c58de37a6b..470c253821 100644 --- a/packages/flutter_tools/lib/src/ios/devices.dart +++ b/packages/flutter_tools/lib/src/ios/devices.dart @@ -378,7 +378,7 @@ class IOSDevice extends Device { deviceLogReader.debuggerStream = iosDeployDebugger; } } - // Don't port foward if debugging with a network device. + // Don't port forward if debugging with a network device. observatoryDiscovery = ProtocolDiscovery.observatory( deviceLogReader, portForwarder: interfaceType == IOSDeviceConnectionInterface.network ? null : portForwarder, diff --git a/packages/flutter_tools/lib/src/project.dart b/packages/flutter_tools/lib/src/project.dart index 2a910671ce..2d1a111717 100644 --- a/packages/flutter_tools/lib/src/project.dart +++ b/packages/flutter_tools/lib/src/project.dart @@ -27,7 +27,7 @@ import 'xcode_project.dart'; export 'cmake_project.dart'; export 'xcode_project.dart'; -/// Emum for each officially supported platform. +/// Enum for each officially supported platform. enum SupportedPlatform { android, ios, diff --git a/packages/flutter_tools/lib/src/resident_runner.dart b/packages/flutter_tools/lib/src/resident_runner.dart index b19b77128b..c230b6d01b 100644 --- a/packages/flutter_tools/lib/src/resident_runner.dart +++ b/packages/flutter_tools/lib/src/resident_runner.dart @@ -1206,7 +1206,7 @@ abstract class ResidentRunner extends ResidentHandlers { /// Connect to a flutter application. /// /// [needsFullRestart] defaults to `true`, and controls if the frontend server should - /// compile a full dill. This should be set to `false` if this is called in [ResidentRunner.run], since that method already perfoms an initial compilation. + /// compile a full dill. This should be set to `false` if this is called in [ResidentRunner.run], since that method already performs an initial compilation. Future attach({ Completer? connectionInfoCompleter, Completer? appStartedCompleter, diff --git a/packages/flutter_tools/lib/src/web/bootstrap.dart b/packages/flutter_tools/lib/src/web/bootstrap.dart index ccf714c99a..f05428a25d 100644 --- a/packages/flutter_tools/lib/src/web/bootstrap.dart +++ b/packages/flutter_tools/lib/src/web/bootstrap.dart @@ -157,6 +157,7 @@ String generateMainModule({ required bool nativeNullAssertions, String bootstrapModule = 'main_module.bootstrap', }) { + // The typo below in "EXTENTION" is load-bearing, package:build depends on it. return ''' /* ENTRYPOINT_EXTENTION_MARKER */ // Disable require module timeout diff --git a/packages/flutter_tools/lib/src/web/chrome.dart b/packages/flutter_tools/lib/src/web/chrome.dart index d7fbcc18a0..22068d5e3e 100644 --- a/packages/flutter_tools/lib/src/web/chrome.dart +++ b/packages/flutter_tools/lib/src/web/chrome.dart @@ -152,7 +152,7 @@ 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. + /// a "headful" browser. /// /// [debugPort] is Chrome's debugging protocol port. If null, a random free /// port is picked automatically. diff --git a/packages/flutter_tools/lib/src/web/web_device.dart b/packages/flutter_tools/lib/src/web/web_device.dart index 17a535fe9f..3938a963a3 100644 --- a/packages/flutter_tools/lib/src/web/web_device.dart +++ b/packages/flutter_tools/lib/src/web/web_device.dart @@ -135,7 +135,7 @@ abstract class ChromiumDevice extends Device { if (pattern.hasMatch(debuggingOptions.webLaunchUrl!)) { url = debuggingOptions.webLaunchUrl!; } else { - throwToolExit('"${debuggingOptions.webLaunchUrl}" is not a vaild HTTP URL.'); + throwToolExit('"${debuggingOptions.webLaunchUrl}" is not a valid HTTP URL.'); } } else { url = platformArgs['uri']! as String; diff --git a/packages/flutter_tools/lib/src/windows/visual_studio.dart b/packages/flutter_tools/lib/src/windows/visual_studio.dart index 3d9fe4877e..c1c6cf9f35 100644 --- a/packages/flutter_tools/lib/src/windows/visual_studio.dart +++ b/packages/flutter_tools/lib/src/windows/visual_studio.dart @@ -349,7 +349,7 @@ class VisualStudio { /// will be returned, otherwise returns the latest installed version regardless /// of components and version, or null if no such installation is found. late final VswhereDetails? _bestVisualStudioDetails = () { - // First, attempt to find the latest version of Visual Studio that satifies + // First, attempt to find the latest version of Visual Studio that satisfies // both the minimum supported version and the required workloads. // Check in the order of stable VS, stable BT, pre-release VS, pre-release BT. final List minimumVersionArguments = [ @@ -371,7 +371,7 @@ class VisualStudio { } } - // An installation that satifies requirements could not be found. + // An installation that satisfies requirements could not be found. // Fallback to the latest Visual Studio installation. return _visualStudioDetails( additionalArguments: [_vswherePrereleaseArgument, '-all']); diff --git a/packages/flutter_tools/templates/app_shared/windows.tmpl/runner/win32_window.cpp b/packages/flutter_tools/templates/app_shared/windows.tmpl/runner/win32_window.cpp index 041a385547..60608d0fe5 100644 --- a/packages/flutter_tools/templates/app_shared/windows.tmpl/runner/win32_window.cpp +++ b/packages/flutter_tools/templates/app_shared/windows.tmpl/runner/win32_window.cpp @@ -60,7 +60,7 @@ class WindowClassRegistrar { public: ~WindowClassRegistrar() = default; - // Returns the singleton registar instance. + // Returns the singleton registrar instance. static WindowClassRegistrar* GetInstance() { if (!instance_) { instance_ = new WindowClassRegistrar(); diff --git a/packages/flutter_tools/templates/app_shared/windows.tmpl/runner/win32_window.h b/packages/flutter_tools/templates/app_shared/windows.tmpl/runner/win32_window.h index c86632d8a6..e901dde684 100644 --- a/packages/flutter_tools/templates/app_shared/windows.tmpl/runner/win32_window.h +++ b/packages/flutter_tools/templates/app_shared/windows.tmpl/runner/win32_window.h @@ -77,7 +77,7 @@ class Win32Window { // OS callback called by message pump. Handles the WM_NCCREATE message which // is passed when the non-client area is being created and enables automatic // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by + // responds to changes in DPI. All other messages are handled by // MessageHandler. static LRESULT CALLBACK WndProc(HWND const window, UINT const message, diff --git a/packages/flutter_tools/templates/plugin/linux.tmpl/test/pluginClassSnakeCase_test.cc.tmpl b/packages/flutter_tools/templates/plugin/linux.tmpl/test/pluginClassSnakeCase_test.cc.tmpl index c5bfdde820..cf9160bb8c 100644 --- a/packages/flutter_tools/templates/plugin/linux.tmpl/test/pluginClassSnakeCase_test.cc.tmpl +++ b/packages/flutter_tools/templates/plugin/linux.tmpl/test/pluginClassSnakeCase_test.cc.tmpl @@ -23,7 +23,7 @@ TEST({{pluginClass}}, GetPlatformVersion) { FlValue* result = fl_method_success_response_get_result( FL_METHOD_SUCCESS_RESPONSE(response)); ASSERT_EQ(fl_value_get_type(result), FL_VALUE_TYPE_STRING); - // The full string varies, so just valiate that it has the right format. + // The full string varies, so just validate that it has the right format. EXPECT_THAT(fl_value_get_string(result), testing::StartsWith("Linux ")); } diff --git a/packages/flutter_tools/templates/plugin_ffi/README.md.tmpl b/packages/flutter_tools/templates/plugin_ffi/README.md.tmpl index d02610c68e..43378e7a94 100644 --- a/packages/flutter_tools/templates/plugin_ffi/README.md.tmpl +++ b/packages/flutter_tools/templates/plugin_ffi/README.md.tmpl @@ -8,7 +8,7 @@ This project is a starting point for a Flutter [FFI plugin](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: @@ -21,7 +21,7 @@ This template uses the following structure: * platform folders (`android`, `ios`, `windows`, etc.): Contains the build files for building and bundling the native code library with the platform application. -## Buidling and bundling native code +## Building and bundling native code The `pubspec.yaml` specifies FFI plugins as follows: diff --git a/packages/flutter_tools/test/commands.shard/hermetic/custom_devices_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/custom_devices_test.dart index ec784088f4..d0f3e6ea8f 100644 --- a/packages/flutter_tools/test/commands.shard/hermetic/custom_devices_test.dart +++ b/packages/flutter_tools/test/commands.shard/hermetic/custom_devices_test.dart @@ -1120,7 +1120,7 @@ void main() { expect( logger.statusText, contains( - 'Successfully resetted the custom devices config file and created a ' + 'Successfully reset the custom devices config file and created a ' 'backup at "/.flutter_custom_devices.json.bak".' ) ); @@ -1152,7 +1152,7 @@ void main() { expect( logger.statusText, contains( - 'Successfully resetted the custom devices config file.' + 'Successfully reset the custom devices config file.' ) ); diff --git a/packages/flutter_tools/test/commands.shard/hermetic/drive_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/drive_test.dart index e4d9e63362..5ab23c4362 100644 --- a/packages/flutter_tools/test/commands.shard/hermetic/drive_test.dart +++ b/packages/flutter_tools/test/commands.shard/hermetic/drive_test.dart @@ -605,7 +605,7 @@ class NeverEndingFlutterDriverFactory extends Fake implements FlutterDriverFacto /// A [DriverService] that will return a Future from [startTest] that will never complete. /// -/// This is to similate when the test will take a long time, but a signal is +/// This is to simulate when the test will take a long time, but a signal is /// expected to interrupt the process. class NeverEndingDriverService extends Fake implements DriverService { NeverEndingDriverService(this.callback); diff --git a/packages/flutter_tools/test/commands.shard/permeable/create_test.dart b/packages/flutter_tools/test/commands.shard/permeable/create_test.dart index b1c802a890..0a4a94cfcd 100644 --- a/packages/flutter_tools/test/commands.shard/permeable/create_test.dart +++ b/packages/flutter_tools/test/commands.shard/permeable/create_test.dart @@ -1663,7 +1663,7 @@ void main() { expect(LineSplitter.split(metadata), contains('project_type: app')); }); - testUsingContext('can re-gen default template over existing app project with no metadta and detect the type', () async { + testUsingContext('can re-gen default template over existing app project with no metadata and detect the type', () async { Cache.flutterRoot = '../..'; final CreateCommand command = CreateCommand(); diff --git a/packages/flutter_tools/test/general.shard/android/deferred_components_prebuild_validator_test.dart b/packages/flutter_tools/test/general.shard/android/deferred_components_prebuild_validator_test.dart index 1495f244f6..8a1523556d 100644 --- a/packages/flutter_tools/test/general.shard/android/deferred_components_prebuild_validator_test.dart +++ b/packages/flutter_tools/test/general.shard/android/deferred_components_prebuild_validator_test.dart @@ -65,7 +65,7 @@ void main() { buildGradleTemplate.createSync(recursive: true); androidManifestTemplate.createSync(recursive: true); buildGradleTemplate.writeAsStringSync('fake build.gradle template {{componentName}}', flush: true, mode: FileMode.append); - androidManifestTemplate.writeAsStringSync('fake AndroidManigest.xml template {{componentName}}', flush: true, mode: FileMode.append); + androidManifestTemplate.writeAsStringSync('fake AndroidManifest.xml template {{componentName}}', flush: true, mode: FileMode.append); final DeferredComponentsPrebuildValidator validator = DeferredComponentsPrebuildValidator( projectDir, @@ -107,7 +107,7 @@ void main() { buildGradleTemplate.createSync(recursive: true); androidManifestTemplate.createSync(recursive: true); buildGradleTemplate.writeAsStringSync('fake build.gradle template {{componentName}}', flush: true, mode: FileMode.append); - androidManifestTemplate.writeAsStringSync('fake AndroidManigest.xml template {{componentName}}', flush: true, mode: FileMode.append); + androidManifestTemplate.writeAsStringSync('fake AndroidManifest.xml template {{componentName}}', flush: true, mode: FileMode.append); final DeferredComponentsPrebuildValidator validator = DeferredComponentsPrebuildValidator( projectDir, @@ -149,7 +149,7 @@ void main() { buildGradleTemplate.createSync(recursive: true); androidManifestTemplate.createSync(recursive: true); buildGradleTemplate.writeAsStringSync('fake build.gradle template {{componentName}}', flush: true, mode: FileMode.append); - androidManifestTemplate.writeAsStringSync('fake AndroidManigest.xml template {{componentName}}', flush: true, mode: FileMode.append); + androidManifestTemplate.writeAsStringSync('fake AndroidManifest.xml template {{componentName}}', flush: true, mode: FileMode.append); final DeferredComponentsPrebuildValidator validator = DeferredComponentsPrebuildValidator( projectDir, diff --git a/packages/flutter_tools/test/general.shard/build_system/depfile_test.dart b/packages/flutter_tools/test/general.shard/build_system/depfile_test.dart index 69d3e3d0d6..3a79b1b63f 100644 --- a/packages/flutter_tools/test/general.shard/build_system/depfile_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/depfile_test.dart @@ -105,7 +105,7 @@ C:\\a.txt: C:\\b.txt }); - testWithoutContext('Resillient to weird whitespace', () { + testWithoutContext('Resilient to weird whitespace', () { final File depfileSource = fileSystem.file('example.d')..writeAsStringSync(r''' a.txt : b.txt c.txt @@ -118,7 +118,7 @@ a.txt expect(depfile.outputs.single.path, 'a.txt'); }); - testWithoutContext('Resillient to duplicate files', () { + testWithoutContext('Resilient to duplicate files', () { final File depfileSource = fileSystem.file('example.d')..writeAsStringSync(r''' a.txt: b.txt b.txt '''); @@ -128,7 +128,7 @@ a.txt: b.txt b.txt expect(depfile.outputs.single.path, 'a.txt'); }); - testWithoutContext('Resillient to malformed file, missing :', () { + testWithoutContext('Resilient to malformed file, missing :', () { final File depfileSource = fileSystem.file('example.d')..writeAsStringSync(r''' a.text b.txt '''); diff --git a/packages/flutter_tools/test/general.shard/build_system/targets/shader_compiler_test.dart b/packages/flutter_tools/test/general.shard/build_system/targets/shader_compiler_test.dart index 481a514850..a2f2574969 100644 --- a/packages/flutter_tools/test/general.shard/build_system/targets/shader_compiler_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/targets/shader_compiler_test.dart @@ -327,7 +327,7 @@ void main() { expect(fileSystem.file('/.tmp_rand0/0.8255140718871702.temp'), isNot(exists)); }); - testWithoutContext('DevelopmentShaderCompiler can compile JSON for web targts', () async { + testWithoutContext('DevelopmentShaderCompiler can compile JSON for web targets', () async { final FakeProcessManager processManager = FakeProcessManager.list([ FakeCommand( command: [ diff --git a/packages/flutter_tools/test/general.shard/dap/mocks.dart b/packages/flutter_tools/test/general.shard/dap/mocks.dart index 31022580ae..81052e8712 100644 --- a/packages/flutter_tools/test/general.shard/dap/mocks.dart +++ b/packages/flutter_tools/test/general.shard/dap/mocks.dart @@ -78,7 +78,7 @@ class MockFlutterDebugAdapter extends FlutterDebugAdapter { /// A list of all messages sent from the adapter to the `flutter run` processes `stdin`. final List> dapToFlutterMessages = >[]; - /// The `method`s of all mesages sent to the `flutter run` processes `stdin` + /// The `method`s of all messages sent to the `flutter run` processes `stdin` /// by the debug adapter. List get dapToFlutterRequests => dapToFlutterMessages .map((Map message) => message['method'] as String?) diff --git a/packages/flutter_tools/test/general.shard/flutter_project_metadata_test.dart b/packages/flutter_tools/test/general.shard/flutter_project_metadata_test.dart index 8e53b0ef74..f0033b9e87 100644 --- a/packages/flutter_tools/test/general.shard/flutter_project_metadata_test.dart +++ b/packages/flutter_tools/test/general.shard/flutter_project_metadata_test.dart @@ -144,7 +144,7 @@ migration: expect(projectMetadata.projectType, FlutterProjectType.app); expect(projectMetadata.migrateConfig.platformConfigs[SupportedPlatform.root]?.createRevision, 'abcdefg'); expect(projectMetadata.migrateConfig.platformConfigs[SupportedPlatform.root]?.baseRevision, 'baserevision'); - // Tool uses default unamanged files list when malformed. + // Tool uses default unmanaged files list when malformed. expect(projectMetadata.migrateConfig.unmanagedFiles[0], 'lib/main.dart'); expect(logger.traceText, contains('The value of key `unmanaged_files` in .metadata was expected to be YamlList but was YamlMap')); diff --git a/packages/flutter_tools/test/general.shard/generate_localizations_test.dart b/packages/flutter_tools/test/general.shard/generate_localizations_test.dart index 77656d34de..61357e01c9 100644 --- a/packages/flutter_tools/test/general.shard/generate_localizations_test.dart +++ b/packages/flutter_tools/test/general.shard/generate_localizations_test.dart @@ -2193,7 +2193,7 @@ import 'output-localization-file_en.dart' deferred as output-localization-file_e }); group('select messages', () { - testWithoutContext('should auotmatically infer select placeholders that are not explicitly defined', () { + testWithoutContext('should automatically infer select placeholders that are not explicitly defined', () { const String selectMessageWithoutPlaceholdersAttribute = ''' { "genderSelect": "{gender, select, female {She} male {He} other {they} }", diff --git a/packages/flutter_tools/test/general.shard/proxied_devices/file_transfer_test.dart b/packages/flutter_tools/test/general.shard/proxied_devices/file_transfer_test.dart index d84e08f8d3..ef7149fe24 100644 --- a/packages/flutter_tools/test/general.shard/proxied_devices/file_transfer_test.dart +++ b/packages/flutter_tools/test/general.shard/proxied_devices/file_transfer_test.dart @@ -21,7 +21,7 @@ void main() { // Full chunk. controller.add(Uint8List.fromList([1, 2, 3, 4])); - // Multiple of full chunks, on chunk bounraries. + // Multiple of full chunks, on chunk boundaries. controller.add(Uint8List.fromList([5, 6, 7, 8, 9, 10, 11, 12])); // Larger than one chunk, starts on chunk boundary, ends not on chunk boundary. controller.add(Uint8List.fromList([13, 14, 15, 16, 17, 18])); diff --git a/packages/flutter_tools/test/integration.shard/analyze_suggestions_integration_test.dart b/packages/flutter_tools/test/integration.shard/analyze_suggestions_integration_test.dart index d5ed531956..d584805bcc 100644 --- a/packages/flutter_tools/test/integration.shard/analyze_suggestions_integration_test.dart +++ b/packages/flutter_tools/test/integration.shard/analyze_suggestions_integration_test.dart @@ -107,7 +107,7 @@ void main() { tryToDelete(tempDir); }); - testUsingContext('analyze --suggesions --machine produces expected values', () async { + testUsingContext('analyze --suggestions --machine produces expected values', () async { final ProcessResult result = await globals.processManager.run(['flutter', 'analyze', '--suggestions', '--machine'], workingDirectory: tempDir.childDirectory('test_project').path); expect(result.stdout is String, true); diff --git a/packages/flutter_tools/test/integration.shard/deprecated_gradle_settings_test.dart b/packages/flutter_tools/test/integration.shard/deprecated_gradle_settings_test.dart index d9e9a4c55f..24e7d5be1c 100644 --- a/packages/flutter_tools/test/integration.shard/deprecated_gradle_settings_test.dart +++ b/packages/flutter_tools/test/integration.shard/deprecated_gradle_settings_test.dart @@ -13,7 +13,7 @@ import 'test_utils.dart'; // TODO(egarciad): Migrate existing files, https://github.com/flutter/flutter/issues/54566 void main() { test('android project using deprecated settings.gradle will still build', () async { - final String woringDirectory = fileSystem.path.join(getFlutterRoot(), 'dev', 'integration_tests', 'gradle_deprecated_settings'); + final String workingDirectory = fileSystem.path.join(getFlutterRoot(), 'dev', 'integration_tests', 'gradle_deprecated_settings'); final String flutterBin = fileSystem.path.join(getFlutterRoot(), 'bin', 'flutter'); final ProcessResult result = await processManager.run([ @@ -23,7 +23,7 @@ void main() { '--debug', '--target-platform', 'android-arm', '--verbose', - ], workingDirectory: woringDirectory); + ], workingDirectory: workingDirectory); printOnFailure('Output of flutter build apk:'); printOnFailure(result.stdout.toString()); @@ -32,7 +32,7 @@ void main() { expect(result.exitCode, 0); final String apkPath = fileSystem.path.join( - woringDirectory, 'build', 'app', 'outputs', 'flutter-apk', 'app-debug.apk'); + workingDirectory, 'build', 'app', 'outputs', 'flutter-apk', 'app-debug.apk'); expect(fileSystem.file(apkPath), exists); }); } diff --git a/packages/flutter_web_plugins/lib/src/navigation_non_web/url_strategy.dart b/packages/flutter_web_plugins/lib/src/navigation_non_web/url_strategy.dart index 44a86b5410..d411dec9af 100644 --- a/packages/flutter_web_plugins/lib/src/navigation_non_web/url_strategy.dart +++ b/packages/flutter_web_plugins/lib/src/navigation_non_web/url_strategy.dart @@ -43,7 +43,7 @@ class HashUrlStrategy extends UrlStrategy { /// Creates an instance of [HashUrlStrategy]. /// /// The [PlatformLocation] parameter is useful for testing to mock out browser - /// interations. + /// integrations. const HashUrlStrategy([PlatformLocation? _]); @override @@ -91,7 +91,7 @@ class PathUrlStrategy extends HashUrlStrategy { /// Creates an instance of [PathUrlStrategy]. /// /// The [PlatformLocation] parameter is useful for testing to mock out browser - /// interations. + /// integrations. PathUrlStrategy([super.platformLocation]); @override diff --git a/packages/integration_test/android/src/main/java/dev/flutter/plugins/integration_test/FlutterDeviceScreenshot.java b/packages/integration_test/android/src/main/java/dev/flutter/plugins/integration_test/FlutterDeviceScreenshot.java index 5494eda1e8..ef905c58d7 100644 --- a/packages/integration_test/android/src/main/java/dev/flutter/plugins/integration_test/FlutterDeviceScreenshot.java +++ b/packages/integration_test/android/src/main/java/dev/flutter/plugins/integration_test/FlutterDeviceScreenshot.java @@ -181,7 +181,7 @@ class FlutterDeviceScreenshot { @NonNull FlutterView view, @NonNull Result result) { final boolean acquired = view.acquireLatestImageViewFrame(); - // The next frame may already have already been comitted. + // The next frame may already have already been committed. // The next frame is guaranteed to have the Flutter image. waitForAndroidFrame( () -> { diff --git a/packages/integration_test/lib/common.dart b/packages/integration_test/lib/common.dart index 81558e104c..8e8490a551 100644 --- a/packages/integration_test/lib/common.dart +++ b/packages/integration_test/lib/common.dart @@ -26,7 +26,7 @@ import 'dart:convert'; typedef ScreenshotCallback = Future Function(String name, List image, [Map? args]); /// Classes shared between `integration_test.dart` and `flutter drive` based -/// adoptor (ex: `integration_test_driver.dart`). +/// adaptor (ex: `integration_test_driver.dart`). /// An object sent from integration_test back to the Flutter Driver in response to /// `request_data` command. diff --git a/packages/integration_test/lib/integration_test.dart b/packages/integration_test/lib/integration_test.dart index 33daec1778..254cc89888 100644 --- a/packages/integration_test/lib/integration_test.dart +++ b/packages/integration_test/lib/integration_test.dart @@ -405,7 +405,7 @@ https://flutter.dev/docs/testing/integration-tests#testing-on-firebase-test-lab // The engine could batch FrameTimings and send them only once per second. // Delay for a sufficient time so either old FrameTimings are flushed and not // interfering our measurements here, or new FrameTimings are all reported. - // TODO(CareF): remove this when flush FrameTiming is readly in engine. + // TODO(CareF): remove this when flush FrameTiming is readily in engine. // See https://github.com/flutter/flutter/issues/64808 // and https://github.com/flutter/flutter/issues/67593 final List frameTimings = [];