diff --git a/dev/benchmarks/complex_layout/test/measure_scroll_smoothness.dart b/dev/benchmarks/complex_layout/test/measure_scroll_smoothness.dart index ef8d24552f..03aaa2f6c4 100644 --- a/dev/benchmarks/complex_layout/test/measure_scroll_smoothness.dart +++ b/dev/benchmarks/complex_layout/test/measure_scroll_smoothness.dart @@ -181,7 +181,7 @@ Future main() async { /// Calculates the smoothness measure from `scrollOffset` and `delays` list. /// -/// Smoothness (`abs_jerk`) is measured by the absolute value of the discrete +/// Smoothness (`abs_jerk`) is measured by the absolute value of the discrete /// 2nd derivative of the scroll offset. /// /// It was experimented that jerk (3rd derivative of the position) is a good diff --git a/dev/benchmarks/microbenchmarks/lib/foundation/platform_asset_bundle.dart b/dev/benchmarks/microbenchmarks/lib/foundation/platform_asset_bundle.dart index 41fb6cbe3d..8d0ed1e7e7 100644 --- a/dev/benchmarks/microbenchmarks/lib/foundation/platform_asset_bundle.dart +++ b/dev/benchmarks/microbenchmarks/lib/foundation/platform_asset_bundle.dart @@ -24,7 +24,7 @@ void main() async { watch.reset(); watch.start(); for (int i = 0; i < _kBatchSize; i += 1) { - // Note: We don't load images like this. PlatformAssetBundle is used for + // Note: We don't load images like this. PlatformAssetBundle is used for // other assets (like Rive animations). We are using an image because it's // conveniently sized and available for the test. tally += (await bundle.load('packages/flutter_gallery_assets/places/india_pondicherry_salt_farm.png')).lengthInBytes; diff --git a/dev/benchmarks/platform_channels_benchmarks/lib/main.dart b/dev/benchmarks/platform_channels_benchmarks/lib/main.dart index b5850e1ae9..920721e22f 100644 --- a/dev/benchmarks/platform_channels_benchmarks/lib/main.dart +++ b/dev/benchmarks/platform_channels_benchmarks/lib/main.dart @@ -8,7 +8,6 @@ import 'dart:math' as math; import 'package:flutter/foundation.dart' show kDebugMode; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; - import 'package:microbenchmarks/common.dart'; List _makeTestBuffer(int size) { @@ -195,7 +194,7 @@ Future _runTests() async { ); /// WARNING: Don't change the following line of code, it will invalidate - /// `Large` tests. Instead make a different test. The size of largeBuffer + /// `Large` tests. Instead make a different test. The size of largeBuffer /// serialized is 14214 bytes. final List largeBuffer = _makeTestBuffer(1000); final ByteData largeBufferBytes = diff --git a/dev/bots/analyze_snippet_code.dart b/dev/bots/analyze_snippet_code.dart index 5d4fb1466d..1fce5f60ae 100644 --- a/dev/bots/analyze_snippet_code.dart +++ b/dev/bots/analyze_snippet_code.dart @@ -443,7 +443,7 @@ class _SnippetChecker { /// The directory for the dart:ui code to be analyzed with the flutter code. /// - /// If this is null, then no dart:ui code is included in the analysis. It + /// If this is null, then no dart:ui code is included in the analysis. It /// defaults to the location inside of the flutter bin/cache directory that /// contains the dart:ui code supplied by the engine. final Directory? _dartUiLocation; diff --git a/dev/bots/prepare_package.dart b/dev/bots/prepare_package.dart index fdd07a945a..b2cc416b45 100644 --- a/dev/bots/prepare_package.dart +++ b/dev/bots/prepare_package.dart @@ -185,7 +185,7 @@ typedef HttpReader = Future Function(Uri url, {Map he /// Creates a pre-populated Flutter archive from a git repo. class ArchiveCreator { - /// [tempDir] is the directory to use for creating the archive. The script + /// [tempDir] is the directory to use for creating the archive. The script /// will place several GiB of data there, so it should have available space. /// /// The processManager argument is used to inject a mock of [ProcessManager] for @@ -263,7 +263,7 @@ class ArchiveCreator { /// platform we're running on. final Platform platform; - /// The branch to build the archive for. The branch must contain [revision]. + /// The branch to build the archive for. The branch must contain [revision]. final Branch branch; /// The git revision hash to build the archive for. This revision has @@ -385,7 +385,7 @@ class ArchiveCreator { /// git will give an error. /// /// If [strict] is true, the exact [revision] must be tagged to return the - /// version. If [strict] is not true, will look backwards in time starting at + /// version. If [strict] is not true, will look backwards in time starting at /// [revision] to find the most recent version tag. /// /// The version found as a git tag is added to the information given by diff --git a/dev/bots/test.dart b/dev/bots/test.dart index 67cd26f2f8..e7cd1c67c2 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart @@ -186,7 +186,7 @@ const Map> kWebTestFileKnownFailures = _kAllBuildModes = ['debug', 'profile', 'release']; -// The seed used to shuffle tests. If not passed with +// The seed used to shuffle tests. If not passed with // --test-randomize-ordering-seed= on the command line, it will be set the // first time it is accessed. Pass zero to turn off shuffling. String? _shuffleSeed; diff --git a/dev/bots/unpublish_package.dart b/dev/bots/unpublish_package.dart index b8c79bc27b..61ede5a93f 100644 --- a/dev/bots/unpublish_package.dart +++ b/dev/bots/unpublish_package.dart @@ -429,7 +429,7 @@ Future main(List rawArguments) async { 'confirm', help: 'If set, will actually remove the archive from Google Cloud Storage ' 'upon successful execution of this script. Published archives will be ' - 'removed from this directory: $baseUrl$releaseFolder. This option ' + 'removed from this directory: $baseUrl$releaseFolder. This option ' 'must be set to perform any action on the server, otherwise only a dry ' 'run is performed.', ); @@ -479,7 +479,7 @@ Future main(List rawArguments) async { } if (!(parsedArguments['confirm'] as bool)) { - _printBanner('This will be just a dry run. To actually perform the changes below, re-run with --confirm argument.'); + _printBanner('This will be just a dry run. To actually perform the changes below, re-run with --confirm argument.'); } final List channelArg = parsedArguments['channel'] as List; @@ -518,7 +518,7 @@ Future main(List rawArguments) async { errorExit('$message\n$stack', exitCode: exitCode); } if (!(parsedArguments['confirm'] as bool)) { - _printBanner('This was just a dry run. To actually perform the above changes, re-run with --confirm argument.'); + _printBanner('This was just a dry run. To actually perform the above changes, re-run with --confirm argument.'); } exit(0); } diff --git a/dev/integration_tests/flutter_gallery/lib/demo/material/chip_demo.dart b/dev/integration_tests/flutter_gallery/lib/demo/material/chip_demo.dart index cb45f173e9..2fec52f55a 100644 --- a/dev/integration_tests/flutter_gallery/lib/demo/material/chip_demo.dart +++ b/dev/integration_tests/flutter_gallery/lib/demo/material/chip_demo.dart @@ -194,9 +194,9 @@ class _ChipDemoState extends State { } // This converts a String to a unique color, based on the hash value of the - // String object. It takes the bottom 16 bits of the hash, and uses that to + // String object. It takes the bottom 16 bits of the hash, and uses that to // pick a hue for an HSV color, and then creates the color (with a preset - // saturation and value). This means that any unique strings will also have + // saturation and value). This means that any unique strings will also have // unique colors, but they'll all be readable, since they have the same // saturation and value. Color _nameToColor(String name, ThemeData theme) { diff --git a/dev/tools/dartdoc.dart b/dev/tools/dartdoc.dart index 28e95c179c..6bd750e17b 100644 --- a/dev/tools/dartdoc.dart +++ b/dev/tools/dartdoc.dart @@ -255,7 +255,7 @@ ArgParser _createArgsParser() { help: 'Show command help.'); parser.addFlag('verbose', defaultsTo: true, help: 'Whether to report all error messages (on) or attempt to ' - 'filter out some known false positives (off). Shut this off ' + 'filter out some known false positives (off). Shut this off ' 'locally if you want to address Flutter-specific issues.'); parser.addFlag('checked', abbr: 'c', help: 'Run dartdoc in checked mode.'); diff --git a/dev/tools/localization/bin/gen_subtag_registry.dart b/dev/tools/localization/bin/gen_subtag_registry.dart index c2779bfc71..5205432c27 100644 --- a/dev/tools/localization/bin/gen_subtag_registry.dart +++ b/dev/tools/localization/bin/gen_subtag_registry.dart @@ -7,8 +7,8 @@ import 'dart:io'; const String registry = 'https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry'; -/// A script to generate a Dart cache of https://www.iana.org. This should be -/// run occasionally. It was created since iana.org was found to be flakey. +/// A script to generate a Dart cache of https://www.iana.org. This should be +/// run occasionally. It was created since iana.org was found to be flakey. /// /// To execute: dart gen_subtag_registry.dart > language_subtag_registry.dart Future main() async { diff --git a/examples/api/lib/animation/curves/curve2_d.0.dart b/examples/api/lib/animation/curves/curve2_d.0.dart index d6357d93a6..7ac5261ecf 100644 --- a/examples/api/lib/animation/curves/curve2_d.0.dart +++ b/examples/api/lib/animation/curves/curve2_d.0.dart @@ -71,7 +71,7 @@ class _FollowCurve2DState extends State super.initState(); controller = AnimationController(duration: widget.duration, vsync: this); animation = CurvedAnimation(parent: controller, curve: widget.curve); - // Have the controller repeat indefinitely. If you want it to "bounce" back + // Have the controller repeat indefinitely. If you want it to "bounce" back // and forth, set the reverse parameter to true. controller.repeat(); controller.addListener(() => setState(() {})); diff --git a/examples/api/lib/material/text_field/text_field.2.dart b/examples/api/lib/material/text_field/text_field.2.dart index 33791deb7e..b6a83d8871 100644 --- a/examples/api/lib/material/text_field/text_field.2.dart +++ b/examples/api/lib/material/text_field/text_field.2.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flutter code sample for Material Design 3 TextFields. +// Flutter code sample for Material Design 3 TextFields. import 'package:flutter/material.dart'; diff --git a/packages/flutter/lib/src/animation/curves.dart b/packages/flutter/lib/src/animation/curves.dart index b6eac1cac0..08476c53f3 100644 --- a/packages/flutter/lib/src/animation/curves.dart +++ b/packages/flutter/lib/src/animation/curves.dart @@ -508,7 +508,7 @@ abstract class Curve2D extends ParametricCurve { double end = 1.0, double tolerance = 1e-10, }) { - // The sampling algorithm is: + // The sampling algorithm is: // 1. Evaluate the area of the triangle (a proxy for the "flatness" of the // curve) formed by two points and a test point. // 2. If the area of the triangle is small enough (below tolerance), then @@ -675,7 +675,7 @@ class CatmullRomSpline extends Curve2D { /// interpolate. /// /// The internal curve data structures are lazily computed the first time - /// [transform] is called. If you would rather pre-compute the structures, + /// [transform] is called. If you would rather pre-compute the structures, /// use [CatmullRomSpline.precompute] instead. CatmullRomSpline( List controlPoints, { @@ -851,7 +851,7 @@ class CatmullRomCurve extends Curve { /// is equivalent to a linear interpolation between points. /// /// The internal curve data structures are lazily computed the first time - /// [transform] is called. If you would rather pre-compute the curve, use + /// [transform] is called. If you would rather pre-compute the curve, use /// [CatmullRomCurve.precompute] instead. /// /// All of the arguments must not be null. diff --git a/packages/flutter/lib/src/cupertino/dialog.dart b/packages/flutter/lib/src/cupertino/dialog.dart index 33a77f0e1d..1e4e6c05d7 100644 --- a/packages/flutter/lib/src/cupertino/dialog.dart +++ b/packages/flutter/lib/src/cupertino/dialog.dart @@ -918,7 +918,7 @@ class _CupertinoDialogRenderElement extends RenderObjectElement { // // If all content and buttons do not fit on screen, and iOS is NOT in accessibility mode: // A minimum height for the action button section is calculated. The action -// button section will not be rendered shorter than this minimum. See +// button section will not be rendered shorter than this minimum. See // [_RenderCupertinoDialogActions] for the minimum height calculation. // // With the minimum action button section calculated, the content section can @@ -1335,7 +1335,7 @@ enum _AlertDialogSections { // The "content section" of a CupertinoAlertDialog. // -// If title is missing, then only content is added. If content is +// If title is missing, then only content is added. If content is // missing, then only title is added. If both are missing, then it returns // a SingleChildScrollView with a zero-sized Container. class _CupertinoAlertContentSection extends StatelessWidget { @@ -2254,7 +2254,7 @@ class _RenderCupertinoDialogActions extends RenderBox void _drawButtonBackgroundsAndDividersSingleRow(Canvas canvas, Offset offset) { // The vertical divider sits between the left button and right button (if - // the dialog has 2 buttons). The vertical divider is hidden if either the + // the dialog has 2 buttons). The vertical divider is hidden if either the // left or right button is pressed. final Rect verticalDivider = childCount == 2 && !_isButtonPressed ? Rect.fromLTWH( diff --git a/packages/flutter/lib/src/cupertino/icons.dart b/packages/flutter/lib/src/cupertino/icons.dart index fd02f2350f..887d36c919 100644 --- a/packages/flutter/lib/src/cupertino/icons.dart +++ b/packages/flutter/lib/src/cupertino/icons.dart @@ -187,14 +187,14 @@ class CupertinoIcons { /// * [check_mark_circled], which is similar, but not filled in. static const IconData check_mark_circled_solid = IconData(0xf3ff, fontFamily: iconFont, fontPackage: iconFontPackage); - /// circle — Cupertino icon for an empty circle (a ring). An un-selected radio button. + /// circle — Cupertino icon for an empty circle (a ring). An un-selected radio button. /// /// See also: /// /// * [circle_filled], which is similar but filled in. static const IconData circle = IconData(0xf401, fontFamily: iconFont, fontPackage: iconFontPackage); - /// circle_fill — Cupertino icon for a filled circle. The circle is surrounded by a ring. A selected radio button. + /// circle_fill — Cupertino icon for a filled circle. The circle is surrounded by a ring. A selected radio button. /// This is the same icon as [circle_fill] in cupertino_icons 1.0.0+. /// /// See also: diff --git a/packages/flutter/lib/src/cupertino/picker.dart b/packages/flutter/lib/src/cupertino/picker.dart index 1476d16223..2c4aa5072c 100644 --- a/packages/flutter/lib/src/cupertino/picker.dart +++ b/packages/flutter/lib/src/cupertino/picker.dart @@ -66,8 +66,8 @@ class CupertinoPicker extends StatefulWidget { /// the current picker index or for selecting an initial index value. /// /// The [looping] argument decides whether the child list loops and can be - /// scrolled infinitely. If set to true, scrolling past the end of the list - /// will loop the list back to the beginning. If set to false, the list will + /// scrolled infinitely. If set to true, scrolling past the end of the list + /// will loop the list back to the beginning. If set to false, the list will /// stop scrolling when you reach the end or the beginning. CupertinoPicker({ super.key, diff --git a/packages/flutter/lib/src/cupertino/tab_scaffold.dart b/packages/flutter/lib/src/cupertino/tab_scaffold.dart index 4779ce55e9..b08f167ef3 100644 --- a/packages/flutter/lib/src/cupertino/tab_scaffold.dart +++ b/packages/flutter/lib/src/cupertino/tab_scaffold.dart @@ -3,6 +3,7 @@ // found in the LICENSE file. import 'package:flutter/widgets.dart'; + import 'bottom_tab_bar.dart'; import 'colors.dart'; import 'theme.dart'; @@ -457,7 +458,7 @@ class _TabSwitchingViewState extends State<_TabSwitchingView> { _focusActiveTab(); } - // Will focus the active tab if the FocusScope above it has focus already. If + // Will focus the active tab if the FocusScope above it has focus already. If // not, then it will just mark it as the preferred focus for that scope. void _focusActiveTab() { if (tabFocusNodes.length != widget.tabCount) { diff --git a/packages/flutter/lib/src/foundation/binding.dart b/packages/flutter/lib/src/foundation/binding.dart index ead94b2971..5acfa98f01 100644 --- a/packages/flutter/lib/src/foundation/binding.dart +++ b/packages/flutter/lib/src/foundation/binding.dart @@ -6,6 +6,7 @@ import 'dart:convert' show json; import 'dart:developer' as developer; import 'dart:io' show exit; import 'dart:ui' as ui show Brightness, PlatformDispatcher, SingletonFlutterWindow, window; + // Before adding any more dart:ui imports, please read the README. import 'package:meta/meta.dart'; @@ -178,8 +179,8 @@ abstract class BindingBase { /// Each of these other bindings could individually access a /// [ui.SingletonFlutterWindow] statically, but that would preclude the /// ability to test its behaviors with a fake window for verification - /// purposes. Therefore, [BindingBase] exposes this - /// [ui.SingletonFlutterWindow] for use by other bindings. A subclass of + /// purposes. Therefore, [BindingBase] exposes this + /// [ui.SingletonFlutterWindow] for use by other bindings. A subclass of /// [BindingBase], such as [TestWidgetsFlutterBinding], can override this /// accessor to return a different [ui.SingletonFlutterWindow] implementation, /// such as a [TestWindow]. diff --git a/packages/flutter/lib/src/material/app_bar.dart b/packages/flutter/lib/src/material/app_bar.dart index f04a3a3d20..2e740df38c 100644 --- a/packages/flutter/lib/src/material/app_bar.dart +++ b/packages/flutter/lib/src/material/app_bar.dart @@ -485,7 +485,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget { /// The shape of the app bar's [Material] as well as its shadow. /// /// If this property is null, then [AppBarTheme.shape] of - /// [ThemeData.appBarTheme] is used. Both properties default to null. + /// [ThemeData.appBarTheme] is used. Both properties default to null. /// If both properties are null then the shape of the app bar's [Material] /// is just a simple rectangle. /// @@ -561,7 +561,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget { /// /// The AppBar is built within a `AnnotatedRegion` /// which causes [SystemChrome.setSystemUIOverlayStyle] to be called - /// automatically. Apps should not enclose the AppBar with + /// automatically. Apps should not enclose the AppBar with /// their own [AnnotatedRegion]. /// {@endtemplate} /// @@ -780,7 +780,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget { /// The AppBar's descendants are built within a /// `AnnotatedRegion` widget, which causes /// [SystemChrome.setSystemUIOverlayStyle] to be called - /// automatically. Apps should not enclose an AppBar with their + /// automatically. Apps should not enclose an AppBar with their /// own [AnnotatedRegion]. /// {@endtemplate} // diff --git a/packages/flutter/lib/src/material/button_style.dart b/packages/flutter/lib/src/material/button_style.dart index b0556b1d1d..3eec3280ae 100644 --- a/packages/flutter/lib/src/material/button_style.dart +++ b/packages/flutter/lib/src/material/button_style.dart @@ -74,7 +74,7 @@ import 'theme_data.dart'; /// Configuring a ButtonStyle directly makes it possible to very /// precisely control the button’s visual attributes for all states. /// This level of control is typically required when a custom -/// “branded” look and feel is desirable. However, in many cases it’s +/// “branded” look and feel is desirable. However, in many cases it’s /// useful to make relatively sweeping changes based on a few initial /// parameters with simple values. The button styleFrom() methods /// enable such sweeping changes. See for example: diff --git a/packages/flutter/lib/src/material/chip.dart b/packages/flutter/lib/src/material/chip.dart index b05bc29434..76c1cc2633 100644 --- a/packages/flutter/lib/src/material/chip.dart +++ b/packages/flutter/lib/src/material/chip.dart @@ -2068,7 +2068,7 @@ class _RenderChip extends RenderBox with SlottedContainerRenderObjectMixin<_Chip } // Set this to true to have outlines of the tap targets drawn over - // the chip. This should never be checked in while set to 'true'. + // the chip. This should never be checked in while set to 'true'. static const bool _debugShowTapTargetOutlines = false; @override diff --git a/packages/flutter/lib/src/material/date_picker.dart b/packages/flutter/lib/src/material/date_picker.dart index d52c7f9693..4823a1fed6 100644 --- a/packages/flutter/lib/src/material/date_picker.dart +++ b/packages/flutter/lib/src/material/date_picker.dart @@ -869,7 +869,7 @@ class _DatePickerHeader extends StatelessWidget { /// /// * [helpText], the label displayed at the top of the dialog. /// * [cancelText], the label on the cancel button for the text input mode. -/// * [confirmText],the label on the ok button for the text input mode. +/// * [confirmText],the label on the ok button for the text input mode. /// * [saveText], the label on the save button for the fullscreen calendar /// mode. /// * [errorFormatText], the message used when an input text isn't in a proper diff --git a/packages/flutter/lib/src/material/dialog.dart b/packages/flutter/lib/src/material/dialog.dart index 4ebb397e64..4a5e8dd6e0 100644 --- a/packages/flutter/lib/src/material/dialog.dart +++ b/packages/flutter/lib/src/material/dialog.dart @@ -922,7 +922,7 @@ class SimpleDialog extends StatelessWidget { /// announce screen transitions when the dialog is opened and closed. /// /// 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 + /// [title] if it is not null. If there is no title, the label will be taken /// from [MaterialLocalizations.dialogLabel]. /// /// See also: diff --git a/packages/flutter/lib/src/material/elevated_button.dart b/packages/flutter/lib/src/material/elevated_button.dart index 0efc4da7ef..93c93197b5 100644 --- a/packages/flutter/lib/src/material/elevated_button.dart +++ b/packages/flutter/lib/src/material/elevated_button.dart @@ -22,7 +22,7 @@ import 'theme_data.dart'; /// A Material Design "elevated button". /// /// Use elevated buttons to add dimension to otherwise mostly flat -/// layouts, e.g. in long busy lists of content, or in wide +/// layouts, e.g. in long busy lists of content, or in wide /// spaces. Avoid using elevated buttons on already-elevated content /// such as dialogs or cards. /// @@ -33,7 +33,7 @@ import 'theme_data.dart'; /// background is the [ButtonStyle.backgroundColor]. /// /// The elevated button's default style is defined by -/// [defaultStyleOf]. The style of this elevated button can be +/// [defaultStyleOf]. The style of this elevated button can be /// overridden with its [style] parameter. The style of all elevated /// buttons in a subtree can be overridden with the /// [ElevatedButtonTheme], and the style of all of the elevated diff --git a/packages/flutter/lib/src/material/elevated_button_theme.dart b/packages/flutter/lib/src/material/elevated_button_theme.dart index dfac0f8220..4b70a52760 100644 --- a/packages/flutter/lib/src/material/elevated_button_theme.dart +++ b/packages/flutter/lib/src/material/elevated_button_theme.dart @@ -16,7 +16,7 @@ import 'theme.dart'; /// overall [Theme]'s [ThemeData.elevatedButtonTheme]. /// /// The [style]'s properties override [ElevatedButton]'s default style, -/// i.e. the [ButtonStyle] returned by [ElevatedButton.defaultStyleOf]. Only +/// i.e. the [ButtonStyle] returned by [ElevatedButton.defaultStyleOf]. Only /// the style's non-null property values or resolved non-null /// [MaterialStateProperty] values are used. /// diff --git a/packages/flutter/lib/src/material/flexible_space_bar.dart b/packages/flutter/lib/src/material/flexible_space_bar.dart index 518f91f018..aaa5665537 100644 --- a/packages/flutter/lib/src/material/flexible_space_bar.dart +++ b/packages/flutter/lib/src/material/flexible_space_bar.dart @@ -415,7 +415,7 @@ class FlexibleSpaceBarSettings extends InheritedWidget { /// /// This value is used by the [AppBar] to resolve /// [AppBar.backgroundColor] against [MaterialState.scrolledUnder], - /// i.e. to enable apps to specify different colors when content + /// i.e. to enable apps to specify different colors when content /// has been scrolled up and behind the app bar. /// /// Null if the caller hasn't determined if the FlexibleSpaceBar diff --git a/packages/flutter/lib/src/material/floating_action_button.dart b/packages/flutter/lib/src/material/floating_action_button.dart index 06b715a6df..8b05195326 100644 --- a/packages/flutter/lib/src/material/floating_action_button.dart +++ b/packages/flutter/lib/src/material/floating_action_button.dart @@ -62,7 +62,7 @@ enum _FloatingActionButtonType { /// /// {@tool dartpad} /// This example shows how to make an extended [FloatingActionButton] in a -/// [Scaffold], with a pink [backgroundColor], a thumbs up [Icon] and a +/// [Scaffold], with a pink [backgroundColor], a thumbs up [Icon] and a /// [Text] label that reads "Approve". /// /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/floating_action_button_label.png) diff --git a/packages/flutter/lib/src/material/ink_well.dart b/packages/flutter/lib/src/material/ink_well.dart index 1fee93405f..d343605e6a 100644 --- a/packages/flutter/lib/src/material/ink_well.dart +++ b/packages/flutter/lib/src/material/ink_well.dart @@ -501,7 +501,7 @@ class InkResponse extends StatelessWidget { /// [MaterialState.pressed] triggers a ripple (an ink splash), per /// the current Material Design spec. The [overlayColor] doesn't map /// a state to [highlightColor] because a separate highlight is not - /// used by the current design guidelines. See + /// used by the current design guidelines. See /// https://material.io/design/interaction/states.html#pressed /// /// If the overlay color is null or resolves to null, then [focusColor], diff --git a/packages/flutter/lib/src/material/input_decorator.dart b/packages/flutter/lib/src/material/input_decorator.dart index aa76a8ce3a..4667d78f3e 100644 --- a/packages/flutter/lib/src/material/input_decorator.dart +++ b/packages/flutter/lib/src/material/input_decorator.dart @@ -3124,7 +3124,7 @@ class InputDecoration { final String? counterText; /// Optional custom counter widget to go in the place otherwise occupied by - /// [counterText]. If this property is non null, then [counterText] is + /// [counterText]. If this property is non null, then [counterText] is /// ignored. final Widget? counter; @@ -3317,7 +3317,7 @@ class InputDecoration { /// If [border] derives from [InputBorder] the border's [InputBorder.borderSide], /// i.e. the border's color and width, will be overridden to reflect the input /// decorator's state. Only the border's shape is used. If custom [BorderSide] - /// values are desired for a given state, all four borders – [errorBorder], + /// values are desired for a given state, all four borders – [errorBorder], /// [focusedBorder], [enabledBorder], [disabledBorder] – must be set. /// /// The decoration's container is the area which is filled if [filled] is diff --git a/packages/flutter/lib/src/material/material_state.dart b/packages/flutter/lib/src/material/material_state.dart index 332c65783d..71bc743e8c 100644 --- a/packages/flutter/lib/src/material/material_state.dart +++ b/packages/flutter/lib/src/material/material_state.dart @@ -604,8 +604,8 @@ class _MaterialStateUnderlineInputBorder extends MaterialStateUnderlineInputBord /// of [MaterialState]s. /// /// Material state properties represent values that depend on a widget's material -/// "state". The state is encoded as a set of [MaterialState] values, like -/// [MaterialState.focused], [MaterialState.hovered], [MaterialState.pressed]. For +/// "state". The state is encoded as a set of [MaterialState] values, like +/// [MaterialState.focused], [MaterialState.hovered], [MaterialState.pressed]. For /// example the [InkWell.overlayColor] defines the color that fills the ink well /// when it's pressed (the "splash color"), focused, or hovered. The [InkWell] /// uses the overlay color's [resolve] method to compute the color for the @@ -613,7 +613,7 @@ class _MaterialStateUnderlineInputBorder extends MaterialStateUnderlineInputBord /// /// [ButtonStyle], which is used to configure the appearance of /// buttons like [TextButton], [ElevatedButton], and [OutlinedButton], -/// has many material state properties. The button widgets keep track +/// has many material state properties. The button widgets keep track /// of their current material state and [resolve] the button style's /// material state properties when their value is needed. /// diff --git a/packages/flutter/lib/src/material/navigation_bar.dart b/packages/flutter/lib/src/material/navigation_bar.dart index b0dd9a85f5..7fd5e24425 100644 --- a/packages/flutter/lib/src/material/navigation_bar.dart +++ b/packages/flutter/lib/src/material/navigation_bar.dart @@ -382,7 +382,7 @@ class _NavigationDestinationBuilder extends StatelessWidget { /// Builds the label for an destination in a [NavigationBar]. /// /// To animate between unselected and selected, build the icon based on - /// [_NavigationDestinationInfo.selectedAnimation]. When the animation is + /// [_NavigationDestinationInfo.selectedAnimation]. When the animation is /// 0, the destination is unselected, when the animation is 1, the destination /// is selected. /// diff --git a/packages/flutter/lib/src/material/outlined_button.dart b/packages/flutter/lib/src/material/outlined_button.dart index b343815277..2342ca71e6 100644 --- a/packages/flutter/lib/src/material/outlined_button.dart +++ b/packages/flutter/lib/src/material/outlined_button.dart @@ -30,7 +30,7 @@ import 'theme_data.dart'; /// elevation) [Material] widget. The label's [Text] and [Icon] /// widgets are displayed in the [style]'s /// [ButtonStyle.foregroundColor] and the outline's weight and color -/// are defined by [ButtonStyle.side]. The button reacts to touches +/// are defined by [ButtonStyle.side]. The button reacts to touches /// by filling with the [style]'s [ButtonStyle.overlayColor]. /// /// The outlined button's default style is defined by [defaultStyleOf]. @@ -42,7 +42,7 @@ import 'theme_data.dart'; /// /// Unlike [TextButton] or [ElevatedButton], outline buttons have a /// default [ButtonStyle.side] which defines the appearance of the -/// outline. Because the default `side` is non-null, it +/// outline. Because the default `side` is non-null, it /// unconditionally overrides the shape's [OutlinedBorder.side]. In /// other words, to specify an outlined button's shape _and_ the /// appearance of its outline, both the [ButtonStyle.shape] and diff --git a/packages/flutter/lib/src/material/outlined_button_theme.dart b/packages/flutter/lib/src/material/outlined_button_theme.dart index 1d29b8622d..d5ad99d396 100644 --- a/packages/flutter/lib/src/material/outlined_button_theme.dart +++ b/packages/flutter/lib/src/material/outlined_button_theme.dart @@ -16,7 +16,7 @@ import 'theme.dart'; /// overall [Theme]'s [ThemeData.outlinedButtonTheme]. /// /// The [style]'s properties override [OutlinedButton]'s default style, -/// i.e. the [ButtonStyle] returned by [OutlinedButton.defaultStyleOf]. Only +/// i.e. the [ButtonStyle] returned by [OutlinedButton.defaultStyleOf]. Only /// the style's non-null property values or resolved non-null /// [MaterialStateProperty] values are used. /// diff --git a/packages/flutter/lib/src/material/range_slider.dart b/packages/flutter/lib/src/material/range_slider.dart index 7206aa0880..f9b62d8528 100644 --- a/packages/flutter/lib/src/material/range_slider.dart +++ b/packages/flutter/lib/src/material/range_slider.dart @@ -114,7 +114,7 @@ class RangeSlider extends StatefulWidget { /// the slider. To know when the value starts to change, or when it is done /// changing, set the optional callbacks [onChangeStart] and/or [onChangeEnd]. /// - /// * [values], which determines currently selected values for this range + /// * [values], which determines currently selected values for this range /// slider. /// * [onChanged], which is called while the user is selecting a new value for /// the range slider. @@ -190,7 +190,7 @@ class RangeSlider extends StatefulWidget { /// /// See also: /// - /// * [onChangeStart], which is called when the user starts changing the + /// * [onChangeStart], which is called when the user starts changing the /// values. /// * [onChangeEnd], which is called when the user stops changing the values. final ValueChanged? onChanged; diff --git a/packages/flutter/lib/src/material/scaffold.dart b/packages/flutter/lib/src/material/scaffold.dart index 524f10fd3a..ed45fb74b6 100644 --- a/packages/flutter/lib/src/material/scaffold.dart +++ b/packages/flutter/lib/src/material/scaffold.dart @@ -2484,7 +2484,7 @@ class ScaffoldState extends State with TickerProviderStateMixin, Resto double get _floatingActionButtonVisibilityValue => _floatingActionButtonVisibilityController.value; /// Sets the current value of the visibility animation for the - /// [Scaffold.floatingActionButton]. This value must not be null. + /// [Scaffold.floatingActionButton]. This value must not be null. set _floatingActionButtonVisibilityValue(double newValue) { assert(newValue != null); _floatingActionButtonVisibilityController.value = clampDouble(newValue, @@ -2522,7 +2522,7 @@ class ScaffoldState extends State with TickerProviderStateMixin, Resto // iOS FEATURES - status bar tap, back gesture // On iOS, tapping the status bar scrolls the app's primary scrollable to the - // top. We implement this by looking up the primary scroll controller and + // top. We implement this by looking up the primary scroll controller and // scrolling it to the top when tapped. void _handleStatusBarTap() { final ScrollController? primaryScrollController = PrimaryScrollController.of(context); diff --git a/packages/flutter/lib/src/material/slider_theme.dart b/packages/flutter/lib/src/material/slider_theme.dart index ba0464f5e6..c53662e1cf 100644 --- a/packages/flutter/lib/src/material/slider_theme.dart +++ b/packages/flutter/lib/src/material/slider_theme.dart @@ -1496,7 +1496,7 @@ mixin BaseSliderTrackShape { /// [Slider]. /// /// The width is the width of the [Slider] or [RangeSlider], but padded by - /// the max of the overlay and thumb radius. The height is defined by the + /// the max of the overlay and thumb radius. The height is defined by the /// [SliderThemeData.trackHeight]. /// /// The [Rect] is centered both horizontally and vertically within the slider @@ -1706,7 +1706,7 @@ class RoundedRectSliderTrackShape extends SliderTrackShape with BaseSliderTrackS assert(thumbCenter != null); // If the slider [SliderThemeData.trackHeight] is less than or equal to 0, // then it makes no difference whether the track is painted or not, - // therefore the painting can be a no-op. + // therefore the painting can be a no-op. if (sliderTheme.trackHeight == null || sliderTheme.trackHeight! <= 0) { return; } @@ -2331,7 +2331,7 @@ class _EmptySliderTickMarkShape extends SliderTickMarkShape { /// that will not paint any component shape. A static reference is stored in /// [SliderTickMarkShape.noThumb] and [SliderTickMarkShape.noOverlay]. When this value /// is specified for [SliderThemeData.thumbShape], the thumb painting is -/// skipped. When this value is specified for [SliderThemeData.overlayShape], +/// skipped. When this value is specified for [SliderThemeData.overlayShape], /// the overlay painting is skipped. class _EmptySliderComponentShape extends SliderComponentShape { @override @@ -3261,7 +3261,7 @@ class _PaddleSliderValueIndicatorPathPainter { 0, ); - // This is the needed extra width for the label. It is only positive when + // This is the needed extra width for the label. It is only positive when // the label exceeds the minimum size contained by the round top lobe. final double halfWidthNeeded = math.max( 0.0, diff --git a/packages/flutter/lib/src/material/tabs.dart b/packages/flutter/lib/src/material/tabs.dart index fdfa842918..ee9db1dcea 100644 --- a/packages/flutter/lib/src/material/tabs.dart +++ b/packages/flutter/lib/src/material/tabs.dart @@ -98,7 +98,7 @@ class Tab extends StatelessWidget implements PreferredSizeWidget { /// The height of the [Tab]. /// - /// If null, the height will be calculated based on the content of the [Tab]. When `icon` is not + /// If null, the height will be calculated based on the content of the [Tab]. When `icon` is not /// null along with `child` or `text`, the default height is 72.0 pixels. Without an `icon`, the /// height is 46.0 pixels. final double? height; diff --git a/packages/flutter/lib/src/material/text_button_theme.dart b/packages/flutter/lib/src/material/text_button_theme.dart index 52968a6c5e..fd8c744eae 100644 --- a/packages/flutter/lib/src/material/text_button_theme.dart +++ b/packages/flutter/lib/src/material/text_button_theme.dart @@ -16,7 +16,7 @@ import 'theme.dart'; /// overall [Theme]'s [ThemeData.textButtonTheme]. /// /// The [style]'s properties override [TextButton]'s default style, -/// i.e. the [ButtonStyle] returned by [TextButton.defaultStyleOf]. Only +/// i.e. the [ButtonStyle] returned by [TextButton.defaultStyleOf]. Only /// the style's non-null property values or resolved non-null /// [MaterialStateProperty] values are used. /// diff --git a/packages/flutter/lib/src/material/text_field.dart b/packages/flutter/lib/src/material/text_field.dart index a65041c3e1..274f95692b 100644 --- a/packages/flutter/lib/src/material/text_field.dart +++ b/packages/flutter/lib/src/material/text_field.dart @@ -36,7 +36,7 @@ typedef InputCounterWidgetBuilder = Widget? Function( required int currentLength, /// The maximum string length that can be entered into the TextField. required int? maxLength, - /// Whether or not the TextField is currently focused. Mainly provided for + /// Whether or not the TextField is currently focused. Mainly provided for /// the [liveRegion] parameter in the [Semantics] widget for accessibility. required bool isFocused, }); @@ -246,7 +246,7 @@ class TextField extends StatefulWidget { /// [maxLength] is set a character counter will be displayed below the /// field showing how many characters have been entered. If the value is /// set to a positive integer it will also display the maximum allowed - /// number of characters to be entered. If the value is set to + /// number of characters to be entered. If the value is set to /// [TextField.noMaxLength] then only the current length is displayed. /// /// After [maxLength] characters have been input, additional input @@ -444,7 +444,7 @@ class TextField extends StatefulWidget { /// /// On Android, the user can hide the keyboard - without changing the focus - /// with the system back button. They can restore the keyboard's visibility - /// by tapping on a text field. The user might hide the keyboard and + /// by tapping on a text field. The user might hide the keyboard and /// switch to a physical keyboard, or they might just need to get it /// out of the way for a moment, to expose something it's /// obscuring. In this case requesting the focus again will not @@ -733,7 +733,7 @@ class TextField extends StatefulWidget { /// Callback that generates a custom [InputDecoration.counter] widget. /// /// See [InputCounterWidgetBuilder] for an explanation of the passed in - /// arguments. The returned widget will be placed below the line in place of + /// arguments. The returned widget will be placed below the line in place of /// the default widget built when [InputDecoration.counterText] is specified. /// /// The returned widget will be wrapped in a [Semantics] widget for diff --git a/packages/flutter/lib/src/material/typography.dart b/packages/flutter/lib/src/material/typography.dart index 4d5a1c85b7..c9c21d422e 100644 --- a/packages/flutter/lib/src/material/typography.dart +++ b/packages/flutter/lib/src/material/typography.dart @@ -49,7 +49,7 @@ enum ScriptCategory { /// [MaterialLocalizations.scriptCategory] and is created /// by merging a color text theme - [black] for /// [Brightness.light] themes and [white] for [Brightness.dark] -/// themes - and a geometry text theme, one of [englishLike], [dense], +/// themes - and a geometry text theme, one of [englishLike], [dense], /// or [tall], depending on the locale. /// /// To lookup the localized text theme use diff --git a/packages/flutter/lib/src/painting/gradient.dart b/packages/flutter/lib/src/painting/gradient.dart index eaf03ba76b..103b2b0fbc 100644 --- a/packages/flutter/lib/src/painting/gradient.dart +++ b/packages/flutter/lib/src/painting/gradient.dart @@ -579,7 +579,7 @@ class LinearGradient extends Gradient { /// which will make the rendered gradient appear to be pointed or directed in the /// direction of the [focal] point. This is only important if [focal] and [center] /// are not equal or [focalRadius] > 0.0 (as this case is visually identical to a -/// normal radial gradient). One important case to avoid is having [focal] and +/// normal radial gradient). One important case to avoid is having [focal] and /// [center] both resolve to [Offset.zero] when [focalRadius] > 0.0. In such a case, /// a valid shader cannot be created by the framework. /// @@ -687,7 +687,7 @@ class RadialGradient extends Gradient { /// ![](https://flutter.github.io/assets-for-api-docs/assets/dart-ui/tile_mode_repeated_radialWithFocal.png) final TileMode tileMode; - /// The focal point of the gradient. If specified, the gradient will appear + /// The focal point of the gradient. If specified, the gradient will appear /// to be focused along the vector from [center] to focal. /// /// See [center] for a description of how the coordinates are mapped. diff --git a/packages/flutter/lib/src/painting/inline_span.dart b/packages/flutter/lib/src/painting/inline_span.dart index 0050607456..242e0d7438 100644 --- a/packages/flutter/lib/src/painting/inline_span.dart +++ b/packages/flutter/lib/src/painting/inline_span.dart @@ -68,7 +68,7 @@ class InlineSpanSemanticsInformation { /// The text info for a [PlaceholderSpan]. static const InlineSpanSemanticsInformation placeholder = InlineSpanSemanticsInformation('\uFFFC', isPlaceholder: true); - /// The text value, if any. For [PlaceholderSpan]s, this will be the unicode + /// The text value, if any. For [PlaceholderSpan]s, this will be the unicode /// placeholder value. final String text; @@ -280,7 +280,7 @@ abstract class InlineSpan extends DiagnosticableTree { /// Walks the [InlineSpan] tree and accumulates a list of /// [InlineSpanSemanticsInformation] objects. /// - /// This method should not be directly called. Use + /// This method should not be directly called. Use /// [getSemanticsInformation] instead. /// /// [PlaceholderSpan]s in the tree will be represented with a diff --git a/packages/flutter/lib/src/painting/matrix_utils.dart b/packages/flutter/lib/src/painting/matrix_utils.dart index 0573b6e6aa..d7c2152132 100644 --- a/packages/flutter/lib/src/painting/matrix_utils.dart +++ b/packages/flutter/lib/src/painting/matrix_utils.dart @@ -245,7 +245,7 @@ class MatrixUtils { // since we know that Z=0.0. We can also get rid of the 3rd row because // we ignore the resulting Z coordinate. Finally we can get rid of the // last row if we don't have a perspective transform since we can verify - // that the results are 1.0 for all points. This gets us down to 16 + // that the results are 1.0 for all points. This gets us down to 16 // multiplies and 16 adds in the non-perspective case and 24 of each for // the perspective case. (Plus the 12 comparisons to turn them back into // a bounding box.) @@ -282,7 +282,7 @@ class MatrixUtils { // continue to hold with respect to the non-normalized coordinates so // we can still save a lot of multiplications by computing the 4 // non-normalized coordinates using relative additions before we normalize - // them and they lose their "pseudo-parallelogram" relationships. We still + // them and they lose their "pseudo-parallelogram" relationships. We still // have to do the normalization divisions and min/max all 4 points to // get the resulting transformed bounding box, but we save a lot of // calculations over blindly transforming all 4 coordinates independently. @@ -344,8 +344,8 @@ class MatrixUtils { // for a total of 8 multiplies, 8 adds, and 4 comparisons. // // An astute observer will note that we do need to do 2 subtractions at - // the top of the method to compute the width and height. Add those to - // all of the relative solutions listed above. The test for perspective + // the top of the method to compute the width and height. Add those to + // all of the relative solutions listed above. The test for perspective // also adds 3 compares to the affine case and up to 3 compares to the // perspective case (depending on which test fails, the rest are omitted). // diff --git a/packages/flutter/lib/src/painting/text_style.dart b/packages/flutter/lib/src/painting/text_style.dart index 0301f8d6f6..81cc9f07be 100644 --- a/packages/flutter/lib/src/painting/text_style.dart +++ b/packages/flutter/lib/src/painting/text_style.dart @@ -772,16 +772,16 @@ class TextStyle with Diagnosticable { /// A list of [FontFeature]s that affect how the font selects glyphs. /// /// Some fonts support multiple variants of how a given character can be - /// rendered. For example, a font might provide both proportional and + /// rendered. For example, a font might provide both proportional and /// tabular numbers, or it might offer versions of the zero digit with - /// and without slashes. [FontFeature]s can be used to select which of + /// and without slashes. [FontFeature]s can be used to select which of /// these variants will be used for rendering. final List? fontFeatures; /// A list of [FontVariation]s that affect how a variable font is rendered. /// /// Some fonts are variable fonts that can generate multiple font faces based - /// on the values of customizable attributes. For example, a variable font + /// on the values of customizable attributes. For example, a variable font /// may have a weight axis that can be set to a value between 1 and 1000. /// [FontVariation]s can be used to select the values of these design axes. /// diff --git a/packages/flutter/lib/src/rendering/mouse_tracker.dart b/packages/flutter/lib/src/rendering/mouse_tracker.dart index 0e4ccc9f44..9b9af0fa69 100644 --- a/packages/flutter/lib/src/rendering/mouse_tracker.dart +++ b/packages/flutter/lib/src/rendering/mouse_tracker.dart @@ -297,7 +297,7 @@ class MouseTracker extends ChangeNotifier { /// result. /// /// The [updateWithEvent] indicates that an event has been observed, and is - /// called during the handler of the event. It is typically called by + /// called during the handler of the event. It is typically called by /// [RendererBinding], and should be called with all events received, and let /// [MouseTracker] filter which to react to. /// diff --git a/packages/flutter/lib/src/rendering/platform_view.dart b/packages/flutter/lib/src/rendering/platform_view.dart index 1dcabf4fad..b1700fc6f8 100644 --- a/packages/flutter/lib/src/rendering/platform_view.dart +++ b/packages/flutter/lib/src/rendering/platform_view.dart @@ -732,7 +732,7 @@ mixin _PlatformViewGestureMixin on RenderBox implements MouseTrackerAnnotation { _HandlePointerEvent? _handlePointerEvent; - /// {@macro flutter.rendering.RenderAndroidView.updateGestureRecognizers} + /// {@macro flutter.rendering.RenderAndroidView.updateGestureRecognizers} /// /// Any active gesture arena the `PlatformView` participates in is rejected when the /// set of gesture recognizers is changed. diff --git a/packages/flutter/lib/src/services/hardware_keyboard.dart b/packages/flutter/lib/src/services/hardware_keyboard.dart index aabc0828cd..224b12074d 100644 --- a/packages/flutter/lib/src/services/hardware_keyboard.dart +++ b/packages/flutter/lib/src/services/hardware_keyboard.dart @@ -353,7 +353,7 @@ typedef KeyEventCallback = bool Function(KeyEvent event); /// ## Compared to [RawKeyboard] /// /// [RawKeyboard] is the legacy API, and will be deprecated and removed in the -/// future. It is recommended to always use [HardwareKeyboard] and [KeyEvent] +/// future. It is recommended to always use [HardwareKeyboard] and [KeyEvent] /// APIs (such as [FocusNode.onKeyEvent]) to handle key events. /// /// Behavior-wise, [RawKeyboard] provides a less unified, less regular @@ -672,7 +672,7 @@ class KeyMessage { /// The list of [KeyEvent]s converted from the native key message. /// /// A native key message is converted into multiple [KeyEvent]s in a regular - /// event model. The [events] might contain zero or any number of + /// event model. The [events] might contain zero or any number of /// [KeyEvent]s. /// /// See also: diff --git a/packages/flutter/lib/src/services/raw_keyboard.dart b/packages/flutter/lib/src/services/raw_keyboard.dart index 937081e82d..b3571bb875 100644 --- a/packages/flutter/lib/src/services/raw_keyboard.dart +++ b/packages/flutter/lib/src/services/raw_keyboard.dart @@ -3,6 +3,7 @@ // found in the LICENSE file. import 'dart:io'; + import 'package:flutter/foundation.dart'; import 'binding.dart'; @@ -88,7 +89,7 @@ enum ModifierKey { /// The SCROLL LOCK modifier key. /// - /// Typically, there is one of these. Only shown as "pressed" when the scroll + /// Typically, there is one of these. Only shown as "pressed" when the scroll /// lock is on, so on a key up when the mode is turned on, on each key press /// when it's enabled, and on a key down when it is turned off. scrollLockModifier, @@ -568,7 +569,7 @@ class RawKeyUpEvent extends RawKeyEvent { /// a handler that can determine if the key has been handled or not. /// /// The handler should return true if the key has been handled, and false if the -/// key was not handled. It must not return null. +/// key was not handled. It must not return null. typedef RawKeyEventHandler = bool Function(RawKeyEvent event); /// An interface for listening to raw key events. diff --git a/packages/flutter/lib/src/services/text_editing.dart b/packages/flutter/lib/src/services/text_editing.dart index 39c8caeb80..6dae30a85f 100644 --- a/packages/flutter/lib/src/services/text_editing.dart +++ b/packages/flutter/lib/src/services/text_editing.dart @@ -199,7 +199,7 @@ class TextSelection extends TextRange { /// ## Difference with [extendTo] /// In contrast with this method, [extendTo] is a pivot; it holds /// [TextSelection.baseOffset] fixed while moving [TextSelection.extentOffset] - /// to the given [TextPosition]. It doesn't strictly grow the selection and + /// to the given [TextPosition]. It doesn't strictly grow the selection and /// may collapse it or flip its order. TextSelection expandTo(TextPosition position, [bool extentAtIndex = false]) { // If position is already within in the selection, there's nothing to do. diff --git a/packages/flutter/lib/src/widgets/app.dart b/packages/flutter/lib/src/widgets/app.dart index 2445d32f1b..5aac7565d4 100644 --- a/packages/flutter/lib/src/widgets/app.dart +++ b/packages/flutter/lib/src/widgets/app.dart @@ -278,7 +278,7 @@ class WidgetsApp extends StatefulWidget { /// ``` /// /// It is possible to specify both [home] and [routes], but only if [routes] does - /// _not_ contain an entry for `'/'`. Conversely, if [home] is omitted, [routes] + /// _not_ contain an entry for `'/'`. Conversely, if [home] is omitted, [routes] /// _must_ contain an entry for `'/'`. /// /// If [home] or [routes] are not null, the routing implementation needs to know how @@ -295,7 +295,7 @@ class WidgetsApp extends StatefulWidget { /// [onGenerateRoute] and [onUnknownRoute] parameters. These parameters correspond /// to [Navigator.onGenerateRoute] and [Navigator.onUnknownRoute]. If [home], [routes], /// and [builder] are null, or if they fail to create a requested route, - /// [onGenerateRoute] will be invoked. If that fails, [onUnknownRoute] will be invoked. + /// [onGenerateRoute] will be invoked. If that fails, [onUnknownRoute] will be invoked. /// /// The [pageRouteBuilder] is called to create a [PageRoute] that wraps newly built routes. /// If the [builder] is non-null and the [onGenerateRoute] argument is null, then the diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart index eda1c65fc7..037dc2347d 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart @@ -82,7 +82,7 @@ export 'package:flutter/services.dart' show // BIDIRECTIONAL TEXT SUPPORT /// An [InheritedElement] that has hundreds of dependencies but will -/// infrequently change. This provides a performance tradeoff where building +/// infrequently change. This provides a performance tradeoff where building /// the [Widget]s is faster but performing updates is slower. /// /// | | _UbiquitiousInheritedElement | InheritedElement | @@ -101,7 +101,7 @@ class _UbiquitousInheritedElement extends InheritedElement { @override void setDependencies(Element dependent, Object? value) { // This is where the cost of [InheritedElement] is incurred during build - // time of the widget tree. Omitting this bookkeeping is where the + // time of the widget tree. Omitting this bookkeeping is where the // performance savings come from. assert(value == null); } @@ -3411,7 +3411,7 @@ class IntrinsicWidth extends SingleChildRenderObjectWidget { /// See also: /// /// * [RenderBox.getMaxIntrinsicWidth], which defines a widget's max - /// intrinsic width in general. + /// intrinsic width in general. final double? stepWidth; /// If non-null, force the child's height to be a multiple of this value. diff --git a/packages/flutter/lib/src/widgets/drag_target.dart b/packages/flutter/lib/src/widgets/drag_target.dart index 47da16bbf7..40ddc58e1b 100644 --- a/packages/flutter/lib/src/widgets/drag_target.dart +++ b/packages/flutter/lib/src/widgets/drag_target.dart @@ -311,7 +311,7 @@ class Draggable extends StatefulWidget { /// the semantics tree. /// /// This value should be set to false when the [feedback] widget is intended - /// to be the same object as the [child]. Placing a [GlobalKey] on this + /// to be the same object as the [child]. Placing a [GlobalKey] on this /// widget will ensure semantic focus is kept on the element as it moves in /// and out of the feedback position. /// diff --git a/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart b/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart index 3035895659..0a6e647228 100644 --- a/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart +++ b/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart @@ -424,8 +424,8 @@ class DraggableScrollableNotification extends Notification with ViewportNotifica /// Creates a notification that the extent of a [DraggableScrollableSheet] has /// changed. /// - /// All parameters are required. The [minExtent] must be >= 0. The [maxExtent] - /// must be <= 1.0. The [extent] must be between [minExtent] and [maxExtent]. + /// All parameters are required. The [minExtent] must be >= 0. The [maxExtent] + /// must be <= 1.0. The [extent] must be between [minExtent] and [maxExtent]. DraggableScrollableNotification({ required this.extent, required this.minExtent, diff --git a/packages/flutter/lib/src/widgets/editable_text.dart b/packages/flutter/lib/src/widgets/editable_text.dart index d0ecb09037..8fa7f9fca9 100644 --- a/packages/flutter/lib/src/widgets/editable_text.dart +++ b/packages/flutter/lib/src/widgets/editable_text.dart @@ -478,12 +478,12 @@ class _DiscreteKeyFrameSimulation extends Simulation { /// /// | **Intent Class** | **Default Behavior when there's selected text** | **Default Behavior when there is a caret ([TextSelection.collapsed])** | /// | :----------------------------------------------------------------------------------- | :--------------------------------------------------------------- | :---------------------------------------------------------------------- | -/// | [ExtendSelectionByCharacterIntent](`collapseSelection: true`) | Collapses the selection to the logical start/end of the selection | Moves the caret past the user-perceived character before or after the current caret location. | -/// | [ExtendSelectionToNextWordBoundaryIntent](`collapseSelection: true`) | Collapses the selection to the word boundary before/after the selection's [TextSelection.extent] position | Moves the caret to the previous/next word boundary. | -/// | [ExtendSelectionToNextWordBoundaryOrCaretLocationIntent](`collapseSelection: true`) | Collapses the selection to the word boundary before/after the selection's [TextSelection.extent] position, or [TextSelection.base], whichever is closest in the given direction | Moves the caret to the previous/next word boundary. | -/// | [ExtendSelectionToLineBreakIntent](`collapseSelection: true`) | Collapses the selection to the start/end of the line at the selection's [TextSelection.extent] position | Moves the caret to the start/end of the current line .| -/// | [ExtendSelectionVerticallyToAdjacentLineIntent](`collapseSelection: true`) | Collapses the selection to the position closest to the selection's [TextSelection.extent], on the previous/next adjacent line | Moves the caret to the closest position on the previous/next adjacent line. | -/// | [ExtendSelectionToDocumentBoundaryIntent](`collapseSelection: true`) | Collapses the selection to the start/end of the document | Moves the caret to the start/end of the document. | +/// | [ExtendSelectionByCharacterIntent](`collapseSelection: true`) | Collapses the selection to the logical start/end of the selection | Moves the caret past the user-perceived character before or after the current caret location. | +/// | [ExtendSelectionToNextWordBoundaryIntent](`collapseSelection: true`) | Collapses the selection to the word boundary before/after the selection's [TextSelection.extent] position | Moves the caret to the previous/next word boundary. | +/// | [ExtendSelectionToNextWordBoundaryOrCaretLocationIntent](`collapseSelection: true`) | Collapses the selection to the word boundary before/after the selection's [TextSelection.extent] position, or [TextSelection.base], whichever is closest in the given direction | Moves the caret to the previous/next word boundary. | +/// | [ExtendSelectionToLineBreakIntent](`collapseSelection: true`) | Collapses the selection to the start/end of the line at the selection's [TextSelection.extent] position | Moves the caret to the start/end of the current line .| +/// | [ExtendSelectionVerticallyToAdjacentLineIntent](`collapseSelection: true`) | Collapses the selection to the position closest to the selection's [TextSelection.extent], on the previous/next adjacent line | Moves the caret to the closest position on the previous/next adjacent line. | +/// | [ExtendSelectionToDocumentBoundaryIntent](`collapseSelection: true`) | Collapses the selection to the start/end of the document | Moves the caret to the start/end of the document. | /// /// #### Intents for Extending the Selection /// diff --git a/packages/flutter/lib/src/widgets/focus_manager.dart b/packages/flutter/lib/src/widgets/focus_manager.dart index 67c8d1728e..1da64cc6c9 100644 --- a/packages/flutter/lib/src/widgets/focus_manager.dart +++ b/packages/flutter/lib/src/widgets/focus_manager.dart @@ -452,7 +452,7 @@ class FocusNode with DiagnosticableTreeMixin, ChangeNotifier { /// If true, this focus node may request the primary focus. /// - /// Defaults to true. Set to false if you want this node to do nothing when + /// Defaults to true. Set to false if you want this node to do nothing when /// [requestFocus] is called on it. /// /// If set to false on a [FocusScopeNode], will cause all of the children of @@ -1694,7 +1694,7 @@ class FocusManager with DiagnosticableTreeMixin, ChangeNotifier { handled = false; break; } - // Only KeyEventResult.ignored will continue the for loop. All other + // Only KeyEventResult.ignored will continue the for loop. All other // options will stop the event propagation. assert(result != KeyEventResult.ignored); break; diff --git a/packages/flutter/lib/src/widgets/focus_scope.dart b/packages/flutter/lib/src/widgets/focus_scope.dart index eb3437cdfb..4b858df4c6 100644 --- a/packages/flutter/lib/src/widgets/focus_scope.dart +++ b/packages/flutter/lib/src/widgets/focus_scope.dart @@ -234,7 +234,7 @@ class Focus extends StatefulWidget { /// {@template flutter.widgets.Focus.canRequestFocus} /// If true, this widget may request the primary focus. /// - /// Defaults to true. Set to false if you want the [FocusNode] this widget + /// Defaults to true. Set to false if you want the [FocusNode] this widget /// manages to do nothing when [FocusNode.requestFocus] is called on it. Does /// not affect the children of this node, and [FocusNode.hasFocus] can still /// return true if this node is the ancestor of the primary focus. diff --git a/packages/flutter/lib/src/widgets/focus_traversal.dart b/packages/flutter/lib/src/widgets/focus_traversal.dart index e200ff8919..a088fe2daa 100644 --- a/packages/flutter/lib/src/widgets/focus_traversal.dart +++ b/packages/flutter/lib/src/widgets/focus_traversal.dart @@ -1347,7 +1347,7 @@ class OrderedTraversalPolicy extends FocusTraversalPolicy with DirectionalFocusT a.order.runtimeType == b.order.runtimeType, 'When sorting nodes for determining focus order, the order (${a.order}) of ' "node ${a.node}, isn't the same type as the order (${b.order}) of ${b.node}. " - "Incompatible order types can't be compared. Use a FocusTraversalGroup to group " + "Incompatible order types can't be compared. Use a FocusTraversalGroup to group " 'similar orders together.', ); return a.order.compareTo(b.order); @@ -1442,7 +1442,7 @@ class FocusTraversalOrder extends InheritedWidget { /// {@tool dartpad} /// This sample shows three rows of buttons, each grouped by a /// [FocusTraversalGroup], each with different traversal order policies. Use tab -/// traversal to see the order they are traversed in. The first row follows a +/// traversal to see the order they are traversed in. The first row follows a /// numerical order, the second follows a lexical order (ordered to traverse /// right to left), and the third ignores the numerical order assigned to it and /// traverses in widget order. diff --git a/packages/flutter/lib/src/widgets/keyboard_listener.dart b/packages/flutter/lib/src/widgets/keyboard_listener.dart index 854d704b8c..86febcb819 100644 --- a/packages/flutter/lib/src/widgets/keyboard_listener.dart +++ b/packages/flutter/lib/src/widgets/keyboard_listener.dart @@ -32,7 +32,7 @@ export 'package:flutter/services.dart' show KeyEvent; /// * [RawKeyboardListener], a similar widget based on the old [RawKeyboard] /// API. class KeyboardListener extends StatelessWidget { - /// Creates a widget that receives keyboard events. + /// Creates a widget that receives keyboard events. /// /// For text entry, consider using a [EditableText], which integrates with /// on-screen keyboards and input method editors (IMEs). diff --git a/packages/flutter/lib/src/widgets/navigator.dart b/packages/flutter/lib/src/widgets/navigator.dart index cae9ddbad9..792af72fe6 100644 --- a/packages/flutter/lib/src/widgets/navigator.dart +++ b/packages/flutter/lib/src/widgets/navigator.dart @@ -624,12 +624,12 @@ class NavigatorObserver { NavigatorState? get navigator => _navigators[this]; /// Expando mapping instances of NavigatorObserver to their associated - /// NavigatorState (or `null`, if there is no associated NavigatorState). The + /// NavigatorState (or `null`, if there is no associated NavigatorState). The /// reason we don't simply use a private instance field of type /// `NavigatorState?` is because as part of implementing /// https://github.com/dart-lang/language/issues/2020, it will soon become a /// runtime error to invoke a private member that is mocked in another - /// library. By using an expando rather than an instance field, we ensure + /// library. By using an expando rather than an instance field, we ensure /// that a mocked NavigatorObserver can still properly keep track of its /// associated NavigatorState. static final Expando _navigators = Expando(); diff --git a/packages/flutter/lib/src/widgets/overflow_bar.dart b/packages/flutter/lib/src/widgets/overflow_bar.dart index 445bd07f5b..f5fd4ba9e1 100644 --- a/packages/flutter/lib/src/widgets/overflow_bar.dart +++ b/packages/flutter/lib/src/widgets/overflow_bar.dart @@ -33,7 +33,7 @@ enum OverflowBarAlignment { /// /// This widget's width will expand to contain its children and the /// specified [spacing] until it overflows. The overflow column will -/// consume all of the available width. The [overflowAlignment] +/// consume all of the available width. The [overflowAlignment] /// defines how each child will be aligned within the overflow column /// and the [overflowSpacing] defines the gap between each child. /// diff --git a/packages/flutter/lib/src/widgets/router.dart b/packages/flutter/lib/src/widgets/router.dart index 92d7bd48b8..69a0576e9d 100644 --- a/packages/flutter/lib/src/widgets/router.dart +++ b/packages/flutter/lib/src/widgets/router.dart @@ -1060,7 +1060,7 @@ class ChildBackButtonDispatcher extends BackButtonDispatcher { final BackButtonDispatcher parent; /// The parent of this child back button dispatcher decide to let this - /// child to handle the invoke the callback request in + /// child to handle the invoke the callback request in /// [BackButtonDispatcher.invokeCallback]. /// /// Return a boolean future with true if this child will handle the request; diff --git a/packages/flutter/lib/src/widgets/routes.dart b/packages/flutter/lib/src/widgets/routes.dart index 8fee86c104..76984caff5 100644 --- a/packages/flutter/lib/src/widgets/routes.dart +++ b/packages/flutter/lib/src/widgets/routes.dart @@ -419,7 +419,7 @@ abstract class TransitionRoute extends OverlayRoute { /// /// If true, and `nextRoute.canTransitionFrom()` is true, then the /// [ModalRoute.buildTransitions] `secondaryAnimation` will run from 0.0 - 1.0 - /// when [nextRoute] is pushed on top of this one. Similarly, if + /// when [nextRoute] is pushed on top of this one. Similarly, if /// the [nextRoute] is popped off of this route, the /// `secondaryAnimation` will run from 1.0 - 0.0. /// diff --git a/packages/flutter/lib/src/widgets/scroll_activity.dart b/packages/flutter/lib/src/widgets/scroll_activity.dart index 909eec7b3c..96f63798de 100644 --- a/packages/flutter/lib/src/widgets/scroll_activity.dart +++ b/packages/flutter/lib/src/widgets/scroll_activity.dart @@ -48,7 +48,7 @@ abstract class ScrollActivityDelegate { /// given velocity. void goBallistic(double velocity); - /// Update the ballistic animation instead of restarting it, for example as + /// Update the ballistic animation instead of restarting it, for example as /// the result of a layout change after a flinging gesture. /// /// The [initVelocity] and [initPosition] refer to the starting values of the diff --git a/packages/flutter/lib/src/widgets/scroll_aware_image_provider.dart b/packages/flutter/lib/src/widgets/scroll_aware_image_provider.dart index af0cbbf24f..9ffb74d011 100644 --- a/packages/flutter/lib/src/widgets/scroll_aware_image_provider.dart +++ b/packages/flutter/lib/src/widgets/scroll_aware_image_provider.dart @@ -102,7 +102,7 @@ class ScrollAwareImageProvider extends ImageProvider { return; } // We are in the tree, we're not scrolling too fast, the cache doesn't - // have our image, and no one has otherwise completed the stream. Go. + // have our image, and no one has otherwise completed the stream. Go. imageProvider.resolveStreamForKey(configuration, stream, key, handleError); } diff --git a/packages/flutter/lib/src/widgets/scrollbar.dart b/packages/flutter/lib/src/widgets/scrollbar.dart index 0c32e9047a..f157e9f693 100644 --- a/packages/flutter/lib/src/widgets/scrollbar.dart +++ b/packages/flutter/lib/src/widgets/scrollbar.dart @@ -863,7 +863,7 @@ class ScrollbarPainter extends ChangeNotifier implements CustomPainter { /// If the child [ScrollView] is infinitely long, the [RawScrollbar] will not be /// painted. In this case, the scrollbar cannot accurately represent the /// relative location of the visible area, or calculate the accurate delta to -/// apply when dragging on the thumb or tapping on the track. +/// apply when dragging on the thumb or tapping on the track. /// /// ### Interaction /// @@ -1134,7 +1134,7 @@ class RawScrollbar extends StatefulWidget { /// controller: controllerOne, /// itemCount: 120, /// itemBuilder: (BuildContext context, int index) { - /// return Text('item $index'); + /// return Text('item $index'); /// }, /// ), /// ), @@ -1219,7 +1219,7 @@ class RawScrollbar extends StatefulWidget { /// controller: controllerOne, /// itemCount: 120, /// itemBuilder: (BuildContext context, int index) { - /// return Text('item $index'); + /// return Text('item $index'); /// }, /// ), /// ), diff --git a/packages/flutter/lib/src/widgets/shortcuts.dart b/packages/flutter/lib/src/widgets/shortcuts.dart index 2ba89866de..ad550843da 100644 --- a/packages/flutter/lib/src/widgets/shortcuts.dart +++ b/packages/flutter/lib/src/widgets/shortcuts.dart @@ -65,7 +65,7 @@ class KeySet { assert(_keys.length == count, 'Two or more provided keys are identical. Each key must appear only once.'); } - /// Create a [KeySet] from a set of [KeyboardKey]s. + /// Create a [KeySet] from a set of [KeyboardKey]s. /// /// Do not mutate the `keys` set after passing it to this object. /// @@ -272,7 +272,7 @@ class LogicalKeySet extends KeySet with Diagnosticable super.key4, ]); - /// Create a [LogicalKeySet] from a set of [LogicalKeyboardKey]s. + /// Create a [LogicalKeySet] from a set of [LogicalKeyboardKey]s. /// /// Do not mutate the `keys` set after passing it to this object. LogicalKeySet.fromSet(super.keys) : super.fromSet(); diff --git a/packages/flutter/lib/src/widgets/snapshot_widget.dart b/packages/flutter/lib/src/widgets/snapshot_widget.dart index 72c7fc91c6..9ce0e73bd5 100644 --- a/packages/flutter/lib/src/widgets/snapshot_widget.dart +++ b/packages/flutter/lib/src/widgets/snapshot_widget.dart @@ -318,7 +318,7 @@ class _RenderSnapshotWidget extends RenderProxyBox { /// would be a snapshot. /// /// The painter can call [notifyListeners] to have the [SnapshotWidget] -/// re-paint (re-using the same raster). This allows animations to be performed +/// re-paint (re-using the same raster). This allows animations to be performed /// without re-snapshotting of children. For certain scale or perspective changing /// transforms, such as a rotation, this can be significantly faster than performing /// the same animation at the widget level. diff --git a/packages/flutter/lib/src/widgets/text_editing_intents.dart b/packages/flutter/lib/src/widgets/text_editing_intents.dart index a7be37d704..493e6fb711 100644 --- a/packages/flutter/lib/src/widgets/text_editing_intents.dart +++ b/packages/flutter/lib/src/widgets/text_editing_intents.dart @@ -99,7 +99,7 @@ abstract class DirectionalCaretMovementIntent extends DirectionalTextEditingInte /// /// If true, when an [Intent] to go to the beginning/end of a wordwrapped line /// is received and the selection is already at the beginning/end of the line, - /// then the selection will be moved to the next/previous line. If false, the + /// then the selection will be moved to the next/previous line. If false, the /// selection will remain at the wordwrap. final bool continuesAtWrap; } diff --git a/packages/flutter/lib/src/widgets/widget_inspector.dart b/packages/flutter/lib/src/widgets/widget_inspector.dart index 0416b26d30..94185fa872 100644 --- a/packages/flutter/lib/src/widgets/widget_inspector.dart +++ b/packages/flutter/lib/src/widgets/widget_inspector.dart @@ -34,7 +34,7 @@ import 'gesture_detector.dart'; /// [WidgetInspector.selectButtonBuilder]. typedef InspectorSelectButtonBuilder = Widget Function(BuildContext context, VoidCallback onPressed); -/// Signature for a method that registers the service extension `callback` with +/// Signature for a method that registers the service extension `callback` with /// the given `name`. /// /// Used as argument to [WidgetInspectorService.initServiceExtensions]. The diff --git a/packages/flutter/test/material/dialog_test.dart b/packages/flutter/test/material/dialog_test.dart index f71677cf29..165a253bc5 100644 --- a/packages/flutter/test/material/dialog_test.dart +++ b/packages/flutter/test/material/dialog_test.dart @@ -48,7 +48,7 @@ RenderParagraph _getTextRenderObjectFromDialog(WidgetTester tester, String text) // What was the AlertDialog's ButtonBar when many of these tests were written, // is now a Padding widget with an OverflowBar child. The Padding widget's size -// and location match the original ButtonBar's size and location. +// and location match the original ButtonBar's size and location. Finder _findButtonBar() { return find.ancestor(of: find.byType(OverflowBar), matching: find.byType(Padding)).first; } diff --git a/packages/flutter/test/material/input_decorator_test.dart b/packages/flutter/test/material/input_decorator_test.dart index 14f8611e41..c7fa4fc951 100644 --- a/packages/flutter/test/material/input_decorator_test.dart +++ b/packages/flutter/test/material/input_decorator_test.dart @@ -2135,7 +2135,7 @@ void main() { ), ); - // Overall height for this InputDecorator is 100dps because the prefix icon's size + // Overall height for this InputDecorator is 100dps because the prefix icon's size // is 100x100 and the rest of the elements only require 40dps: // 12 - top padding // 16 - input text (ahem font size 16dps) diff --git a/packages/flutter/test/material/navigation_rail_test.dart b/packages/flutter/test/material/navigation_rail_test.dart index fe7a19d5b8..17eb179b92 100644 --- a/packages/flutter/test/material/navigation_rail_test.dart +++ b/packages/flutter/test/material/navigation_rail_test.dart @@ -1143,7 +1143,7 @@ void main() { ); // Since the rail is icon only, its preferred width should not be affected - // by textScaleFactor. + // by textScaleFactor. final RenderBox renderBox = tester.renderObject(find.byType(NavigationRail)); expect(renderBox.size.width, compactWidth); @@ -1221,7 +1221,7 @@ void main() { ); // Since the rail is icon only, its preferred width should not be affected - // by textScaleFactor. + // by textScaleFactor. final RenderBox renderBox = tester.renderObject(find.byType(NavigationRail)); expect(renderBox.size.width, compactWidth); @@ -3603,7 +3603,7 @@ void main() { ); // Since the rail is icon only, its preferred width should not be affected - // by textScaleFactor. + // by textScaleFactor. final RenderBox renderBox = tester.renderObject(find.byType(NavigationRail)); expect(renderBox.size.width, 56.0); @@ -3674,7 +3674,7 @@ void main() { ); // Since the rail is icon only, its preferred width should not be affected - // by textScaleFactor. + // by textScaleFactor. final RenderBox renderBox = tester.renderObject(find.byType(NavigationRail)); expect(renderBox.size.width, 56.0); diff --git a/packages/flutter/test/material/scaffold_test.dart b/packages/flutter/test/material/scaffold_test.dart index 22c0db79b5..4793cf7a3a 100644 --- a/packages/flutter/test/material/scaffold_test.dart +++ b/packages/flutter/test/material/scaffold_test.dart @@ -2062,7 +2062,7 @@ void main() { await tester.pumpWidget(buildFrame(false, false)); expect(tester.getSize(find.byKey(bodyKey)), const Size(800.0, 600.0)); - await tester.pumpWidget(buildFrame(null, null)); // resizeToAvoidBottomInset default is true + await tester.pumpWidget(buildFrame(null, null)); // resizeToAvoidBottomInset default is true expect(tester.getSize(find.byKey(bodyKey)), const Size(800.0, 500.0)); await tester.pumpWidget(buildFrame(null, false)); diff --git a/packages/flutter/test/widgets/navigator_test.dart b/packages/flutter/test/widgets/navigator_test.dart index cf32a4b279..ba157a91ae 100644 --- a/packages/flutter/test/widgets/navigator_test.dart +++ b/packages/flutter/test/widgets/navigator_test.dart @@ -840,7 +840,7 @@ void main() { }); testWidgets('pushReplacement correctly reports didReplace to the observer', (WidgetTester tester) async { - // Regression test for https://github.com/flutter/flutter/issues/56892. + // Regression test for https://github.com/flutter/flutter/issues/56892. final Map routes = { '/' : (BuildContext context) => const OnTapPage( id: '/', diff --git a/packages/flutter/test/widgets/nested_scroll_view_test.dart b/packages/flutter/test/widgets/nested_scroll_view_test.dart index 4f085c4c41..357bee4707 100644 --- a/packages/flutter/test/widgets/nested_scroll_view_test.dart +++ b/packages/flutter/test/widgets/nested_scroll_view_test.dart @@ -2216,7 +2216,7 @@ void main() { await tester.drag(find.text('Item 49'), const Offset(0.0, -50.0)); await tester.pump(); // If handled correctly, the last item should still be visible and - // progressing back down to the bottom edge, instead of jumping further + // progressing back down to the bottom edge, instead of jumping further // up the list and out of view. expect(find.text('Item 49'), findsOneWidget); await tester.pumpAndSettle(); diff --git a/packages/flutter_test/lib/src/animation_sheet.dart b/packages/flutter_test/lib/src/animation_sheet.dart index 3252a94bec..8fe9b4dc29 100644 --- a/packages/flutter_test/lib/src/animation_sheet.dart +++ b/packages/flutter_test/lib/src/animation_sheet.dart @@ -102,7 +102,7 @@ class AnimationSheetBuilder { /// subtree of [record]. /// /// If [allLayers] is false, then the [record] widget will capture the image - /// composited by its subtree. If [allLayers] is true, then the [record] will + /// composited by its subtree. If [allLayers] is true, then the [record] will /// capture the entire tree composited and clipped by [record]'s region. /// /// The two modes are identical if there is nothing in front of [record]. diff --git a/packages/flutter_test/lib/src/event_simulation.dart b/packages/flutter_test/lib/src/event_simulation.dart index 89904207c5..ded21a6b5c 100644 --- a/packages/flutter_test/lib/src/event_simulation.dart +++ b/packages/flutter_test/lib/src/event_simulation.dart @@ -722,7 +722,7 @@ class KeyEventSimulator { // its values. // // The `_transitMode` defaults to [KeyDataTransitMode.rawKeyEvent], and can be - // overridden with [debugKeyEventSimulatorTransitModeOverride]. In widget tests, it + // overridden with [debugKeyEventSimulatorTransitModeOverride]. In widget tests, it // is often set with [KeySimulationModeVariant]. static KeyDataTransitMode get _transitMode { KeyDataTransitMode? result; diff --git a/packages/flutter_test/lib/src/matchers.dart b/packages/flutter_test/lib/src/matchers.dart index cad66d3e00..8229dca022 100644 --- a/packages/flutter_test/lib/src/matchers.dart +++ b/packages/flutter_test/lib/src/matchers.dart @@ -500,7 +500,7 @@ AsyncMatcher matchesReferenceImage(ui.Image image) { /// Asserts that a [SemanticsNode] contains the specified information. /// /// If either the label, hint, value, textDirection, or rect fields are not -/// provided, then they are not part of the comparison. All of the boolean +/// provided, then they are not part of the comparison. All of the boolean /// flag and action fields must match, and default to false. /// /// To retrieve the semantics data of a widget, use [WidgetTester.getSemantics] diff --git a/packages/flutter_tools/lib/runner.dart b/packages/flutter_tools/lib/runner.dart index 5c824b6e05..cda24d7770 100644 --- a/packages/flutter_tools/lib/runner.dart +++ b/packages/flutter_tools/lib/runner.dart @@ -62,12 +62,12 @@ Future run( await runner.run(args); // Triggering [runZoned]'s error callback does not necessarily mean that - // we stopped executing the body. See https://github.com/dart-lang/sdk/issues/42150. + // we stopped executing the body. See https://github.com/dart-lang/sdk/issues/42150. if (firstError == null) { return await _exit(0); } - // We already hit some error, so don't return success. The error path + // We already hit some error, so don't return success. The error path // (which should be in progress) is responsible for calling _exit(). return 1; } catch (error, stackTrace) { // ignore: avoid_catches_without_on_clauses diff --git a/packages/flutter_tools/lib/src/android/android_device.dart b/packages/flutter_tools/lib/src/android/android_device.dart index fd7a64297d..f509b56235 100644 --- a/packages/flutter_tools/lib/src/android/android_device.dart +++ b/packages/flutter_tools/lib/src/android/android_device.dart @@ -20,7 +20,6 @@ import '../device.dart'; import '../device_port_forwarder.dart'; import '../project.dart'; import '../protocol_discovery.dart'; - import 'android.dart'; import 'android_builder.dart'; import 'android_console.dart'; @@ -313,7 +312,7 @@ class AndroidDevice extends Device { try { // If the server is automatically restarted, then we get irrelevant // output lines like this, which we want to ignore: - // adb server is out of date. killing.. + // adb server is out of date. killing.. // * daemon started successfully * await _processUtils.run( [adbPath, 'start-server'], diff --git a/packages/flutter_tools/lib/src/asset.dart b/packages/flutter_tools/lib/src/asset.dart index 9dd7272fbe..c7e438ca6a 100644 --- a/packages/flutter_tools/lib/src/asset.dart +++ b/packages/flutter_tools/lib/src/asset.dart @@ -270,7 +270,7 @@ class ManifestAssetBundle implements AssetBundle { return 1; } - // Parse assets for deferred components. + // Parse assets for deferred components. final Map>> deferredComponentsAssetVariants = _parseDeferredComponentsAssets( flutterManifest, packageConfig, diff --git a/packages/flutter_tools/lib/src/base/logger.dart b/packages/flutter_tools/lib/src/base/logger.dart index 506680dc4c..f80aed9bfd 100644 --- a/packages/flutter_tools/lib/src/base/logger.dart +++ b/packages/flutter_tools/lib/src/base/logger.dart @@ -1198,7 +1198,7 @@ class SilentStatus extends Status { const int _kTimePadding = 8; // should fit "99,999ms" -/// Constructor writes [message] to [stdout]. On [cancel] or [stop], will call +/// Constructor writes [message] to [stdout]. On [cancel] or [stop], will call /// [onFinish]. On [stop], will additionally print out summary information. class SummaryStatus extends Status { SummaryStatus({ diff --git a/packages/flutter_tools/lib/src/base/user_messages.dart b/packages/flutter_tools/lib/src/base/user_messages.dart index 47257c0349..bf4cb6e055 100644 --- a/packages/flutter_tools/lib/src/base/user_messages.dart +++ b/packages/flutter_tools/lib/src/base/user_messages.dart @@ -115,8 +115,8 @@ class UserMessages { 'You can download the JDK from https://www.oracle.com/technetwork/java/javase/downloads/.'; String androidJdkLocation(String location) => 'Java binary at: $location'; String get androidLicensesAll => 'All Android licenses accepted.'; - String get androidLicensesSome => 'Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses'; - String get androidLicensesNone => 'Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses'; + String get androidLicensesSome => 'Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses'; + String get androidLicensesNone => 'Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses'; String androidLicensesUnknown(Platform platform) => 'Android license status unknown.\n' 'Run `flutter doctor --android-licenses` to accept the SDK licenses.\n' diff --git a/packages/flutter_tools/lib/src/build_system/file_store.dart b/packages/flutter_tools/lib/src/build_system/file_store.dart index 5045370a60..c553569832 100644 --- a/packages/flutter_tools/lib/src/build_system/file_store.dart +++ b/packages/flutter_tools/lib/src/build_system/file_store.dart @@ -84,7 +84,7 @@ enum FileStoreStrategy { /// through this class. /// /// This class uses either timestamps or file hashes depending on the -/// provided [FileStoreStrategy]. All information is held in memory during +/// provided [FileStoreStrategy]. All information is held in memory during /// a build operation, and may be persisted to cache in the root build /// directory. /// diff --git a/packages/flutter_tools/lib/src/bundle_builder.dart b/packages/flutter_tools/lib/src/bundle_builder.dart index 402b845516..f41c682cb2 100644 --- a/packages/flutter_tools/lib/src/bundle_builder.dart +++ b/packages/flutter_tools/lib/src/bundle_builder.dart @@ -166,7 +166,7 @@ Future writeBundle( try { // This will result in strange looking files, for example files with `/` // on Windows or files that end up getting URI encoded such as `#.ext` - // to `%23.ext`. However, we have to keep it this way since the + // to `%23.ext`. However, we have to keep it this way since the // platform channels in the framework will URI encode these values, // and the native APIs will look for files this way. final File file = globals.fs.file(globals.fs.path.join(bundleDir.path, entry.key)); diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart index 0923d70c3b..b999ea482b 100644 --- a/packages/flutter_tools/lib/src/commands/create.dart +++ b/packages/flutter_tools/lib/src/commands/create.dart @@ -644,7 +644,7 @@ Your $application code is in $relativeAppMain. } // Takes an application template and replaces the main.dart with one from the - // documentation website in sampleCode. Returns the difference in the number + // documentation website in sampleCode. Returns the difference in the number // of files after applying the sample, since it also deletes the application's // test directory (since the template's test doesn't apply to the sample). int _applySample(Directory directory, String sampleCode) { diff --git a/packages/flutter_tools/lib/src/ios/devices.dart b/packages/flutter_tools/lib/src/ios/devices.dart index 5a3619e7a5..e9f662905c 100644 --- a/packages/flutter_tools/lib/src/ios/devices.dart +++ b/packages/flutter_tools/lib/src/ios/devices.dart @@ -704,7 +704,7 @@ class IOSDeviceLogReader extends DeviceLogReader { void logMessage(vm_service.Event event) { if (_iosDeployDebugger != null && _iosDeployDebugger!.debuggerAttached) { - // Prefer the more complete logs from the attached debugger. + // Prefer the more complete logs from the attached debugger. return; } final String message = processVmServiceMessage(event); diff --git a/packages/flutter_tools/lib/src/mdns_discovery.dart b/packages/flutter_tools/lib/src/mdns_discovery.dart index 13882b923b..a1d0717e1d 100644 --- a/packages/flutter_tools/lib/src/mdns_discovery.dart +++ b/packages/flutter_tools/lib/src/mdns_discovery.dart @@ -41,7 +41,7 @@ class MDnsObservatoryDiscovery { /// Executes an mDNS query for a Dart Observatory. /// /// The [applicationId] parameter may be used to specify which application - /// to find. For Android, it refers to the package name; on iOS, it refers to + /// to find. For Android, it refers to the package name; on iOS, it refers to /// the bundle ID. /// /// If it is not null, this method will find the port and authentication code diff --git a/packages/flutter_tools/lib/src/runner/local_engine.dart b/packages/flutter_tools/lib/src/runner/local_engine.dart index ecdad2fa14..e0fcb819a8 100644 --- a/packages/flutter_tools/lib/src/runner/local_engine.dart +++ b/packages/flutter_tools/lib/src/runner/local_engine.dart @@ -18,7 +18,7 @@ import '../dart/package_map.dart'; /// The flutter tool can be run with the output files of one or more engine builds /// replacing the cached artifacts. Typically this is done by setting the /// `--local-engine` command line flag to the name of the desired engine variant -/// (e.g. "host_debug_unopt"). Provided that the `flutter/` and `engine/` directories +/// (e.g. "host_debug_unopt"). Provided that the `flutter/` and `engine/` directories /// are located adjacent to one another, the output folder will be located /// automatically. /// diff --git a/packages/flutter_tools/lib/src/version.dart b/packages/flutter_tools/lib/src/version.dart index b8f0f93284..5887b715e3 100644 --- a/packages/flutter_tools/lib/src/version.dart +++ b/packages/flutter_tools/lib/src/version.dart @@ -327,7 +327,7 @@ class FlutterVersion { } /// log.showSignature=false is a user setting and it will break things, - /// so we want to disable it for every git log call. This is a convenience + /// so we want to disable it for every git log call. This is a convenience /// wrapper that does that. @visibleForTesting static List gitLog(List args) { diff --git a/packages/flutter_tools/test/general.shard/runner/runner_test.dart b/packages/flutter_tools/test/general.shard/runner/runner_test.dart index a995720179..fc8d7fd6c7 100644 --- a/packages/flutter_tools/test/general.shard/runner/runner_test.dart +++ b/packages/flutter_tools/test/general.shard/runner/runner_test.dart @@ -34,7 +34,7 @@ void main() { // Instead of exiting with dart:io exit(), this causes an exception to // be thrown, which we catch with the onError callback in the zone below. // - // Tests might trigger exit() multiple times. In real life, exit() would + // Tests might trigger exit() multiple times. In real life, exit() would // cause the VM to terminate immediately, so only the first one matters. firstExitCode = null; io.setExitFunctionForTests((int exitCode) { @@ -102,7 +102,7 @@ void main() { // This Completer completes when CrashingFlutterCommand.runCommand // completes, but ideally we'd want it to complete when execution resumes - // runner.run. Currently the distinction does not matter, but if it ever + // runner.run. Currently the distinction does not matter, but if it ever // does, this test might fail to catch a regression of // https://github.com/flutter/flutter/issues/56406. final Completer commandCompleter = Completer(); @@ -338,7 +338,7 @@ class CustomBugInstructions extends UserMessages { /// A fake [CrashReporter] that waits for a [Future] to complete. /// /// Used to exacerbate a race between the success and failure paths of -/// [runner.run]. See https://github.com/flutter/flutter/issues/56406. +/// [runner.run]. See https://github.com/flutter/flutter/issues/56406. class WaitingCrashReporter implements CrashReporter { WaitingCrashReporter(Future future) : _future = future; diff --git a/packages/flutter_tools/test/src/context.dart b/packages/flutter_tools/test/src/context.dart index bef96e1949..d292e99c36 100644 --- a/packages/flutter_tools/test/src/context.dart +++ b/packages/flutter_tools/test/src/context.dart @@ -154,7 +154,7 @@ void testUsingContext( ); }, overrides: { // This has to go here so that runInContext will pick it up when it tries - // to do bot detection before running the closure. This is important + // to do bot detection before running the closure. This is important // because the test may be giving us a fake HttpClientFactory, which may // throw in unexpected/abnormal ways. // If a test needs a BotDetector that does not always return true, it diff --git a/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart b/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart index cff0d833a7..200e0fb829 100644 --- a/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart +++ b/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart @@ -424,7 +424,7 @@ class FuchsiaRemoteConnection { }) async { if (!_dartVmCache.containsKey(uri)) { // When raising an HttpException this means that there is no instance of - // the Dart VM to communicate with. The TimeoutException is raised when + // the Dart VM to communicate with. The TimeoutException is raised when // the Dart VM instance is shut down in the middle of communicating. try { final DartVm dartVm = await DartVm.connect(uri, timeout: timeout);