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

Fix spelling errors. (#28657)

Fix the spelling errors in the dartdocs for the framework.

There are no functionality changes here, just documentation fixes.
parent f776cc19
......@@ -191,14 +191,14 @@ class LogicalKeyboardKey extends Diagnosticable {
return (codeUnit <= 0x1f && codeUnit >= 0x00) || (codeUnit >= 0x7f && codeUnit <= 0x9f);
}
/// Returns true if the [keyId] of this object is one that is autogenerated by
/// Returns true if the [keyId] of this object is one that is auto-generated by
/// Flutter.
///
/// Autogenerated key IDs are generated in response to platform key codes
/// Auto-generated key IDs are generated in response to platform key codes
/// which Flutter doesn't recognize, and their IDs shouldn't be used in a
/// persistent way.
///
/// Autogenerated IDs should be a rare occurrence: Flutter supports most keys.
/// Auto-generated IDs should be a rare occurrence: Flutter supports most keys.
///
/// Keys that generate Unicode characters (even if unknown to Flutter) will
/// not return true for `isAutogenerated`, since they will be assigned a
......@@ -209,10 +209,10 @@ class LogicalKeyboardKey extends Diagnosticable {
/// produced on until Flutter adds support for recognizing it.
///
/// So, hypothetically, if Android added a new key code of 0xffff,
/// representing a new "do what I mean" key, then the autogenerated code would
/// be 0x1020000ffff, but once Flutter added the "doWhatIMean" key to the
/// definitions below, the new code would be 0x0020000ffff for all platforms
/// that had a "do what I mean" key from then on.
/// representing a new "do what I mean" key, then the auto-generated code
/// would be 0x1020000ffff, but once Flutter added the "doWhatIMean" key to
/// the definitions below, the new code would be 0x0020000ffff for all
/// platforms that had a "do what I mean" key from then on.
bool get isAutogenerated => (keyId & autogeneratedMask) != 0;
/// Mask for the 32-bit value portion of the key code.
......@@ -226,7 +226,7 @@ class LogicalKeyboardKey extends Diagnosticable {
/// This is used by platform-specific code to generate Flutter key codes.
static const int platformMask = 0x0FF00000000;
/// Mask for the autogenerated bit portion of the key code.
/// Mask for the auto-generated bit portion of the key code.
///
/// This is used by platform-specific code to generate new Flutter key codes
/// for keys which are not recognized.
......
......@@ -170,7 +170,7 @@ class _ChainedEvaluation<T> extends Animatable<T> {
/// recreate all the objects in the chain from the [AnimationController] to the
/// final [Tween].
///
/// If a [Tween]'s values are never changed, however, a further optimisation can
/// If a [Tween]'s values are never changed, however, a further optimization can
/// be applied: the object can be stored in a `static final` variable, so that
/// the exact same instance is used whenever the [Tween] is needed. This is
/// preferable to creating an identical [Tween] afresh each time a [State.build]
......
......@@ -121,7 +121,7 @@ class TweenSequenceItem<T> {
/// {@end-tool}
final Animatable<T> tween;
/// An abitrary value that indicates the relative percentage of a
/// An arbitrary value that indicates the relative percentage of a
/// [TweenSequence] animation's duration when [tween] will be used.
///
/// The percentage for an individual item is the item's weight divided
......
......@@ -446,7 +446,7 @@ class CupertinoIcons {
/// * [add_circled], which is similar, but not filled in.
static const IconData add_circled_solid = IconData(0xf48b, fontFamily: iconFont, fontPackage: iconFontPackage);
/// A gear with eigth cogs. This icon is not filled in.
/// A gear with eight cogs. This icon is not filled in.
///
/// See also:
///
......@@ -455,7 +455,7 @@ class CupertinoIcons {
/// * [settings], which is another cogwheel with a different design.
static const IconData gear = IconData(0xf43c, fontFamily: iconFont, fontPackage: iconFontPackage);
/// A gear with eigth cogs. This icon is filled in.
/// A gear with eight cogs. This icon is filled in.
///
/// See also:
///
......@@ -504,14 +504,14 @@ class CupertinoIcons {
/// * [play_arrow], which is similar, but not filled in.
static const IconData play_arrow_solid = IconData(0xf488, fontFamily: iconFont, fontPackage: iconFontPackage);
/// Two verticale rectangles. This icon is not filled in.
/// Two vertical rectangles. This icon is not filled in.
///
/// See also:
///
/// * [pause_solid], which is similar, but filled in.
static const IconData pause = IconData(0xf477, fontFamily: iconFont, fontPackage: iconFontPackage);
/// Two verticale rectangles. This icon is filled in.
/// Two vertical rectangles. This icon is filled in.
///
/// See also:
///
......@@ -624,22 +624,22 @@ class CupertinoIcons {
/// * [time_solid], which is similar, but without dots on the clock face.
static const IconData clock_solid = IconData(0xf4bf, fontFamily: iconFont, fontPackage: iconFontPackage);
/// A circle with with a 90 degree angle shape in the center, resembeling a clock with hands showing 09:00.
/// A circle with with a 90 degree angle shape in the center, resembling a clock with hands showing 09:00.
///
/// See also:
///
/// * [time_solid], which is similar, but filled in.
/// * [clock], which is similar, but with dots on the clockface.
/// * [clock_solid], which is similar, but filled in and with dots on the clockface.
/// * [clock], which is similar, but with dots on the clock face.
/// * [clock_solid], which is similar, but filled in and with dots on the clock face.
static const IconData time = IconData(0xf402, fontFamily: iconFont, fontPackage: iconFontPackage);
/// A filled in circle with with a 90 degree angle shape in the center, resembeling a clock with hands showing 09:00.
/// A filled in circle with with a 90 degree angle shape in the center, resembling a clock with hands showing 09:00.
///
/// See also:
///
/// * [time], which is similar, but not filled in.
/// * [clock], which is similar, but not filled in and with dots on the clockface.
/// * [clock_solid], which is similar, but with dots on the clockface.
/// * [clock], which is similar, but not filled in and with dots on the clock face.
/// * [clock_solid], which is similar, but with dots on the clock face.
static const IconData time_solid = IconData(0xf403, fontFamily: iconFont, fontPackage: iconFontPackage);
/// An unlocked padlock.
......
......@@ -114,7 +114,7 @@ class CupertinoPageRoute<T> extends PageRoute<T> {
/// A title string for this route.
///
/// Used to autopopulate [CupertinoNavigationBar] and
/// Used to auto-populate [CupertinoNavigationBar] and
/// [CupertinoSliverNavigationBar]'s `middle`/`largeTitle` widgets when
/// one is not manually supplied.
final String title;
......
......@@ -126,7 +126,7 @@ enum OverlayVisibilityMode {
class CupertinoTextField extends StatefulWidget {
/// Creates an iOS-style text field.
///
/// To provide a prefilled text entry, pass in a [TextEditingController] with
/// To provide a pre-filled text entry, pass in a [TextEditingController] with
/// an initial value to the [controller] parameter.
///
/// To provide a hint placeholder text that appears when the text entry is
......
......@@ -148,7 +148,7 @@ class CupertinoTextThemeData extends Diagnosticable {
}
final TextStyle _navActionTextStyle;
/// Typography of interative text content in navigation bars.
/// Typography of interactive text content in navigation bars.
TextStyle get navActionTextStyle {
return _navActionTextStyle ?? _kDefaultActionTextStyle.copyWith(
color: _primaryColor,
......
......@@ -89,7 +89,7 @@ typedef AsyncValueGetter<T> = Future<T> Function();
///
/// * It requires more memory than a non-caching iterator.
///
/// * the [length] and [toList] properties immediately precache the
/// * The [length] and [toList] properties immediately pre-cache the
/// entire list. Using these fields therefore loses the laziness of
/// the iterable. However, it still gets cached.
///
......
......@@ -256,7 +256,7 @@ abstract class BindingBase {
/// This method is called by [reassembleApplication] to actually cause the
/// application to reassemble, e.g. after a hot reload.
///
/// Bindings are expected to use this method to reregister anything that uses
/// Bindings are expected to use this method to re-register anything that uses
/// closures, so that they do not keep pointing to old code, and to flush any
/// caches of previously computed values, in case the new code would compute
/// them differently. For example, the rendering layer triggers the entire
......
......@@ -2380,7 +2380,7 @@ abstract class DiagnosticableTree extends Diagnosticable {
///
/// `joiner` specifies the string which is place between each part obtained
/// from [debugFillProperties]. Passing a string such as `'\n '` will result
/// in a multiline string that indents the properties of the object below its
/// in a multi-line string that indents the properties of the object below its
/// name (as per [toString]).
///
/// `minLevel` specifies the minimum [DiagnosticLevel] for properties included
......
......@@ -84,7 +84,7 @@ TargetPlatform get defaultTargetPlatform {
/// (such as [ThemeData.platform] in the material library) instead.
///
/// Setting [debugDefaultTargetPlatformOverride] (as opposed to, say,
/// [ThemeData.platform]) will cause unexpected and undesireable effects. For
/// [ThemeData.platform]) will cause unexpected and undesirable effects. For
/// example, setting this to [TargetPlatform.iOS] when the application is
/// running on Android will cause the TalkBack accessibility tool on Android to
/// be confused because it would be receiving data intended for iOS VoiceOver.
......
......@@ -68,7 +68,7 @@ class Unicode {
/// Treat the following text as isolated and in the direction of its first
/// strong directional character that is not inside a nested isolate.
///
/// This essentially "autodetects" the directionality of the text. It is not
/// This essentially "auto-detects" the directionality of the text. It is not
/// 100% reliable. For example, Arabic text that starts with an English quote
/// will be detected as LTR, not RTL, which will lead to the text being in a
/// weird order.
......
......@@ -213,7 +213,7 @@ class MaterialApp extends StatefulWidget {
/// {@macro flutter.widgets.widgetsApp.localizationsDelegates}
///
/// Internationalized apps that require translations for one of the locales
/// listed in [GlobalMaterialLocalizations] should specify this paramter
/// listed in [GlobalMaterialLocalizations] should specify this parameter
/// and list the [supportedLocales] that the application can handle.
///
/// ```dart
......
......@@ -256,7 +256,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
/// {@end-tool}
final List<Widget> actions;
/// This widget is stacked behind the toolbar and the tabbar. It's height will
/// This widget is stacked behind the toolbar and the tab bar. It's height will
/// be the same as the app bar's overall height.
///
/// A flexible space isn't actually flexible unless the [AppBar]'s container
......@@ -332,7 +332,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
/// Whether this app bar is being displayed at the top of the screen.
///
/// If true, the appbar's toolbar elements and [bottom] widget will be
/// If true, the app bar's toolbar elements and [bottom] widget will be
/// padded on top by the height of the system status bar. The layout
/// of the [flexibleSpace] is not affected by the [primary] property.
final bool primary;
......@@ -611,7 +611,7 @@ class _FloatingAppBar extends StatefulWidget {
}
// A wrapper for the widget created by _SliverAppBarDelegate that starts and
/// stops the floating appbar's snap-into-view or snap-out-of-view animation.
// stops the floating app bar's snap-into-view or snap-out-of-view animation.
class _FloatingAppBarState extends State<_FloatingAppBar> {
ScrollPosition _position;
......@@ -962,7 +962,7 @@ class SliverAppBar extends StatefulWidget {
/// {@end-tool}
final List<Widget> actions;
/// This widget is stacked behind the toolbar and the tabbar. It's height will
/// This widget is stacked behind the toolbar and the tab bar. It's height will
/// be the same as the app bar's overall height.
///
/// Typically a [FlexibleSpaceBar]. See [FlexibleSpaceBar] for details.
......
......@@ -84,7 +84,7 @@ class BottomSheet extends StatefulWidget {
final WidgetBuilder builder;
/// If true, the bottom sheet can dragged up and down and dismissed by swiping
/// downards.
/// downwards.
///
/// Default is true.
final bool enableDrag;
......
......@@ -633,7 +633,7 @@ class ButtonThemeData extends Diagnosticable {
/// Returns the button's [MaterialButton.highlightElevation] if it is non-null.
///
/// If button is a [FlatButton] or an [OutlineButton] then the highlight
/// elevation is 0.0, otherise the highlight elevation is 8.0.
/// elevation is 0.0, otherwise the highlight elevation is 8.0.
double getHighlightElevation(MaterialButton button) {
if (button.highlightElevation != null)
return button.highlightElevation;
......@@ -649,7 +649,7 @@ class ButtonThemeData extends Diagnosticable {
///
/// Returns the button's [MaterialButton.elevation] if it is non-null.
///
/// Otheriwse the disabled elevation is 0.0.
/// Otherwise the disabled elevation is 0.0.
double getDisabledElevation(MaterialButton button) {
if (button.disabledElevation != null)
return button.disabledElevation;
......
......@@ -254,7 +254,8 @@ abstract class SelectableChipAttributes {
/// Must not be null. Defaults to false.
bool get selected;
/// Called when the chip should change between selected and deselected states.
/// Called when the chip should change between selected and de-selected
/// states.
///
/// When the chip is tapped, then the [onSelected] callback, if set, will be
/// applied to `!selected` (see [selected]).
......
......@@ -171,35 +171,35 @@ class ColorScheme extends Diagnosticable {
/// A color that's clearly legible when drawn on [primary].
///
/// To ensure that an app is accessibile, a contrast ratio of 4.5:1 for [primary]
/// To ensure that an app is accessible, a contrast ratio of 4.5:1 for [primary]
/// and [onPrimary] is recommended. See
/// <https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html>.
final Color onPrimary;
/// A color that's clearly legible when drawn on [secondary].
///
/// To ensure that an app is accessibile, a contrast ratio of 4.5:1 for [secondary]
/// To ensure that an app is accessible, a contrast ratio of 4.5:1 for [secondary]
/// and [onSecondary] is recommended. See
/// <https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html>.
final Color onSecondary;
/// A color that's clearly legible when drawn on [surface].
///
/// To ensure that an app is accessibile, a contrast ratio of 4.5:1 for [surface]
/// To ensure that an app is accessible, a contrast ratio of 4.5:1 for [surface]
/// and [onSurface] is recommended. See
/// <https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html>.
final Color onSurface;
/// A color that's clearly legible when drawn on [background].
///
/// To ensure that an app is accessibile, a contrast ratio of 4.5:1 for [background]
/// To ensure that an app is accessible, a contrast ratio of 4.5:1 for [background]
/// and [onBackground] is recommended. See
/// <https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html>.
final Color onBackground;
/// A color that's clearly legible when drawn on [error].
///
/// To ensure that an app is accessibile, a contrast ratio of 4.5:1 for [error]
/// To ensure that an app is accessible, a contrast ratio of 4.5:1 for [error]
/// and [onError] is recommended. See
/// <https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html>.
final Color onError;
......
......@@ -285,7 +285,7 @@ class AlertDialog extends StatelessWidget {
/// The semantic label of the dialog used by accessibility frameworks to
/// announce screen transitions when the dialog is opened and closed.
///
/// If this label is not provided, a semantic label will be infered from the
/// If this label is not provided, a semantic label will be inferred from the
/// [title] if it is not null. If there is no title, the label will be taken
/// from [MaterialLocalizations.alertDialogLabel].
///
......@@ -570,7 +570,7 @@ class SimpleDialog extends StatelessWidget {
/// The semantic label of the dialog used by accessibility frameworks to
/// announce screen transitions when the dialog is opened and closed.
///
/// If this label is not provided, a semantic label will be infered from the
/// If this label is not provided, a semantic label will be inferred from the
/// [title] if it is not null. If there is no title, the label will be taken
/// from [MaterialLocalizations.dialogLabel].
///
......
......@@ -13,7 +13,7 @@ import 'material_localizations.dart';
import 'theme.dart';
/// A widget representing a rotating expand/collapse button. The icon rotates
/// 180 deg when pressed, then reverts the animation on a second press.
/// 180 degrees when pressed, then reverts the animation on a second press.
/// The underlying icon is [Icons.expand_more].
///
/// The expand icon does not include a semantic label for accessibility. In
......
......@@ -35,7 +35,7 @@ import 'theme_data.dart';
/// trying to change the button's [color] and it is not having any effect, check
/// that you are passing a non-null [onPressed] handler.
///
/// Flat buttons have a minimum size of 88.0 by 36.0 which can be overidden
/// Flat buttons have a minimum size of 88.0 by 36.0 which can be overridden
/// with [ButtonTheme].
///
/// The [clipBehavior] argument must not be null.
......
......@@ -184,7 +184,7 @@ class FloatingActionButton extends StatelessWidget {
/// If this is set to null, the button will be disabled.
final VoidCallback onPressed;
/// The z-coordinate at which to place this button releative to its parent.
/// The z-coordinate at which to place this button relative to its parent.
///
/// This controls the size of the shadow below the floating action button.
///
......
......@@ -2541,7 +2541,7 @@ class InputDecoration {
/// If provided, this replaces the semantic label of the [counterText].
final String semanticCounterText;
/// Typically set to true when the [InputDecorator] contains a multiline
/// Typically set to true when the [InputDecorator] contains a multi-line
/// [TextField] ([TextField.maxLines] is null or > 1) to override the default
/// behavior of aligning the label with the center of the [TextField].
///
......@@ -3135,7 +3135,7 @@ class InputDecorationTheme extends Diagnosticable {
/// rounded rectangle around the input decorator's container.
final InputBorder border;
/// Typically set to true when the [InputDecorator] contains a multiline
/// Typically set to true when the [InputDecorator] contains a multi-line
/// [TextField] ([TextField.maxLines] is null or > 1) to override the default
/// behavior of aligning the label with the center of the [TextField].
final bool alignLabelWithHint;
......
......@@ -149,7 +149,7 @@ abstract class MaterialInkController {
///
/// See also:
///
/// * [MergeableMaterial], a piece of material that can split and remerge.
/// * [MergeableMaterial], a piece of material that can split and re-merge.
/// * [Card], a wrapper for a [Material] of [type] [MaterialType.card].
/// * <https://material.io/design/>
class Material extends StatefulWidget {
......
......@@ -40,7 +40,7 @@ const Duration _kElevationDuration = Duration(milliseconds: 75);
/// If you want an ink-splash effect for taps, but don't want to use a button,
/// consider using [InkWell] directly.
///
/// Outline buttons have a minimum size of 88.0 by 36.0 which can be overidden
/// Outline buttons have a minimum size of 88.0 by 36.0 which can be overridden
/// with [ButtonTheme].
///
/// See also:
......
......@@ -28,7 +28,7 @@ import 'theme_data.dart';
/// If you want an ink-splash effect for taps, but don't want to use a button,
/// consider using [InkWell] directly.
///
/// Raised buttons have a minimum size of 88.0 by 36.0 which can be overidden
/// Raised buttons have a minimum size of 88.0 by 36.0 which can be overridden
/// with [ButtonTheme].
///
/// {@tool snippet --template=stateless_widget_scaffold}
......
......@@ -51,7 +51,7 @@ enum _ScaffoldSlot {
/// The geometry of the [Scaffold] after all its contents have been laid out
/// except the [FloatingActionButton].
///
/// The [Scaffold] passes this prelayout geometry to its
/// The [Scaffold] passes this pre-layout geometry to its
/// [FloatingActionButtonLocation], which produces an [Offset] that the
/// [Scaffold] uses to position the [FloatingActionButton].
///
......
......@@ -278,7 +278,7 @@ class TextField extends StatefulWidget {
///
/// If set, a character counter will be displayed below the
/// field showing how many characters have been entered. If set to a number
/// greather than 0, it will also display the maximum number allowed. If set
/// greater than 0, it will also display the maximum number allowed. If set
/// to [TextField.noMaxLength] then only the current character count is displayed.
///
/// After [maxLength] characters have been input, additional input
......
......@@ -16,7 +16,7 @@ import 'typography.dart';
/// To obtain the current text theme, call [Theme.of] with the current
/// [BuildContext] and read the [ThemeData.textTheme] property.
///
/// The Material Design typography scheme was signficantly changed in the
/// The Material Design typography scheme was significantly changed in the
/// current (2018) version of the specification
/// (https://material.io/design/typography).
///
......@@ -43,7 +43,7 @@ import 'typography.dart';
///
/// The [TextTheme] API is based on the original material (2014)
/// design spec, which used different text style names. For backwards
/// compatability's sake, this API continues to use the original
/// compatibility's sake, this API continues to use the original
/// names. The table below should help with understanding the API in
/// terms of the 2018 material spec.
///
......
......@@ -322,7 +322,7 @@ abstract class ImageProvider<T> {
/// {@tool sample}
///
/// The following sample code shows how an image loaded using the [Image]
/// widget can be evicted using a [NetworkImage] with a matching url.
/// widget can be evicted using a [NetworkImage] with a matching URL.
///
/// ```dart
/// class MyWidget extends StatelessWidget {
......
......@@ -194,8 +194,8 @@ class ImageStream extends Diagnosticable {
/// Returns an object which can be used with `==` to determine if this
/// [ImageStream] shares the same listeners list as another [ImageStream].
///
/// This can be used to avoid unregistering and reregistering listeners after
/// calling [ImageProvider.resolve] on a new, but possibly equivalent,
/// This can be used to avoid un-registering and re-registering listeners
/// after calling [ImageProvider.resolve] on a new, but possibly equivalent,
/// [ImageProvider].
///
/// The key may change once in the lifetime of the object. When it changes, it
......
......@@ -8,7 +8,7 @@ import 'basic_types.dart';
import 'text_style.dart';
/// Defines the strut, which sets the minimum height a line can be
/// relative to the baseline. Strut applies to all lines in the pararaph.
/// relative to the baseline. Strut applies to all lines in the paragraph.
///
/// Strut is a feature that allows minimum line heights to be set. The effect is as
/// if a zero width space was included at the beginning of each line in the
......@@ -57,16 +57,17 @@ import 'text_style.dart';
///
/// Omitted or null properties will take the default values specified below:
///
/// * [fontFamily]: the name of the font to use when calcualting the strut (e.g., Roboto).
/// No glyphs from the font will be drawn and the font will be used purely for metrics.
/// * [fontFamily]: the name of the font to use when calculating the strut
/// (e.g., Roboto). No glyphs from the font will be drawn and the font will
/// be used purely for metrics.
///
/// * [fontFamilyFallback]: an ordered list of font family names that will be searched for when
/// the font in [fontFamily] cannot be found. When all specified font families have been
/// exhausted an no match was found, the default platform font will be used.
///
/// * [fontSize]: the size of the ascent plus descent in logical pixels. This is also
/// used as the basis of the custom leading caluclation. This value cannot
/// be negative.
/// * [fontSize]: the size of the ascent plus descent in logical pixels. This
/// is also used as the basis of the custom leading calculation. This value
/// cannot be negative.
/// Default is 14 logical pixels.
///
/// * [height]: the multiple of [fontSize] to multiply the ascent and descent by.
......@@ -121,10 +122,10 @@ import 'text_style.dart';
/// {@tool sample}
/// Here, strut is used to absorb the additional line height in the second line.
/// The strut [height] was defined as 1.5 (the default font size is 14), which
/// caused all lines to be laid out taller than without strut. This extra space was
/// able to accomodate the larger font size of `Second line!` without causing the line
/// height to change for the second line only. All lines in this example are thus the
/// same height (`14 * 1.5`).
/// caused all lines to be laid out taller than without strut. This extra space
/// was able to accommodate the larger font size of `Second line!` without
/// causing the line height to change for the second line only. All lines in
/// this example are thus the same height (`14 * 1.5`).
///
/// ```dart
/// const Text.rich(
......@@ -335,8 +336,8 @@ class StrutStyle extends Diagnosticable {
leading: 0.0,
);
/// The name of the font to use when calcualting the strut (e.g., Roboto). If the
/// font is defined in a package, this will be prefixed with
/// The name of the font to use when calculating the strut (e.g., Roboto). If
/// the font is defined in a package, this will be prefixed with
/// 'packages/package_name/' (e.g. 'packages/cool_fonts/Roboto'). The
/// prefixing is done by the constructor when the `package` argument is
/// provided.
......
......@@ -431,7 +431,7 @@ class TextPainter {
return _isUtf16Surrogate(nextCodeUnit) ? offset + 2 : offset + 1;
}
/// Returns the closest offset before `offset` at which the inout cursor can
/// Returns the closest offset before `offset` at which the input cursor can
/// be positioned.
int getOffsetBefore(int offset) {
final int prevCodeUnit = _text.codeUnitAt(offset - 1);
......
......@@ -444,9 +444,9 @@ class TextStyle extends Diagnosticable {
/// This property is rarely set. Typically the locale used to select
/// region-specific glyphs is defined by the text widget's [BuildContext]
/// using `Localizations.localeOf(context)`. For example [RichText] defines
/// its locale this way. However, a rich text widget's [TextSpan]s could specify
/// text styles with different explicit locales in order to select different
/// region-specifc glyphs for each text span.
/// its locale this way. However, a rich text widget's [TextSpan]s could
/// specify text styles with different explicit locales in order to select
/// different region-specific glyphs for each text span.
final Locale locale;
/// The paint drawn as a foreground for the text.
......
......@@ -102,7 +102,7 @@ class ListWheelParentData extends ContainerBoxParentData<RenderBox> {
///
/// 3. The **transformed cylindrical space viewport painting coordinates**.
/// Children from system 2 get their positions transformed into a cylindrical
/// projection matrix instead of its cartesian offset with respect to the
/// projection matrix instead of its Cartesian offset with respect to the
/// scroll offset.
///
/// Children in this coordinate system are painted.
......
......@@ -3506,7 +3506,7 @@ class RenderSemanticsAnnotations extends RenderProxyBox {
markNeedsSemanticsUpdate();
}
/// Whether decendants of this [RenderObject] should have their semantic
/// Whether descendants of this [RenderObject] should have their semantic
/// information ignored.
///
/// When this flag is set to true, all child semantics nodes are ignored.
......@@ -4167,7 +4167,7 @@ class RenderSemanticsAnnotations extends RenderProxyBox {
///
/// See also:
///
/// * [CustomSemanticsAction], for an explaination of custom actions.
/// * [CustomSemanticsAction], for an explanation of custom actions.
Map<CustomSemanticsAction, VoidCallback> get customSemanticsActions => _customSemanticsActions;
Map<CustomSemanticsAction, VoidCallback> _customSemanticsActions;
set customSemanticsActions(Map<CustomSemanticsAction, VoidCallback> value) {
......@@ -4580,7 +4580,7 @@ class RenderLeaderLayer extends RenderProxyBox {
///
/// Hit testing on descendants of this render object will only work if the
/// target position is within the box that this render object's parent considers
/// to be hitable.
/// to be hittable.
///
/// See also:
///
......
......@@ -665,7 +665,7 @@ class SliverGeometry extends Diagnosticable {
/// the rest of the values when constructing the [SliverGeometry] or call
/// [RenderObject.layout] on its children since [RenderSliver.performLayout]
/// will be called again on this sliver in the same frame after the
/// [SliverConstraints.scrollOffset] correction has ben applied, when the
/// [SliverConstraints.scrollOffset] correction has been applied, when the
/// proper [SliverGeometry] and layout of its children can be computed.
///
/// If the parent is also a [RenderSliver], it must propagate this value
......@@ -677,7 +677,7 @@ class SliverGeometry extends Diagnosticable {
/// [SliverConstraints.remainingCacheExtent].
///
/// This value should be equal to or larger than the [layoutExtent] because
/// the sliver allways consumes at least the [layoutExtent] from the
/// the sliver always consumes at least the [layoutExtent] from the
/// [SliverConstraints.remainingCacheExtent] and possibly more if it falls
/// into the cache area of the viewport.
///
......
......@@ -408,15 +408,15 @@ mixin SchedulerBinding on BindingBase, ServicesBinding {
///
/// If this is a one-off registration, ignore the `rescheduling` argument.
///
/// If this is a callback that will be reregistered each time it fires, then
/// when you reregister the callback, set the `rescheduling` argument to true.
/// This has no effect in release builds, but in debug builds, it ensures that
/// the stack trace that is stored for this callback is the original stack
/// trace for when the callback was _first_ registered, rather than the stack
/// trace for when the callback is reregistered. This makes it easier to track
/// down the original reason that a particular callback was called. If
/// `rescheduling` is true, the call must be in the context of a frame
/// callback.
/// If this is a callback that will be re-registered each time it fires, then
/// when you re-register the callback, set the `rescheduling` argument to
/// true. This has no effect in release builds, but in debug builds, it
/// ensures that the stack trace that is stored for this callback is the
/// original stack trace for when the callback was _first_ registered, rather
/// than the stack trace for when the callback is re-registered. This makes it
/// easier to track down the original reason that a particular callback was
/// called. If `rescheduling` is true, the call must be in the context of a
/// frame callback.
///
/// Callbacks registered with this method can be canceled using
/// [cancelFrameCallbackWithId].
......
......@@ -44,7 +44,7 @@ mixin SemanticsBinding on BindingBase {
/// The platform is requesting that animations be disabled or simplified.
///
/// This setting can be overriden for testing or debugging by setting
/// This setting can be overridden for testing or debugging by setting
/// [debugSemanticsDisableAnimations].
bool get disableAnimations {
bool value = _accessibilityFeatures.disableAnimations;
......
......@@ -191,14 +191,14 @@ class LogicalKeyboardKey extends Diagnosticable {
return (codeUnit <= 0x1f && codeUnit >= 0x00) || (codeUnit >= 0x7f && codeUnit <= 0x9f);
}
/// Returns true if the [keyId] of this object is one that is autogenerated by
/// Returns true if the [keyId] of this object is one that is auto-generated by
/// Flutter.
///
/// Autogenerated key IDs are generated in response to platform key codes
/// Auto-generated key IDs are generated in response to platform key codes
/// which Flutter doesn't recognize, and their IDs shouldn't be used in a
/// persistent way.
///
/// Autogenerated IDs should be a rare occurrence: Flutter supports most keys.
/// Auto-generated IDs should be a rare occurrence: Flutter supports most keys.
///
/// Keys that generate Unicode characters (even if unknown to Flutter) will
/// not return true for `isAutogenerated`, since they will be assigned a
......@@ -209,10 +209,10 @@ class LogicalKeyboardKey extends Diagnosticable {
/// produced on until Flutter adds support for recognizing it.
///
/// So, hypothetically, if Android added a new key code of 0xffff,
/// representing a new "do what I mean" key, then the autogenerated code would
/// be 0x1020000ffff, but once Flutter added the "doWhatIMean" key to the
/// definitions below, the new code would be 0x0020000ffff for all platforms
/// that had a "do what I mean" key from then on.
/// representing a new "do what I mean" key, then the auto-generated code
/// would be 0x1020000ffff, but once Flutter added the "doWhatIMean" key to
/// the definitions below, the new code would be 0x0020000ffff for all
/// platforms that had a "do what I mean" key from then on.
bool get isAutogenerated => (keyId & autogeneratedMask) != 0;
/// Mask for the 32-bit value portion of the key code.
......@@ -226,7 +226,7 @@ class LogicalKeyboardKey extends Diagnosticable {
/// This is used by platform-specific code to generate Flutter key codes.
static const int platformMask = 0x0FF00000000;
/// Mask for the autogenerated bit portion of the key code.
/// Mask for the auto-generated bit portion of the key code.
///
/// This is used by platform-specific code to generate new Flutter key codes
/// for keys which are not recognized.
......
......@@ -349,7 +349,7 @@ class AndroidMotionEvent {
/// See Android's [MotionEvent#getDeviceId](https://developer.android.com/reference/android/view/MotionEvent.html#getDeviceId()).
final int deviceId;
/// A bitfield indicating which edges, if any, were touched by this MotionEvent.
/// A bit field indicating which edges, if any, were touched by this MotionEvent.
///
/// See Android's [MotionEvent#getEdgeFlags](https://developer.android.com/reference/android/view/MotionEvent.html#getEdgeFlags()).
final int edgeFlags;
......@@ -598,7 +598,8 @@ class UiKitViewController {
/// The unique identifier of the iOS view controlled by this controller.
///
/// This identifer is typically generated by [PlatformViewsRegistry.getNextPlatformViewId].
/// This identifier is typically generated by
/// [PlatformViewsRegistry.getNextPlatformViewId].
final int id;
bool _debugDisposed = false;
......
......@@ -255,7 +255,7 @@ class SystemChrome {
/// If a particular overlay is unsupported on the platform, enabling or
/// disabling that overlay will be ignored.
///
/// The settings here can be overidden by the platform when System UI becomes
/// The settings here can be overridden by the platform when System UI becomes
/// necessary for functionality.
///
/// For example, on Android, when the keyboard becomes visible, it will enable the
......
......@@ -389,7 +389,7 @@ class TextInputConfiguration {
/// Defaults to false.
final bool obscureText;
/// Whether to enable autocorrection.
/// Whether to enable auto-correction.
///
/// Defaults to true.
final bool autocorrect;
......@@ -400,7 +400,7 @@ class TextInputConfiguration {
/// What kind of action to request for the action button on the IME.
final TextInputAction inputAction;
/// Specifies how platforms may automatically capitialize text entered by the
/// Specifies how platforms may automatically capitalize text entered by the
/// user.
///
/// Defaults to [TextCapitalization.none].
......
......@@ -33,7 +33,7 @@ export 'dart:ui' show Locale;
/// The [locales] list is the device's preferred locales when the app started, or the
/// device's preferred locales the user selected after the app was started. This list
/// is in order of preference. If this list is null or empty, then Flutter has not yet
/// recieved the locale information from the platform. The [supportedLocales] parameter
/// received the locale information from the platform. The [supportedLocales] parameter
/// is just the value of [WidgetsApp.supportedLocales].
///
/// See also:
......@@ -47,7 +47,7 @@ typedef LocaleListResolutionCallback = Locale Function(List<Locale> locales, Ite
///
/// It is recommended to provide a [LocaleListResolutionCallback] instead of a
/// [LocaleResolutionCallback] when possible, as [LocaleResolutionCallback] only
/// recieves a subset of the information provided in [LocaleListResolutionCallback].
/// receives a subset of the information provided in [LocaleListResolutionCallback].
///
/// A [LocaleResolutionCallback] is responsible for computing the locale of the app's
/// [Localizations] object when the app starts and when user changes the default
......@@ -59,7 +59,7 @@ typedef LocaleListResolutionCallback = Locale Function(List<Locale> locales, Ite
/// The [locale] is either the value of [WidgetsApp.locale], or the device's default
/// locale when the app started, or the device locale the user selected after the app
/// was started. The default locale is the first locale in the list of preferred
/// locales. If [locale] is null, then Flutter has not yet recieved the locale
/// locales. If [locale] is null, then Flutter has not yet received the locale
/// information from the platform. The [supportedLocales] parameter is just the value of
/// [WidgetsApp.supportedLocales].
///
......@@ -524,7 +524,7 @@ class WidgetsApp extends StatefulWidget {
/// This callback considers the entire list of preferred locales.
///
/// This algorithm should be able to handle a null or empty list of preferred locales,
/// which indicates Flutter has not yet recieved locale information from the platform.
/// which indicates Flutter has not yet received locale information from the platform.
///
/// See also:
///
......@@ -541,7 +541,7 @@ class WidgetsApp extends StatefulWidget {
/// over [localeResolutionCallback] as it provides the full preferred locales list.
///
/// This algorithm should be able to handle a null locale, which indicates
/// Flutter has not yet recieved locale information from the platform.
/// Flutter has not yet received locale information from the platform.
///
/// See also:
///
......@@ -585,8 +585,8 @@ class WidgetsApp extends StatefulWidget {
/// [Locale.countryCode] to specify a generic fallback for a particular script.
///
/// A fully supported language with multiple scripts should define a generic language-only
/// locale (eg. 'zh'), language+script only locales (eg. 'zh_Hans' and 'zh_Hant'),
/// and any language+script+country locales (eg. 'zh_Hans_CN'). Fully defining all of
/// locale (e.g. 'zh'), language+script only locales (e.g. 'zh_Hans' and 'zh_Hant'),
/// and any language+script+country locales (e.g. 'zh_Hans_CN'). Fully defining all of
/// these locales as supported is not strictly required but allows for proper locale resolution in
/// the most number of cases. These locales can be specified with the [Locale.fromSubtags]
/// constructor:
......@@ -847,7 +847,7 @@ class _WidgetsAppState extends State<WidgetsApp> implements WidgetsBindingObserv
/// Custom resolution algorithms can be provided through [WidgetsApp.localeListResolutionCallback]
/// or [WidgetsApp.localeResolutionCallback].
///
/// When no custom locale resolition algorithms are provided or if both fail to resolve,
/// When no custom locale resolution algorithms are provided or if both fail to resolve,
/// Flutter will default to calling this algorithm.
///
/// This algorithm prioritizes speed at the cost of slightly less appropriate
......@@ -859,7 +859,7 @@ class _WidgetsAppState extends State<WidgetsApp> implements WidgetsBindingObserv
///
/// In the case where a locale is matched by languageCode-only and is not the
/// default (first) locale, the next locale in preferredLocales with a
/// perfect match can supercede the languageCode-only match if it exists.
/// perfect match can supersede the languageCode-only match if it exists.
///
/// When a preferredLocale matches more than one supported locale, it will resolve
/// to the first matching locale listed in the supportedLocales.
......
......@@ -389,7 +389,7 @@ class StreamBuilder<T> extends StreamBuilderBase<T, AsyncSnapshot<T>> {
/// The data that will be used to create the initial snapshot.
///
/// Providing this value (presumably obtained sychronously somehow when the
/// Providing this value (presumably obtained synchronously somehow when the
/// [Stream] was created) ensures that the first frame will show useful data.
/// Otherwise, the first frame will be built with the value null, regardless
/// of whether a value is available on the stream: since streams are
......
......@@ -1264,7 +1264,7 @@ class CompositedTransformTarget extends SingleChildRenderObjectWidget {
///
/// Hit testing on descendants of this widget will only work if the target
/// position is within the box that this widget's parent considers to be
/// hitable. If the parent covers the screen, this is trivially achievable, so
/// hittable. If the parent covers the screen, this is trivially achievable, so
/// this widget is usually used as the root of an [OverlayEntry] in an app-wide
/// [Overlay] (e.g. as created by the [MaterialApp] widget's [Navigator]).
///
......@@ -5968,7 +5968,7 @@ class ExcludeSemantics extends SingleChildRenderObjectWidget {
/// Semantic indexes are used by TalkBack/Voiceover to make announcements about
/// the current scroll state. Certain widgets like the [ListView] will
/// automatically provide a child index for building semantics. A user may wish
/// to manually provide semanitc indexes if not all child of the scrollable
/// to manually provide semantic indexes if not all child of the scrollable
/// contribute semantics.
///
/// {@tool sample}
......@@ -5994,7 +5994,7 @@ class ExcludeSemantics extends SingleChildRenderObjectWidget {
///
/// See also:
///
/// * [CustomScrollView], for an explaination of index semantics.
/// * [CustomScrollView], for an explanation of index semantics.
class IndexedSemantics extends SingleChildRenderObjectWidget {
/// Creates a widget that annotated the first child semantics node with an index.
///
......
......@@ -22,7 +22,7 @@ export 'dart:ui' show AppLifecycleState, Locale;
/// Interface for classes that register with the Widgets layer binding.
///
/// When used as a mixin, provides noop method implementations.
/// When used as a mixin, provides no-op method implementations.
///
/// See [WidgetsBinding.addObserver] and [WidgetsBinding.removeObserver].
///
......
......@@ -145,9 +145,9 @@ class DecoratedBox extends SingleChildRenderObjectWidget {
/// Since [Container] combines a number of other widgets each with their own
/// layout behavior, [Container]'s layout behavior is somewhat complicated.
///
/// tl;dr: [Container] tries, in order: to honor [alignment], to size itself to
/// the [child], to honor the `width`, `height`, and [constraints], to expand to
/// fit the parent, to be as small as possible.
/// Summary: [Container] tries, in order: to honor [alignment], to size itself
/// to the [child], to honor the `width`, `height`, and [constraints], to expand
/// to fit the parent, to be as small as possible.
///
/// More specifically:
///
......
......@@ -347,7 +347,7 @@ class EditableText extends StatefulWidget {
/// Since fonts may vary depending on user input and due to font
/// fallback, [StrutStyle.forceStrutHeight] is enabled by default
/// to lock all lines to the height of the base [TextStyle], provided by
/// [style]. This ensures the typed text fits within the alotted space.
/// [style]. This ensures the typed text fits within the allotted space.
///
/// If null, the strut used will is inherit values from the [style] and will
/// have [StrutStyle.forceStrutHeight] set to true. When no [style] is
......@@ -453,10 +453,10 @@ class EditableText extends StatefulWidget {
///
/// If this is null, there is no limit to the number of lines, and the text
/// container will start with enough vertical space for one line and
/// automatically grow to accomodate additional lines as they are entered.
/// automatically grow to accommodate additional lines as they are entered.
///
/// If it is not null, the value must be greater than zero. If it is greater
/// than 1, it will take up enough horizontal space to accomodate that number
/// than 1, it will take up enough horizontal space to accommodate that number
/// of lines.
/// {@endtemplate}
final int maxLines;
......
......@@ -254,7 +254,7 @@ class FormField<T> extends StatefulWidget {
/// If true, this form field will validate and update its error text
/// immediately after every change. Otherwise, you must call
/// [FormFieldState.validate] to validate. If part of a [Form] that
/// autovalidates, this value will be ignored.
/// auto-validates, this value will be ignored.
final bool autovalidate;
/// Whether the form is able to receive user input.
......
......@@ -67,7 +67,8 @@ ImageConfiguration createLocalImageConfiguration(BuildContext context, { Size si
/// The [BuildContext] and [Size] are used to select an image configuration
/// (see [createLocalImageConfiguration]).
///
/// The `onError` argument can be used to manually handle errors while precaching.
/// The `onError` argument can be used to manually handle errors while
/// pre-caching.
///
/// See also:
///
......@@ -561,7 +562,7 @@ class Image extends StatefulWidget {
/// A Semantic description of the image.
///
/// Used to provide a description of the image to TalkBack on Andoid, and
/// Used to provide a description of the image to TalkBack on Android, and
/// VoiceOver on iOS.
final String semanticLabel;
......
......@@ -9,7 +9,7 @@ import 'framework.dart';
/// An inherited widget for a [Listenable] [notifier], which updates its
/// dependencies when the [notifier] is triggered.
///
/// This is a variant of [InheritedWidget], specialised for subclasses of
/// This is a variant of [InheritedWidget], specialized for subclasses of
/// [Listenable], such as [ChangeNotifier] or [ValueNotifier].
///
/// Dependents are notified whenever the [notifier] sends notifications, or
......
......@@ -47,7 +47,7 @@ enum Orientation {
/// same as the window that contains the app.
///
/// Widgets whose layouts consume space defined by [viewInsets] or
/// [padding] shoud enclose their children in secondary MediaQuery
/// [padding] should enclose their children in secondary MediaQuery
/// widgets that reduce those properties by the same amount.
/// The [removePadding] and [removeInsets] methods are useful for this.
@immutable
......
......@@ -52,7 +52,7 @@ typedef NestedScrollViewHeaderSliversBuilder = List<Widget> Function(BuildContex
/// in the opposite direction (e.g. allowing the user to swipe horizontally
/// between the pages represented by the tabs, while the list scrolls
/// vertically), then any list inside that [TabBarView] would not interact with
/// the outer [ScrollView]. For example, flinginsg the inner list to scroll to
/// the outer [ScrollView]. For example, flinging the inner list to scroll to
/// the top would not cause a collapsed [SliverAppBar] in the outer [ScrollView]
/// to expand.
///
......
......@@ -259,7 +259,7 @@ abstract class ScrollPosition extends ViewportOffset with ScrollMetrics {
/// * [jumpTo], for making changes to position while not in the
/// middle of layout and applying the new position immediately.
/// * [animateTo], which is like [jumpTo] but animating to the
/// distination offset.
/// destination offset.
void correctPixels(double value) {
_pixels = value;
}
......
......@@ -394,7 +394,7 @@ abstract class ScrollView extends StatelessWidget {
/// A [CustomScrollView] can allow Talkback/VoiceOver to make announcements
/// to the user when the scroll state changes. For example, on Android an
/// announcement might be read as "showing items 1 to 10 of 23". To produce
/// this announcment, the scroll view needs three pieces of information:
/// this announcement, the scroll view needs three pieces of information:
///
/// * The first visible child index.
/// * The total number of children.
......@@ -410,7 +410,7 @@ abstract class ScrollView extends StatelessWidget {
/// generated semantics of each scrollable item with a semantic index. This can
/// be done by wrapping the child widgets in an [IndexedSemantics].
///
/// This semantic index is not necesarily the same as the index of the widget in
/// This semantic index is not necessarily the same as the index of the widget in
/// the scrollable, because some widgets may not contribute semantic
/// information. Consider a [new ListView.separated()]: every other widget is a
/// divider with no semantic information. In this case, only odd numbered
......
......@@ -77,7 +77,7 @@ class ScrollbarPainter extends ChangeNotifier implements CustomPainter {
/// pixels. Mustn't be null.
final double mainAxisMargin;
/// Distance from the scrollbar's side to the nearest edge in pixels. Musn't
/// Distance from the scrollbar's side to the nearest edge in pixels. Must not
/// be null.
final double crossAxisMargin;
......
......@@ -255,7 +255,7 @@ abstract class SliverChildDelegate {
///
/// In certain cases, only a subset of child widgets should be annotated
/// with a semantic index. For example, in [new ListView.separated()] the
/// separators do not have an index assocaited with them. This is done by
/// separators do not have an index associated with them. This is done by
/// providing a `semanticIndexCallback` which returns null for separators
/// indexes and rounds the non-separator indexes down by half.
///
......@@ -460,7 +460,7 @@ class SliverChildBuilderDelegate extends SliverChildDelegate {
///
/// In certain cases, only a subset of child widgets should be annotated
/// with a semantic index. For example, in [new ListView.separated()] the
/// separators do not have an index assocaited with them. This is done by
/// separators do not have an index associated with them. This is done by
/// providing a `semanticIndexCallback` which returns null for separators
/// indexes and rounds the non-separator indexes down by half.
///
......
......@@ -18,7 +18,7 @@ import 'framework.dart';
/// a [ValueListenable] changes value.
typedef ValueWidgetBuilder<T> = Widget Function(BuildContext context, T value, Widget child);
/// A widget whose content stays sync'ed with a [ValueListenable].
/// A widget whose content stays synced with a [ValueListenable].
///
/// Given a [ValueListenable<T>] and a [builder] which builds widgets from
/// concrete values of `T`, this class will automatically register itself as a
......
......@@ -369,7 +369,7 @@ class _ScreenshotData {
/// of the regular rendering pipeline.
/// This painting context behaves the same as standard [PaintingContext] with
/// instrumentation added to compute a screenshot of a specified [RenderObject]
/// added. To correctly mimic the behavor of the regular rendering pipeline, the
/// added. To correctly mimic the behavior of the regular rendering pipeline, the
/// full subtree of the first [RepaintBoundary] ancestor of the specified
/// [RenderObject] will also be rendered rather than just the subtree of the
/// render object.
......
......@@ -212,7 +212,7 @@ class TestSemantics {
/// parent).
final Matrix4 transform;
/// The elevation of this node reative to the parent node.
/// The elevation of this node relative to the parent node.
///
/// See also:
///
......@@ -493,8 +493,8 @@ class SemanticsTester {
///
/// Use this method to generate code for unit tests. It works similar to
/// screenshot testing. The very first time you add semantics to a widget you
/// verify manually that the widget behaves correctly. You then use ths method
/// to generate test code for this widget.
/// verify manually that the widget behaves correctly. You then use this
/// method to generate test code for this widget.
///
/// Example:
///
......
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