Unverified Commit c0ef9478 authored by Greg Spencer's avatar Greg Spencer Committed by GitHub

Fix spelling errors (#69451)

My yearly pass to fix spelling errors in the API dartdocs.
parent 72267a6c
......@@ -83,7 +83,7 @@ abstract class DeviceDiscovery {
/// returned. For such behavior see [workingDevice].
Future<void> chooseWorkingDevice();
/// Select the device with ID strati with deviceId, return the device.
/// Selects a device to work with by device ID.
Future<void> chooseWorkingDeviceById(String deviceId);
/// A device to work with.
......
......@@ -270,7 +270,7 @@ typedef RefreshCallback = Future<void> 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
......
......@@ -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
......
......@@ -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:
......
......@@ -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:
......
......@@ -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;
......
......@@ -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.
......
......@@ -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
......
......@@ -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;
......
......@@ -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)
......
......@@ -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.
......
......@@ -2237,7 +2237,7 @@ class ScaffoldState extends State<Scaffold> 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.
......
......@@ -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.
......
......@@ -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;
......
......@@ -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
......
......@@ -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();
......
......@@ -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
......
......@@ -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.
......
......@@ -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(
......
......@@ -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.
......
......@@ -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<EditableText> 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() {
......
......@@ -275,7 +275,7 @@ abstract class Route<T> {
/// 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<Map<String?, List<Object>>?> {
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<T> extends RestorableProperty<String?> {
/// 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.
......
......@@ -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
......
......@@ -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",
......
......@@ -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",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment