Skip to content

Commit

Permalink
Fix spelling errors. (flutter#28657)
Browse files Browse the repository at this point in the history
Fix the spelling errors in the dartdocs for the framework.

There are no functionality changes here, just documentation fixes.
  • Loading branch information
gspencergoog authored Feb 28, 2019
1 parent f776cc1 commit ccdd505
Show file tree
Hide file tree
Showing 61 changed files with 145 additions and 141 deletions.
16 changes: 8 additions & 8 deletions dev/tools/gen_keycodes/data/keyboard_key.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/animation/tween.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/animation/tween_sequence.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions packages/flutter/lib/src/cupertino/icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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:
///
Expand All @@ -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:
///
Expand Down Expand Up @@ -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:
///
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/cupertino/route.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/cupertino/text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/cupertino/text_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/foundation/basic_types.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/foundation/binding.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/foundation/diagnostics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/foundation/platform.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/foundation/unicode.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions packages/flutter/lib/src/material/app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter/lib/src/material/button_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion packages/flutter/lib/src/material/chip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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]).
Expand Down
10 changes: 5 additions & 5 deletions packages/flutter/lib/src/material/color_scheme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter/lib/src/material/dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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].
///
Expand Down Expand Up @@ -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].
///
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/expand_icon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/flat_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter/lib/src/material/input_decorator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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].
///
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/material.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/outline_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading

0 comments on commit ccdd505

Please sign in to comment.