diff --git a/dev/devicelab/lib/framework/adb.dart b/dev/devicelab/lib/framework/adb.dart index ba7dd825bf..d9926c8309 100644 --- a/dev/devicelab/lib/framework/adb.dart +++ b/dev/devicelab/lib/framework/adb.dart @@ -83,7 +83,7 @@ abstract class DeviceDiscovery { /// returned. For such behavior see [workingDevice]. Future chooseWorkingDevice(); - /// Select the device with ID strati with deviceId, return the device. + /// Selects a device to work with by device ID. Future chooseWorkingDeviceById(String deviceId); /// A device to work with. diff --git a/packages/flutter/lib/src/cupertino/refresh.dart b/packages/flutter/lib/src/cupertino/refresh.dart index f656801458..347fa1001f 100644 --- a/packages/flutter/lib/src/cupertino/refresh.dart +++ b/packages/flutter/lib/src/cupertino/refresh.dart @@ -270,7 +270,7 @@ typedef RefreshCallback = Future Function(); /// {@tool dartpad --template=stateful_widget_material} /// /// When the user scrolls past [refreshTriggerPullDistance], -/// this sample shows the default ios pull to refresh indicator for 1 second and +/// this sample shows the default iOS pull to refresh indicator for 1 second and /// adds a new item to the top of the list view. /// /// ```dart imports diff --git a/packages/flutter/lib/src/cupertino/search_field.dart b/packages/flutter/lib/src/cupertino/search_field.dart index 00484451d1..4b793aa879 100644 --- a/packages/flutter/lib/src/cupertino/search_field.dart +++ b/packages/flutter/lib/src/cupertino/search_field.dart @@ -76,7 +76,7 @@ import 'text_field.dart'; /// ``` /// {@end-tool} class CupertinoSearchTextField extends StatefulWidget { - /// Creates a [CupertinoTextField] that mimicks the look and behavior of + /// Creates a [CupertinoTextField] that mimics the look and behavior of /// UIKit's `UISearchTextField`. /// /// Similar to [CupertinoTextField], to provide a prefilled text entry, pass diff --git a/packages/flutter/lib/src/gestures/events.dart b/packages/flutter/lib/src/gestures/events.dart index 9170cb173b..0130b343f9 100644 --- a/packages/flutter/lib/src/gestures/events.dart +++ b/packages/flutter/lib/src/gestures/events.dart @@ -2111,7 +2111,7 @@ class PointerCancelEvent extends PointerEvent with _PointerEventDescription, _Co } } -/// Determine the approriate hit slop pixels based on the [kind] of pointer. +/// Determine the appropriate hit slop pixels based on the [kind] of pointer. double computeHitSlop(PointerDeviceKind kind) { switch (kind) { case PointerDeviceKind.mouse: @@ -2124,7 +2124,7 @@ double computeHitSlop(PointerDeviceKind kind) { } } -/// Determine the approriate pan slop pixels based on the [kind] of pointer. +/// Determine the appropriate pan slop pixels based on the [kind] of pointer. double computePanSlop(PointerDeviceKind kind) { switch (kind) { case PointerDeviceKind.mouse: @@ -2137,7 +2137,7 @@ double computePanSlop(PointerDeviceKind kind) { } } -/// Determine the approriate scale slop pixels based on the [kind] of pointer. +/// Determine the appropriate scale slop pixels based on the [kind] of pointer. double computeScaleSlop(PointerDeviceKind kind) { switch (kind) { case PointerDeviceKind.mouse: diff --git a/packages/flutter/lib/src/gestures/velocity_tracker.dart b/packages/flutter/lib/src/gestures/velocity_tracker.dart index 6739fff725..a56efbfa07 100644 --- a/packages/flutter/lib/src/gestures/velocity_tracker.dart +++ b/packages/flutter/lib/src/gestures/velocity_tracker.dart @@ -279,7 +279,7 @@ class VelocityTracker { /// estimating the velocity are both cheap. /// /// To obtain a velocity, call [getVelocity] or [getVelocityEstimate]. The -/// esimated velocity is typically used as the initial flinging velocity of a +/// estimated velocity is typically used as the initial flinging velocity of a /// `Scrollable`, when its drag gesture ends. /// /// See also: diff --git a/packages/flutter/lib/src/material/about.dart b/packages/flutter/lib/src/material/about.dart index 3a705d4c21..e2617bb816 100644 --- a/packages/flutter/lib/src/material/about.dart +++ b/packages/flutter/lib/src/material/about.dart @@ -753,7 +753,7 @@ class _LicenseData { licenses.add(entry); // Completion of the contract above. } - /// Add a package and initialise package license binding. This is a no-op if + /// Add a package and initialize package license binding. This is a no-op if /// the package has been seen before. void _addPackage(String package) { if (!packageLicenseBindings.containsKey(package)) { @@ -1151,7 +1151,7 @@ class _MasterDetailFlow extends StatefulWidget { /// See [AppBar.automaticallyImplyLeading]. final bool automaticallyImplyLeading; - /// Override the framework from determining whether to display the title in the centre of the + /// Override the framework from determining whether to display the title in the center of the /// app bar or not. /// /// See [AppBar.centerTitle]. @@ -1246,7 +1246,7 @@ abstract class _PageOpener { const int _materialWideDisplayThreshold = 840; class _MasterDetailFlowState extends State<_MasterDetailFlow> implements _PageOpener { - /// Tracks whether focus is on the detail or master views. Determines behaviour when switching + /// Tracks whether focus is on the detail or master views. Determines behavior when switching /// from lateral to nested navigation. _Focus focus = _Focus.master; diff --git a/packages/flutter/lib/src/material/button_style.dart b/packages/flutter/lib/src/material/button_style.dart index a97b23f163..1d3de0b6be 100644 --- a/packages/flutter/lib/src/material/button_style.dart +++ b/packages/flutter/lib/src/material/button_style.dart @@ -14,8 +14,8 @@ import 'theme_data.dart'; /// The visual properties that most buttons have in common. /// /// Buttons and their themes have a ButtonStyle property which defines the visual -/// properties whose default values are to be overidden. The default values are -/// defined by the invidual button widgets and are typically based on overall +/// properties whose default values are to be overridden. The default values are +/// defined by the individual button widgets and are typically based on overall /// theme's [ThemeData.colorScheme] and [ThemeData.textTheme]. /// /// All of the ButtonStyle properties are null by default. diff --git a/packages/flutter/lib/src/material/button_style_button.dart b/packages/flutter/lib/src/material/button_style_button.dart index a90a5ee3b8..d2b0c22d48 100644 --- a/packages/flutter/lib/src/material/button_style_button.dart +++ b/packages/flutter/lib/src/material/button_style_button.dart @@ -87,9 +87,9 @@ abstract class ButtonStyleButton extends StatefulWidget { /// Returns a non-null [ButtonStyle] that's based primarily on the [Theme]'s /// [ThemeData.textTheme] and [ThemeData.colorScheme]. /// - /// The returned style can be overriden by the [style] parameter and + /// The returned style can be overridden by the [style] parameter and /// by the style returned by [themeStyleOf]. For example the default - /// style of the [TextButton] subclass can be overidden with its + /// style of the [TextButton] subclass can be overridden with its /// [TextButton.style] constructor parameter, or with a /// [TextButtonTheme]. /// @@ -105,7 +105,7 @@ abstract class ButtonStyleButton extends StatefulWidget { /// Returns the ButtonStyle that belongs to the button's component theme. /// - /// The returned style can be overriden by the [style] parameter. + /// The returned style can be overridden by the [style] parameter. /// /// Concrete button subclasses should return the ButtonStyle for the /// nearest subclass-specific inherited theme, and if no such theme diff --git a/packages/flutter/lib/src/material/floating_action_button.dart b/packages/flutter/lib/src/material/floating_action_button.dart index a0ea567961..b70addb998 100644 --- a/packages/flutter/lib/src/material/floating_action_button.dart +++ b/packages/flutter/lib/src/material/floating_action_button.dart @@ -241,7 +241,7 @@ class FloatingActionButton extends StatelessWidget { /// is used. /// /// Although the color of theme's `accentIconTheme` currently provides a - /// default that supercedes the `onSecondary` color, this dependency + /// default that supersedes the `onSecondary` color, this dependency /// has been deprecated: https://flutter.dev/go/remove-fab-accent-theme-dependency. /// It will be removed in the future. final Color? foregroundColor; diff --git a/packages/flutter/lib/src/material/list_tile.dart b/packages/flutter/lib/src/material/list_tile.dart index 935f7f22fd..23cb92bc95 100644 --- a/packages/flutter/lib/src/material/list_tile.dart +++ b/packages/flutter/lib/src/material/list_tile.dart @@ -378,7 +378,7 @@ enum ListTileControlAffinity { /// /// {@tool dartpad --template=stateless_widget_scaffold} /// -/// Here is an example of a custom list item that resembles a Youtube related +/// Here is an example of a custom list item that resembles a YouTube-related /// video list item created with [Expanded] and [Container] widgets. /// /// ![Custom list item a](https://flutter.github.io/assets-for-api-docs/assets/widgets/custom_list_item_a.png) diff --git a/packages/flutter/lib/src/material/pickers/calendar_date_picker.dart b/packages/flutter/lib/src/material/pickers/calendar_date_picker.dart index 102bc303a1..2db426c3a1 100644 --- a/packages/flutter/lib/src/material/pickers/calendar_date_picker.dart +++ b/packages/flutter/lib/src/material/pickers/calendar_date_picker.dart @@ -57,7 +57,7 @@ const double _monthNavButtonsWidth = 108.0; /// time picker. /// class CalendarDatePicker extends StatefulWidget { - /// Creates a calender date picker. + /// Creates a calendar date picker. /// /// It will display a grid of days for the [initialDate]'s month. The day /// indicated by [initialDate] will be selected. diff --git a/packages/flutter/lib/src/material/scaffold.dart b/packages/flutter/lib/src/material/scaffold.dart index 1c40f5170e..8d6cafad5e 100644 --- a/packages/flutter/lib/src/material/scaffold.dart +++ b/packages/flutter/lib/src/material/scaffold.dart @@ -2237,7 +2237,7 @@ class ScaffoldState extends State with TickerProviderStateMixin { /// [ScaffoldMessengerState.removeCurrentSnackBar] removes the current /// [SnackBar] (if any) immediately. This method should not be used, and will - /// be depracted in the near future. + /// be deprecated in the near future. /// /// The removed snack bar does not run its normal exit animation. If there are /// any queued snack bars, they begin their entrance animation immediately. diff --git a/packages/flutter/lib/src/painting/image_stream.dart b/packages/flutter/lib/src/painting/image_stream.dart index 1b6a8a5e37..46c86c5a5b 100644 --- a/packages/flutter/lib/src/painting/image_stream.dart +++ b/packages/flutter/lib/src/painting/image_stream.dart @@ -58,7 +58,7 @@ class ImageInfo { /// /// This method is a convenience wrapper for [Image.isCloneOf], and is useful /// for clients that are trying to determine whether new layout or painting - /// logic is required when recieving a new image reference. + /// logic is required when receiving a new image reference. /// /// {@tool snippet} /// @@ -109,7 +109,7 @@ class ImageInfo { /// (e.g. in the arguments given to [Canvas.drawImage]). final double scale; - /// A string used for debugging purpopses to identify the source of this image. + /// A string used for debugging purposes to identify the source of this image. final String? debugLabel; /// Disposes of this object. diff --git a/packages/flutter/lib/src/rendering/editable.dart b/packages/flutter/lib/src/rendering/editable.dart index 65fb041fad..aa492e2b3e 100644 --- a/packages/flutter/lib/src/rendering/editable.dart +++ b/packages/flutter/lib/src/rendering/editable.dart @@ -1144,7 +1144,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin { /// This can be null, in which case the getter will actually return [preferredLineHeight]. /// /// Setting this to itself fixes the value to the current [preferredLineHeight]. Setting - /// this to null returns the behaviour of deferring to [preferredLineHeight]. + /// this to null returns the behavior of deferring to [preferredLineHeight]. // TODO(ianh): This is a confusing API. We should have a separate getter for the effective cursor height. double get cursorHeight => _cursorHeight ?? preferredLineHeight; double? _cursorHeight; diff --git a/packages/flutter/lib/src/rendering/sliver_persistent_header.dart b/packages/flutter/lib/src/rendering/sliver_persistent_header.dart index 4913b2ad8d..922b005af6 100644 --- a/packages/flutter/lib/src/rendering/sliver_persistent_header.dart +++ b/packages/flutter/lib/src/rendering/sliver_persistent_header.dart @@ -66,7 +66,7 @@ class PersistentHeaderShowOnScreenConfiguration { /// [RenderSliverPersistentHeader.minExtent]. /// /// When a floating persistent header is told to show a [Rect] on screen, it - /// may expand itself to accomodate the [Rect]. The minimum extent that is + /// may expand itself to accommodate the [Rect]. The minimum extent that is /// allowed for such expansion is either /// [RenderSliverPersistentHeader.minExtent] or [minShowOnScreenExtent], /// whichever is larger. If the persistent header's current extent is already @@ -86,7 +86,7 @@ class PersistentHeaderShowOnScreenConfiguration { /// [RenderSliverPersistentHeader.maxExtent]. /// /// When a floating persistent header is told to show a [Rect] on screen, it - /// may expand itself to accomodate the [Rect]. The maximum extent that is + /// may expand itself to accommodate the [Rect]. The maximum extent that is /// allowed for such expansion is either /// [RenderSliverPersistentHeader.maxExtent] or [maxShowOnScreenExtent], /// whichever is smaller. If the persistent header's current extent is already diff --git a/packages/flutter/lib/src/services/binding.dart b/packages/flutter/lib/src/services/binding.dart index 961a99c168..a4a4aeca6b 100644 --- a/packages/flutter/lib/src/services/binding.dart +++ b/packages/flutter/lib/src/services/binding.dart @@ -222,7 +222,7 @@ mixin ServicesBinding on BindingBase, SchedulerBinding { /// Creates the [RestorationManager] instance available via /// [restorationManager]. /// - /// Can be overriden in subclasses to create a different [RestorationManager]. + /// Can be overridden in subclasses to create a different [RestorationManager]. @protected RestorationManager createRestorationManager() { return RestorationManager(); diff --git a/packages/flutter/lib/src/services/restoration.dart b/packages/flutter/lib/src/services/restoration.dart index 54d9a94531..a8e0bfe370 100644 --- a/packages/flutter/lib/src/services/restoration.dart +++ b/packages/flutter/lib/src/services/restoration.dart @@ -416,7 +416,7 @@ class RestorationManager extends ChangeNotifier { /// its current state changes, the data in the bucket must be updated. At the /// same time, the data in the bucket should be kept to a minimum. For example, /// for data that can be retrieved from other sources (like a database or -/// webservice) only enough information (e.g. an ID or resource locator) to +/// web service) only enough information (e.g. an ID or resource locator) to /// re-obtain that data should be stored in the bucket. In addition to managing /// the data in a bucket, an owner may also make the bucket available to other /// entities so they can claim child buckets from it via [claimChild] for their diff --git a/packages/flutter/lib/src/services/text_formatter.dart b/packages/flutter/lib/src/services/text_formatter.dart index 6eadddbc1f..1c508a0169 100644 --- a/packages/flutter/lib/src/services/text_formatter.dart +++ b/packages/flutter/lib/src/services/text_formatter.dart @@ -135,7 +135,7 @@ class FilteringTextInputFormatter extends TextInputFormatter { /// A [Pattern] to match and replace in incoming [TextEditingValue]s. /// - /// The behaviour of the pattern depends on the [allow] property. If + /// The behavior of the pattern depends on the [allow] property. If /// it is true, then this is an allow list, specifying a pattern that /// characters must match to be accepted. Otherwise, it is a deny list, /// specifying a pattern that characters must not match to be accepted. diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart index 3c770863f1..aeac3e24af 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart @@ -5971,7 +5971,7 @@ class Listener extends SingleChildRenderObjectWidget { /// /// [MouseRegion] is used /// when it is needed to compare the list of objects that a mouse pointer is -/// hovering over betweeen this frame and the last frame. This means entering +/// hovering over between this frame and the last frame. This means entering /// events, exiting events, and mouse cursors. /// /// To listen to general pointer events, use [Listener], or more preferably, @@ -7221,7 +7221,7 @@ class KeyedSubtree extends StatelessWidget { /// ``` /// /// Could equally well be defined and used like this, without -/// definining a new widget class: +/// defining a new widget class: /// /// ```dart /// Center( diff --git a/packages/flutter/lib/src/widgets/debug.dart b/packages/flutter/lib/src/widgets/debug.dart index b27c399511..4487ce9fa7 100644 --- a/packages/flutter/lib/src/widgets/debug.dart +++ b/packages/flutter/lib/src/widgets/debug.dart @@ -252,7 +252,7 @@ bool debugCheckHasMediaQuery(BuildContext context) { /// * why: explain why the direction is needed, for example "to resolve /// the 'alignment' argument". Should be an adverb phrase describing why. /// * hint: explain why this might be happening, for example "The default -/// value of the 'aligment' argument of the $runtimeType widget is an +/// value of the 'alignment' argument of the $runtimeType widget is an /// AlignmentDirectional value.". Should be a fully punctuated sentence. /// * alternative: provide additional advice specific to the situation, /// especially an alternative to providing a Directionality ancestor. diff --git a/packages/flutter/lib/src/widgets/editable_text.dart b/packages/flutter/lib/src/widgets/editable_text.dart index 0d360644b8..fe57755283 100644 --- a/packages/flutter/lib/src/widgets/editable_text.dart +++ b/packages/flutter/lib/src/widgets/editable_text.dart @@ -1300,7 +1300,7 @@ class EditableText extends StatefulWidget { /// the surrounding [RestorationScope] using the provided restoration ID. /// /// Persisting and restoring the content of the [EditableText] is the - /// responsibilility of the owner of the [controller], who may use a + /// responsibility of the owner of the [controller], who may use a /// [RestorableTextEditingController] for that purpose. /// /// See also: @@ -1911,7 +1911,7 @@ class EditableTextState extends State with AutomaticKeepAliveClien /// Begins a new batch edit, within which new updates made to the text editing /// value will not be sent to the platform text input plugin. /// - /// Batch edits nest. When the outmost batch edit finishes, [endBatchEdit] + /// Batch edits nest. When the outermost batch edit finishes, [endBatchEdit] /// will attempt to send [currentTextEditingValue] to the text input plugin if /// it detected a change. void beginBatchEdit() { diff --git a/packages/flutter/lib/src/widgets/navigator.dart b/packages/flutter/lib/src/widgets/navigator.dart index cf5e694de4..cc533fbea3 100644 --- a/packages/flutter/lib/src/widgets/navigator.dart +++ b/packages/flutter/lib/src/widgets/navigator.dart @@ -275,7 +275,7 @@ abstract class Route { /// screen; instead, the larger scope is popped (e.g. the application quits, /// so that the user returns to the previous application). /// - /// In other cases, the default behaviour is to accept the pop + /// In other cases, the default behavior is to accept the pop /// ([RoutePopDisposition.pop]). /// /// The third possible value is [RoutePopDisposition.doNotPop], which causes @@ -5444,7 +5444,7 @@ class _HistoryProperty extends RestorableProperty>?> { typedef NavigatorFinderCallback = NavigatorState Function(BuildContext context); /// A callback that given some `arguments` and a `navigator` adds a new -/// restorable route to that `navigator` and resturns the opaque ID of that +/// restorable route to that `navigator` and returns the opaque ID of that /// new route. /// /// Usually, this callback calls one of the imperative methods on the Navigator @@ -5699,7 +5699,7 @@ class RestorableRouteFuture extends RestorableProperty { /// Whether the [Route] created by [present] is currently shown. /// - /// Returns true after [present] has been called until the [Route] compeltes. + /// Returns true after [present] has been called until the [Route] completes. bool get isPresent => route != null; /// The route that [present] added to the Navigator. diff --git a/packages/flutter/lib/src/widgets/router.dart b/packages/flutter/lib/src/widgets/router.dart index 4b34a1f9f5..aafe075a85 100644 --- a/packages/flutter/lib/src/widgets/router.dart +++ b/packages/flutter/lib/src/widgets/router.dart @@ -219,7 +219,7 @@ class RouteInformation { /// widget should update the URL (typically the top-most one created by the /// [WidgetsApp.router], [MaterialApp.router], or [CupertinoApp.router]). /// -/// * The application does not need to implemenent in-app navigation using the +/// * The application does not need to implement in-app navigation using the /// browser's back and forward buttons. /// /// In other cases, it is strongly recommended to implement the diff --git a/packages/flutter_driver/lib/src/driver/profiling_summarizer.dart b/packages/flutter_driver/lib/src/driver/profiling_summarizer.dart index 32254ab398..a2fc53e427 100644 --- a/packages/flutter_driver/lib/src/driver/profiling_summarizer.dart +++ b/packages/flutter_driver/lib/src/driver/profiling_summarizer.dart @@ -37,7 +37,7 @@ enum ProfileType { /// Summarizes [TimelineEvents]s corresponding to [kProfilingEvents] category. /// -/// A sample event (some fields have been omitted for brewity): +/// A sample event (some fields have been omitted for brevity): /// ``` /// { /// "category": "embedder", diff --git a/packages/flutter_driver/lib/src/driver/scene_display_lag_summarizer.dart b/packages/flutter_driver/lib/src/driver/scene_display_lag_summarizer.dart index 200ce05baa..50e72a5fc5 100644 --- a/packages/flutter_driver/lib/src/driver/scene_display_lag_summarizer.dart +++ b/packages/flutter_driver/lib/src/driver/scene_display_lag_summarizer.dart @@ -14,7 +14,7 @@ const String _kVsyncTransitionsMissed = 'vsync_transitions_missed'; /// Summarizes [TimelineEvents]s corresponding to [kSceneDisplayLagEvent] events. /// -/// A sample event (some fields have been omitted for brewity): +/// A sample event (some fields have been omitted for brevity): /// ``` /// { /// "name": "SceneDisplayLag",