Remove errant double spaces (#110758)

This commit is contained in:
Pierre-Louis 2022-09-02 06:00:58 +02:00 committed by GitHub
parent 1658cb5eb1
commit 0c2f7bc2a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
93 changed files with 155 additions and 154 deletions

View File

@ -181,7 +181,7 @@ Future<void> main() async {
/// Calculates the smoothness measure from `scrollOffset` and `delays` list. /// 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. /// 2nd derivative of the scroll offset.
/// ///
/// It was experimented that jerk (3rd derivative of the position) is a good /// It was experimented that jerk (3rd derivative of the position) is a good

View File

@ -24,7 +24,7 @@ void main() async {
watch.reset(); watch.reset();
watch.start(); watch.start();
for (int i = 0; i < _kBatchSize; i += 1) { 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 // other assets (like Rive animations). We are using an image because it's
// conveniently sized and available for the test. // conveniently sized and available for the test.
tally += (await bundle.load('packages/flutter_gallery_assets/places/india_pondicherry_salt_farm.png')).lengthInBytes; tally += (await bundle.load('packages/flutter_gallery_assets/places/india_pondicherry_salt_farm.png')).lengthInBytes;

View File

@ -8,7 +8,6 @@ import 'dart:math' as math;
import 'package:flutter/foundation.dart' show kDebugMode; import 'package:flutter/foundation.dart' show kDebugMode;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:microbenchmarks/common.dart'; import 'package:microbenchmarks/common.dart';
List<Object?> _makeTestBuffer(int size) { List<Object?> _makeTestBuffer(int size) {
@ -195,7 +194,7 @@ Future<void> _runTests() async {
); );
/// WARNING: Don't change the following line of code, it will invalidate /// 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. /// serialized is 14214 bytes.
final List<Object?> largeBuffer = _makeTestBuffer(1000); final List<Object?> largeBuffer = _makeTestBuffer(1000);
final ByteData largeBufferBytes = final ByteData largeBufferBytes =

View File

@ -443,7 +443,7 @@ class _SnippetChecker {
/// The directory for the dart:ui code to be analyzed with the flutter code. /// 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 /// defaults to the location inside of the flutter bin/cache directory that
/// contains the dart:ui code supplied by the engine. /// contains the dart:ui code supplied by the engine.
final Directory? _dartUiLocation; final Directory? _dartUiLocation;

View File

@ -185,7 +185,7 @@ typedef HttpReader = Future<Uint8List> Function(Uri url, {Map<String, String> he
/// Creates a pre-populated Flutter archive from a git repo. /// Creates a pre-populated Flutter archive from a git repo.
class ArchiveCreator { 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. /// 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 /// The processManager argument is used to inject a mock of [ProcessManager] for
@ -263,7 +263,7 @@ class ArchiveCreator {
/// platform we're running on. /// platform we're running on.
final Platform platform; 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; final Branch branch;
/// The git revision hash to build the archive for. This revision has /// The git revision hash to build the archive for. This revision has
@ -385,7 +385,7 @@ class ArchiveCreator {
/// git will give an error. /// git will give an error.
/// ///
/// If [strict] is true, the exact [revision] must be tagged to return the /// 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. /// [revision] to find the most recent version tag.
/// ///
/// The version found as a git tag is added to the information given by /// The version found as a git tag is added to the information given by

View File

@ -186,7 +186,7 @@ const Map<String, List<String>> kWebTestFileKnownFailures = <String, List<String
const String kTestHarnessShardName = 'test_harness_tests'; const String kTestHarnessShardName = 'test_harness_tests';
const List<String> _kAllBuildModes = <String>['debug', 'profile', 'release']; const List<String> _kAllBuildModes = <String>['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=<seed> on the command line, it will be set the // --test-randomize-ordering-seed=<seed> on the command line, it will be set the
// first time it is accessed. Pass zero to turn off shuffling. // first time it is accessed. Pass zero to turn off shuffling.
String? _shuffleSeed; String? _shuffleSeed;

View File

@ -429,7 +429,7 @@ Future<void> main(List<String> rawArguments) async {
'confirm', 'confirm',
help: 'If set, will actually remove the archive from Google Cloud Storage ' help: 'If set, will actually remove the archive from Google Cloud Storage '
'upon successful execution of this script. Published archives will be ' '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 ' 'must be set to perform any action on the server, otherwise only a dry '
'run is performed.', 'run is performed.',
); );
@ -479,7 +479,7 @@ Future<void> main(List<String> rawArguments) async {
} }
if (!(parsedArguments['confirm'] as bool)) { 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<String> channelArg = parsedArguments['channel'] as List<String>; final List<String> channelArg = parsedArguments['channel'] as List<String>;
@ -518,7 +518,7 @@ Future<void> main(List<String> rawArguments) async {
errorExit('$message\n$stack', exitCode: exitCode); errorExit('$message\n$stack', exitCode: exitCode);
} }
if (!(parsedArguments['confirm'] as bool)) { 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); exit(0);
} }

View File

@ -194,9 +194,9 @@ class _ChipDemoState extends State<ChipDemo> {
} }
// This converts a String to a unique color, based on the hash value of the // 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 // 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 // unique colors, but they'll all be readable, since they have the same
// saturation and value. // saturation and value.
Color _nameToColor(String name, ThemeData theme) { Color _nameToColor(String name, ThemeData theme) {

View File

@ -255,7 +255,7 @@ ArgParser _createArgsParser() {
help: 'Show command help.'); help: 'Show command help.');
parser.addFlag('verbose', defaultsTo: true, parser.addFlag('verbose', defaultsTo: true,
help: 'Whether to report all error messages (on) or attempt to ' 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.'); 'locally if you want to address Flutter-specific issues.');
parser.addFlag('checked', abbr: 'c', parser.addFlag('checked', abbr: 'c',
help: 'Run dartdoc in checked mode.'); help: 'Run dartdoc in checked mode.');

View File

@ -7,8 +7,8 @@ import 'dart:io';
const String registry = 'https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry'; 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 /// 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. /// run occasionally. It was created since iana.org was found to be flakey.
/// ///
/// To execute: dart gen_subtag_registry.dart > language_subtag_registry.dart /// To execute: dart gen_subtag_registry.dart > language_subtag_registry.dart
Future<void> main() async { Future<void> main() async {

View File

@ -71,7 +71,7 @@ class _FollowCurve2DState extends State<FollowCurve2D>
super.initState(); super.initState();
controller = AnimationController(duration: widget.duration, vsync: this); controller = AnimationController(duration: widget.duration, vsync: this);
animation = CurvedAnimation(parent: controller, curve: widget.curve); 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. // and forth, set the reverse parameter to true.
controller.repeat(); controller.repeat();
controller.addListener(() => setState(() {})); controller.addListener(() => setState(() {}));

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // 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'; import 'package:flutter/material.dart';

View File

@ -508,7 +508,7 @@ abstract class Curve2D extends ParametricCurve<Offset> {
double end = 1.0, double end = 1.0,
double tolerance = 1e-10, 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 // 1. Evaluate the area of the triangle (a proxy for the "flatness" of the
// curve) formed by two points and a test point. // curve) formed by two points and a test point.
// 2. If the area of the triangle is small enough (below tolerance), then // 2. If the area of the triangle is small enough (below tolerance), then
@ -675,7 +675,7 @@ class CatmullRomSpline extends Curve2D {
/// interpolate. /// interpolate.
/// ///
/// The internal curve data structures are lazily computed the first time /// 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. /// use [CatmullRomSpline.precompute] instead.
CatmullRomSpline( CatmullRomSpline(
List<Offset> controlPoints, { List<Offset> controlPoints, {
@ -851,7 +851,7 @@ class CatmullRomCurve extends Curve {
/// is equivalent to a linear interpolation between points. /// is equivalent to a linear interpolation between points.
/// ///
/// The internal curve data structures are lazily computed the first time /// 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. /// [CatmullRomCurve.precompute] instead.
/// ///
/// All of the arguments must not be null. /// All of the arguments must not be null.

View File

@ -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: // 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 // 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. // [_RenderCupertinoDialogActions] for the minimum height calculation.
// //
// With the minimum action button section calculated, the content section can // With the minimum action button section calculated, the content section can
@ -1335,7 +1335,7 @@ enum _AlertDialogSections {
// The "content section" of a CupertinoAlertDialog. // 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 // missing, then only title is added. If both are missing, then it returns
// a SingleChildScrollView with a zero-sized Container. // a SingleChildScrollView with a zero-sized Container.
class _CupertinoAlertContentSection extends StatelessWidget { class _CupertinoAlertContentSection extends StatelessWidget {
@ -2254,7 +2254,7 @@ class _RenderCupertinoDialogActions extends RenderBox
void _drawButtonBackgroundsAndDividersSingleRow(Canvas canvas, Offset offset) { void _drawButtonBackgroundsAndDividersSingleRow(Canvas canvas, Offset offset) {
// The vertical divider sits between the left button and right button (if // 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. // left or right button is pressed.
final Rect verticalDivider = childCount == 2 && !_isButtonPressed final Rect verticalDivider = childCount == 2 && !_isButtonPressed
? Rect.fromLTWH( ? Rect.fromLTWH(

View File

@ -187,14 +187,14 @@ class CupertinoIcons {
/// * [check_mark_circled], which is similar, but not filled in. /// * [check_mark_circled], which is similar, but not filled in.
static const IconData check_mark_circled_solid = IconData(0xf3ff, fontFamily: iconFont, fontPackage: iconFontPackage); static const IconData check_mark_circled_solid = IconData(0xf3ff, fontFamily: iconFont, fontPackage: iconFontPackage);
/// <i class='cupertino-icons md-36'>circle</i> &#x2014; Cupertino icon for an empty circle (a ring). An un-selected radio button. /// <i class='cupertino-icons md-36'>circle</i> &#x2014; Cupertino icon for an empty circle (a ring). An un-selected radio button.
/// ///
/// See also: /// See also:
/// ///
/// * [circle_filled], which is similar but filled in. /// * [circle_filled], which is similar but filled in.
static const IconData circle = IconData(0xf401, fontFamily: iconFont, fontPackage: iconFontPackage); static const IconData circle = IconData(0xf401, fontFamily: iconFont, fontPackage: iconFontPackage);
/// <i class='cupertino-icons md-36'>circle_fill</i> &#x2014; Cupertino icon for a filled circle. The circle is surrounded by a ring. A selected radio button. /// <i class='cupertino-icons md-36'>circle_fill</i> &#x2014; 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+. /// This is the same icon as [circle_fill] in cupertino_icons 1.0.0+.
/// ///
/// See also: /// See also:

View File

@ -66,8 +66,8 @@ class CupertinoPicker extends StatefulWidget {
/// the current picker index or for selecting an initial index value. /// the current picker index or for selecting an initial index value.
/// ///
/// The [looping] argument decides whether the child list loops and can be /// 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 /// 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 /// 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. /// stop scrolling when you reach the end or the beginning.
CupertinoPicker({ CupertinoPicker({
super.key, super.key,

View File

@ -3,6 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'bottom_tab_bar.dart'; import 'bottom_tab_bar.dart';
import 'colors.dart'; import 'colors.dart';
import 'theme.dart'; import 'theme.dart';
@ -457,7 +458,7 @@ class _TabSwitchingViewState extends State<_TabSwitchingView> {
_focusActiveTab(); _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. // not, then it will just mark it as the preferred focus for that scope.
void _focusActiveTab() { void _focusActiveTab() {
if (tabFocusNodes.length != widget.tabCount) { if (tabFocusNodes.length != widget.tabCount) {

View File

@ -6,6 +6,7 @@ import 'dart:convert' show json;
import 'dart:developer' as developer; import 'dart:developer' as developer;
import 'dart:io' show exit; import 'dart:io' show exit;
import 'dart:ui' as ui show Brightness, PlatformDispatcher, SingletonFlutterWindow, window; import 'dart:ui' as ui show Brightness, PlatformDispatcher, SingletonFlutterWindow, window;
// Before adding any more dart:ui imports, please read the README. // Before adding any more dart:ui imports, please read the README.
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
@ -178,8 +179,8 @@ abstract class BindingBase {
/// Each of these other bindings could individually access a /// Each of these other bindings could individually access a
/// [ui.SingletonFlutterWindow] statically, but that would preclude the /// [ui.SingletonFlutterWindow] statically, but that would preclude the
/// ability to test its behaviors with a fake window for verification /// ability to test its behaviors with a fake window for verification
/// purposes. Therefore, [BindingBase] exposes this /// purposes. Therefore, [BindingBase] exposes this
/// [ui.SingletonFlutterWindow] for use by other bindings. A subclass of /// [ui.SingletonFlutterWindow] for use by other bindings. A subclass of
/// [BindingBase], such as [TestWidgetsFlutterBinding], can override this /// [BindingBase], such as [TestWidgetsFlutterBinding], can override this
/// accessor to return a different [ui.SingletonFlutterWindow] implementation, /// accessor to return a different [ui.SingletonFlutterWindow] implementation,
/// such as a [TestWindow]. /// such as a [TestWindow].

View File

@ -485,7 +485,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
/// The shape of the app bar's [Material] as well as its shadow. /// The shape of the app bar's [Material] as well as its shadow.
/// ///
/// If this property is null, then [AppBarTheme.shape] of /// 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] /// If both properties are null then the shape of the app bar's [Material]
/// is just a simple rectangle. /// is just a simple rectangle.
/// ///
@ -561,7 +561,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
/// ///
/// The AppBar is built within a `AnnotatedRegion<SystemUiOverlayStyle>` /// The AppBar is built within a `AnnotatedRegion<SystemUiOverlayStyle>`
/// which causes [SystemChrome.setSystemUIOverlayStyle] to be called /// 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]. /// their own [AnnotatedRegion].
/// {@endtemplate} /// {@endtemplate}
/// ///
@ -780,7 +780,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
/// The AppBar's descendants are built within a /// The AppBar's descendants are built within a
/// `AnnotatedRegion<SystemUiOverlayStyle>` widget, which causes /// `AnnotatedRegion<SystemUiOverlayStyle>` widget, which causes
/// [SystemChrome.setSystemUIOverlayStyle] to be called /// [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]. /// own [AnnotatedRegion].
/// {@endtemplate} /// {@endtemplate}
// //

View File

@ -74,7 +74,7 @@ import 'theme_data.dart';
/// Configuring a ButtonStyle directly makes it possible to very /// Configuring a ButtonStyle directly makes it possible to very
/// precisely control the buttons visual attributes for all states. /// precisely control the buttons visual attributes for all states.
/// This level of control is typically required when a custom /// This level of control is typically required when a custom
/// branded look and feel is desirable. However, in many cases its /// branded look and feel is desirable. However, in many cases its
/// useful to make relatively sweeping changes based on a few initial /// useful to make relatively sweeping changes based on a few initial
/// parameters with simple values. The button styleFrom() methods /// parameters with simple values. The button styleFrom() methods
/// enable such sweeping changes. See for example: /// enable such sweeping changes. See for example:

View File

@ -2068,7 +2068,7 @@ class _RenderChip extends RenderBox with SlottedContainerRenderObjectMixin<_Chip
} }
// Set this to true to have outlines of the tap targets drawn over // 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; static const bool _debugShowTapTargetOutlines = false;
@override @override

View File

@ -869,7 +869,7 @@ class _DatePickerHeader extends StatelessWidget {
/// ///
/// * [helpText], the label displayed at the top of the dialog. /// * [helpText], the label displayed at the top of the dialog.
/// * [cancelText], the label on the cancel button for the text input mode. /// * [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 /// * [saveText], the label on the save button for the fullscreen calendar
/// mode. /// mode.
/// * [errorFormatText], the message used when an input text isn't in a proper /// * [errorFormatText], the message used when an input text isn't in a proper

View File

@ -922,7 +922,7 @@ class SimpleDialog extends StatelessWidget {
/// announce screen transitions when the dialog is opened and closed. /// announce screen transitions when the dialog is opened and closed.
/// ///
/// If this label is not provided, a semantic label will be inferred from the /// If this label is not provided, a semantic label will be inferred from the
/// [title] if it is not null. If there is no title, the label will be taken /// [title] if it is not null. If there is no title, the label will be taken
/// from [MaterialLocalizations.dialogLabel]. /// from [MaterialLocalizations.dialogLabel].
/// ///
/// See also: /// See also:

View File

@ -22,7 +22,7 @@ import 'theme_data.dart';
/// A Material Design "elevated button". /// A Material Design "elevated button".
/// ///
/// Use elevated buttons to add dimension to otherwise mostly flat /// 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 /// spaces. Avoid using elevated buttons on already-elevated content
/// such as dialogs or cards. /// such as dialogs or cards.
/// ///
@ -33,7 +33,7 @@ import 'theme_data.dart';
/// background is the [ButtonStyle.backgroundColor]. /// background is the [ButtonStyle.backgroundColor].
/// ///
/// The elevated button's default style is defined by /// 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 /// overridden with its [style] parameter. The style of all elevated
/// buttons in a subtree can be overridden with the /// buttons in a subtree can be overridden with the
/// [ElevatedButtonTheme], and the style of all of the elevated /// [ElevatedButtonTheme], and the style of all of the elevated

View File

@ -16,7 +16,7 @@ import 'theme.dart';
/// overall [Theme]'s [ThemeData.elevatedButtonTheme]. /// overall [Theme]'s [ThemeData.elevatedButtonTheme].
/// ///
/// The [style]'s properties override [ElevatedButton]'s default style, /// 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 /// the style's non-null property values or resolved non-null
/// [MaterialStateProperty] values are used. /// [MaterialStateProperty] values are used.
/// ///

View File

@ -415,7 +415,7 @@ class FlexibleSpaceBarSettings extends InheritedWidget {
/// ///
/// This value is used by the [AppBar] to resolve /// This value is used by the [AppBar] to resolve
/// [AppBar.backgroundColor] against [MaterialState.scrolledUnder], /// [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. /// has been scrolled up and behind the app bar.
/// ///
/// Null if the caller hasn't determined if the FlexibleSpaceBar /// Null if the caller hasn't determined if the FlexibleSpaceBar

View File

@ -62,7 +62,7 @@ enum _FloatingActionButtonType {
/// ///
/// {@tool dartpad} /// {@tool dartpad}
/// This example shows how to make an extended [FloatingActionButton] in a /// 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". /// [Text] label that reads "Approve".
/// ///
/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/floating_action_button_label.png) /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/floating_action_button_label.png)

View File

@ -501,7 +501,7 @@ class InkResponse extends StatelessWidget {
/// [MaterialState.pressed] triggers a ripple (an ink splash), per /// [MaterialState.pressed] triggers a ripple (an ink splash), per
/// the current Material Design spec. The [overlayColor] doesn't map /// the current Material Design spec. The [overlayColor] doesn't map
/// a state to [highlightColor] because a separate highlight is not /// 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 /// https://material.io/design/interaction/states.html#pressed
/// ///
/// If the overlay color is null or resolves to null, then [focusColor], /// If the overlay color is null or resolves to null, then [focusColor],

View File

@ -3124,7 +3124,7 @@ class InputDecoration {
final String? counterText; final String? counterText;
/// Optional custom counter widget to go in the place otherwise occupied by /// 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. /// ignored.
final Widget? counter; final Widget? counter;
@ -3317,7 +3317,7 @@ class InputDecoration {
/// If [border] derives from [InputBorder] the border's [InputBorder.borderSide], /// 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 /// 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] /// 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. /// [focusedBorder], [enabledBorder], [disabledBorder] must be set.
/// ///
/// The decoration's container is the area which is filled if [filled] is /// The decoration's container is the area which is filled if [filled] is

View File

@ -604,8 +604,8 @@ class _MaterialStateUnderlineInputBorder extends MaterialStateUnderlineInputBord
/// of [MaterialState]s. /// of [MaterialState]s.
/// ///
/// Material state properties represent values that depend on a widget's material /// Material state properties represent values that depend on a widget's material
/// "state". The state is encoded as a set of [MaterialState] values, like /// "state". The state is encoded as a set of [MaterialState] values, like
/// [MaterialState.focused], [MaterialState.hovered], [MaterialState.pressed]. For /// [MaterialState.focused], [MaterialState.hovered], [MaterialState.pressed]. For
/// example the [InkWell.overlayColor] defines the color that fills the ink well /// example the [InkWell.overlayColor] defines the color that fills the ink well
/// when it's pressed (the "splash color"), focused, or hovered. The [InkWell] /// 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 /// 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 /// [ButtonStyle], which is used to configure the appearance of
/// buttons like [TextButton], [ElevatedButton], and [OutlinedButton], /// 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 /// of their current material state and [resolve] the button style's
/// material state properties when their value is needed. /// material state properties when their value is needed.
/// ///

View File

@ -382,7 +382,7 @@ class _NavigationDestinationBuilder extends StatelessWidget {
/// Builds the label for an destination in a [NavigationBar]. /// Builds the label for an destination in a [NavigationBar].
/// ///
/// To animate between unselected and selected, build the icon based on /// 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 /// 0, the destination is unselected, when the animation is 1, the destination
/// is selected. /// is selected.
/// ///

View File

@ -30,7 +30,7 @@ import 'theme_data.dart';
/// elevation) [Material] widget. The label's [Text] and [Icon] /// elevation) [Material] widget. The label's [Text] and [Icon]
/// widgets are displayed in the [style]'s /// widgets are displayed in the [style]'s
/// [ButtonStyle.foregroundColor] and the outline's weight and color /// [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]. /// by filling with the [style]'s [ButtonStyle.overlayColor].
/// ///
/// The outlined button's default style is defined by [defaultStyleOf]. /// 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 /// Unlike [TextButton] or [ElevatedButton], outline buttons have a
/// default [ButtonStyle.side] which defines the appearance of the /// 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 /// unconditionally overrides the shape's [OutlinedBorder.side]. In
/// other words, to specify an outlined button's shape _and_ the /// other words, to specify an outlined button's shape _and_ the
/// appearance of its outline, both the [ButtonStyle.shape] and /// appearance of its outline, both the [ButtonStyle.shape] and

View File

@ -16,7 +16,7 @@ import 'theme.dart';
/// overall [Theme]'s [ThemeData.outlinedButtonTheme]. /// overall [Theme]'s [ThemeData.outlinedButtonTheme].
/// ///
/// The [style]'s properties override [OutlinedButton]'s default style, /// 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 /// the style's non-null property values or resolved non-null
/// [MaterialStateProperty] values are used. /// [MaterialStateProperty] values are used.
/// ///

View File

@ -114,7 +114,7 @@ class RangeSlider extends StatefulWidget {
/// the slider. To know when the value starts to change, or when it is done /// the slider. To know when the value starts to change, or when it is done
/// changing, set the optional callbacks [onChangeStart] and/or [onChangeEnd]. /// 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. /// slider.
/// * [onChanged], which is called while the user is selecting a new value for /// * [onChanged], which is called while the user is selecting a new value for
/// the range slider. /// the range slider.
@ -190,7 +190,7 @@ class RangeSlider extends StatefulWidget {
/// ///
/// See also: /// See also:
/// ///
/// * [onChangeStart], which is called when the user starts changing the /// * [onChangeStart], which is called when the user starts changing the
/// values. /// values.
/// * [onChangeEnd], which is called when the user stops changing the values. /// * [onChangeEnd], which is called when the user stops changing the values.
final ValueChanged<RangeValues>? onChanged; final ValueChanged<RangeValues>? onChanged;

View File

@ -2484,7 +2484,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
double get _floatingActionButtonVisibilityValue => _floatingActionButtonVisibilityController.value; double get _floatingActionButtonVisibilityValue => _floatingActionButtonVisibilityController.value;
/// Sets the current value of the visibility animation for the /// 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) { set _floatingActionButtonVisibilityValue(double newValue) {
assert(newValue != null); assert(newValue != null);
_floatingActionButtonVisibilityController.value = clampDouble(newValue, _floatingActionButtonVisibilityController.value = clampDouble(newValue,
@ -2522,7 +2522,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
// iOS FEATURES - status bar tap, back gesture // iOS FEATURES - status bar tap, back gesture
// On iOS, tapping the status bar scrolls the app's primary scrollable to the // 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. // scrolling it to the top when tapped.
void _handleStatusBarTap() { void _handleStatusBarTap() {
final ScrollController? primaryScrollController = PrimaryScrollController.of(context); final ScrollController? primaryScrollController = PrimaryScrollController.of(context);

View File

@ -1496,7 +1496,7 @@ mixin BaseSliderTrackShape {
/// [Slider]. /// [Slider].
/// ///
/// The width is the width of the [Slider] or [RangeSlider], but padded by /// 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]. /// [SliderThemeData.trackHeight].
/// ///
/// The [Rect] is centered both horizontally and vertically within the slider /// The [Rect] is centered both horizontally and vertically within the slider
@ -1706,7 +1706,7 @@ class RoundedRectSliderTrackShape extends SliderTrackShape with BaseSliderTrackS
assert(thumbCenter != null); assert(thumbCenter != null);
// If the slider [SliderThemeData.trackHeight] is less than or equal to 0, // If the slider [SliderThemeData.trackHeight] is less than or equal to 0,
// then it makes no difference whether the track is painted or not, // 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) { if (sliderTheme.trackHeight == null || sliderTheme.trackHeight! <= 0) {
return; return;
} }
@ -2331,7 +2331,7 @@ class _EmptySliderTickMarkShape extends SliderTickMarkShape {
/// that will not paint any component shape. A static reference is stored in /// that will not paint any component shape. A static reference is stored in
/// [SliderTickMarkShape.noThumb] and [SliderTickMarkShape.noOverlay]. When this value /// [SliderTickMarkShape.noThumb] and [SliderTickMarkShape.noOverlay]. When this value
/// is specified for [SliderThemeData.thumbShape], the thumb painting is /// 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. /// the overlay painting is skipped.
class _EmptySliderComponentShape extends SliderComponentShape { class _EmptySliderComponentShape extends SliderComponentShape {
@override @override
@ -3261,7 +3261,7 @@ class _PaddleSliderValueIndicatorPathPainter {
0, 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. // the label exceeds the minimum size contained by the round top lobe.
final double halfWidthNeeded = math.max( final double halfWidthNeeded = math.max(
0.0, 0.0,

View File

@ -98,7 +98,7 @@ class Tab extends StatelessWidget implements PreferredSizeWidget {
/// The height of the [Tab]. /// 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 /// null along with `child` or `text`, the default height is 72.0 pixels. Without an `icon`, the
/// height is 46.0 pixels. /// height is 46.0 pixels.
final double? height; final double? height;

View File

@ -16,7 +16,7 @@ import 'theme.dart';
/// overall [Theme]'s [ThemeData.textButtonTheme]. /// overall [Theme]'s [ThemeData.textButtonTheme].
/// ///
/// The [style]'s properties override [TextButton]'s default style, /// 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 /// the style's non-null property values or resolved non-null
/// [MaterialStateProperty] values are used. /// [MaterialStateProperty] values are used.
/// ///

View File

@ -36,7 +36,7 @@ typedef InputCounterWidgetBuilder = Widget? Function(
required int currentLength, required int currentLength,
/// The maximum string length that can be entered into the TextField. /// The maximum string length that can be entered into the TextField.
required int? maxLength, 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. /// the [liveRegion] parameter in the [Semantics] widget for accessibility.
required bool isFocused, required bool isFocused,
}); });
@ -246,7 +246,7 @@ class TextField extends StatefulWidget {
/// [maxLength] is set a character counter will be displayed below the /// [maxLength] is set a character counter will be displayed below the
/// field showing how many characters have been entered. If the value is /// field showing how many characters have been entered. If the value is
/// set to a positive integer it will also display the maximum allowed /// 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. /// [TextField.noMaxLength] then only the current length is displayed.
/// ///
/// After [maxLength] characters have been input, additional input /// 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 - /// On Android, the user can hide the keyboard - without changing the focus -
/// with the system back button. They can restore the keyboard's visibility /// 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 /// 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 /// out of the way for a moment, to expose something it's
/// obscuring. In this case requesting the focus again will not /// 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. /// Callback that generates a custom [InputDecoration.counter] widget.
/// ///
/// See [InputCounterWidgetBuilder] for an explanation of the passed in /// 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 default widget built when [InputDecoration.counterText] is specified.
/// ///
/// The returned widget will be wrapped in a [Semantics] widget for /// The returned widget will be wrapped in a [Semantics] widget for

View File

@ -49,7 +49,7 @@ enum ScriptCategory {
/// [MaterialLocalizations.scriptCategory] and is created /// [MaterialLocalizations.scriptCategory] and is created
/// by merging a color text theme - [black] for /// by merging a color text theme - [black] for
/// [Brightness.light] themes and [white] for [Brightness.dark] /// [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. /// or [tall], depending on the locale.
/// ///
/// To lookup the localized text theme use /// To lookup the localized text theme use

View File

@ -579,7 +579,7 @@ class LinearGradient extends Gradient {
/// which will make the rendered gradient appear to be pointed or directed in the /// 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] /// 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 /// 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, /// [center] both resolve to [Offset.zero] when [focalRadius] > 0.0. In such a case,
/// a valid shader cannot be created by the framework. /// 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) /// ![](https://flutter.github.io/assets-for-api-docs/assets/dart-ui/tile_mode_repeated_radialWithFocal.png)
final TileMode tileMode; 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. /// to be focused along the vector from [center] to focal.
/// ///
/// See [center] for a description of how the coordinates are mapped. /// See [center] for a description of how the coordinates are mapped.

View File

@ -68,7 +68,7 @@ class InlineSpanSemanticsInformation {
/// The text info for a [PlaceholderSpan]. /// The text info for a [PlaceholderSpan].
static const InlineSpanSemanticsInformation placeholder = InlineSpanSemanticsInformation('\uFFFC', isPlaceholder: true); 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. /// placeholder value.
final String text; final String text;
@ -280,7 +280,7 @@ abstract class InlineSpan extends DiagnosticableTree {
/// Walks the [InlineSpan] tree and accumulates a list of /// Walks the [InlineSpan] tree and accumulates a list of
/// [InlineSpanSemanticsInformation] objects. /// [InlineSpanSemanticsInformation] objects.
/// ///
/// This method should not be directly called. Use /// This method should not be directly called. Use
/// [getSemanticsInformation] instead. /// [getSemanticsInformation] instead.
/// ///
/// [PlaceholderSpan]s in the tree will be represented with a /// [PlaceholderSpan]s in the tree will be represented with a

View File

@ -245,7 +245,7 @@ class MatrixUtils {
// since we know that Z=0.0. We can also get rid of the 3rd row because // 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 // 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 // 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 // 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 // the perspective case. (Plus the 12 comparisons to turn them back into
// a bounding box.) // a bounding box.)
@ -282,7 +282,7 @@ class MatrixUtils {
// continue to hold with respect to the non-normalized coordinates so // continue to hold with respect to the non-normalized coordinates so
// we can still save a lot of multiplications by computing the 4 // we can still save a lot of multiplications by computing the 4
// non-normalized coordinates using relative additions before we normalize // 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 // 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 // get the resulting transformed bounding box, but we save a lot of
// calculations over blindly transforming all 4 coordinates independently. // 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. // 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 // 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 // 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 // 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 // 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). // perspective case (depending on which test fails, the rest are omitted).
// //

View File

@ -772,16 +772,16 @@ class TextStyle with Diagnosticable {
/// A list of [FontFeature]s that affect how the font selects glyphs. /// A list of [FontFeature]s that affect how the font selects glyphs.
/// ///
/// Some fonts support multiple variants of how a given character can be /// 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 /// 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. /// these variants will be used for rendering.
final List<ui.FontFeature>? fontFeatures; final List<ui.FontFeature>? fontFeatures;
/// A list of [FontVariation]s that affect how a variable font is rendered. /// 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 /// 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. /// 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. /// [FontVariation]s can be used to select the values of these design axes.
/// ///

View File

@ -297,7 +297,7 @@ class MouseTracker extends ChangeNotifier {
/// result. /// result.
/// ///
/// The [updateWithEvent] indicates that an event has been observed, and is /// 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 /// [RendererBinding], and should be called with all events received, and let
/// [MouseTracker] filter which to react to. /// [MouseTracker] filter which to react to.
/// ///

View File

@ -732,7 +732,7 @@ mixin _PlatformViewGestureMixin on RenderBox implements MouseTrackerAnnotation {
_HandlePointerEvent? _handlePointerEvent; _HandlePointerEvent? _handlePointerEvent;
/// {@macro flutter.rendering.RenderAndroidView.updateGestureRecognizers} /// {@macro flutter.rendering.RenderAndroidView.updateGestureRecognizers}
/// ///
/// Any active gesture arena the `PlatformView` participates in is rejected when the /// Any active gesture arena the `PlatformView` participates in is rejected when the
/// set of gesture recognizers is changed. /// set of gesture recognizers is changed.

View File

@ -353,7 +353,7 @@ typedef KeyEventCallback = bool Function(KeyEvent event);
/// ## Compared to [RawKeyboard] /// ## Compared to [RawKeyboard]
/// ///
/// [RawKeyboard] is the legacy API, and will be deprecated and removed in the /// [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. /// APIs (such as [FocusNode.onKeyEvent]) to handle key events.
/// ///
/// Behavior-wise, [RawKeyboard] provides a less unified, less regular /// 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. /// The list of [KeyEvent]s converted from the native key message.
/// ///
/// A native key message is converted into multiple [KeyEvent]s in a regular /// 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. /// [KeyEvent]s.
/// ///
/// See also: /// See also:

View File

@ -3,6 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
import 'dart:io'; import 'dart:io';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'binding.dart'; import 'binding.dart';
@ -88,7 +89,7 @@ enum ModifierKey {
/// The SCROLL LOCK modifier key. /// 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 /// 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. /// when it's enabled, and on a key down when it is turned off.
scrollLockModifier, scrollLockModifier,
@ -568,7 +569,7 @@ class RawKeyUpEvent extends RawKeyEvent {
/// a handler that can determine if the key has been handled or not. /// 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 /// 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); typedef RawKeyEventHandler = bool Function(RawKeyEvent event);
/// An interface for listening to raw key events. /// An interface for listening to raw key events.

View File

@ -199,7 +199,7 @@ class TextSelection extends TextRange {
/// ## Difference with [extendTo] /// ## Difference with [extendTo]
/// In contrast with this method, [extendTo] is a pivot; it holds /// In contrast with this method, [extendTo] is a pivot; it holds
/// [TextSelection.baseOffset] fixed while moving [TextSelection.extentOffset] /// [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. /// may collapse it or flip its order.
TextSelection expandTo(TextPosition position, [bool extentAtIndex = false]) { TextSelection expandTo(TextPosition position, [bool extentAtIndex = false]) {
// If position is already within in the selection, there's nothing to do. // If position is already within in the selection, there's nothing to do.

View File

@ -278,7 +278,7 @@ class WidgetsApp extends StatefulWidget {
/// ``` /// ```
/// ///
/// It is possible to specify both [home] and [routes], but only if [routes] does /// 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 `'/'`. /// _must_ contain an entry for `'/'`.
/// ///
/// If [home] or [routes] are not null, the routing implementation needs to know how /// 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 /// [onGenerateRoute] and [onUnknownRoute] parameters. These parameters correspond
/// to [Navigator.onGenerateRoute] and [Navigator.onUnknownRoute]. If [home], [routes], /// to [Navigator.onGenerateRoute] and [Navigator.onUnknownRoute]. If [home], [routes],
/// and [builder] are null, or if they fail to create a requested route, /// 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. /// 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 /// If the [builder] is non-null and the [onGenerateRoute] argument is null, then the

View File

@ -82,7 +82,7 @@ export 'package:flutter/services.dart' show
// BIDIRECTIONAL TEXT SUPPORT // BIDIRECTIONAL TEXT SUPPORT
/// An [InheritedElement] that has hundreds of dependencies but will /// 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. /// the [Widget]s is faster but performing updates is slower.
/// ///
/// | | _UbiquitiousInheritedElement | InheritedElement | /// | | _UbiquitiousInheritedElement | InheritedElement |
@ -101,7 +101,7 @@ class _UbiquitousInheritedElement extends InheritedElement {
@override @override
void setDependencies(Element dependent, Object? value) { void setDependencies(Element dependent, Object? value) {
// This is where the cost of [InheritedElement] is incurred during build // 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. // performance savings come from.
assert(value == null); assert(value == null);
} }
@ -3411,7 +3411,7 @@ class IntrinsicWidth extends SingleChildRenderObjectWidget {
/// See also: /// See also:
/// ///
/// * [RenderBox.getMaxIntrinsicWidth], which defines a widget's max /// * [RenderBox.getMaxIntrinsicWidth], which defines a widget's max
/// intrinsic width in general. /// intrinsic width in general.
final double? stepWidth; final double? stepWidth;
/// If non-null, force the child's height to be a multiple of this value. /// If non-null, force the child's height to be a multiple of this value.

View File

@ -311,7 +311,7 @@ class Draggable<T extends Object> extends StatefulWidget {
/// the semantics tree. /// the semantics tree.
/// ///
/// This value should be set to false when the [feedback] widget is intended /// 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 /// widget will ensure semantic focus is kept on the element as it moves in
/// and out of the feedback position. /// and out of the feedback position.
/// ///

View File

@ -424,8 +424,8 @@ class DraggableScrollableNotification extends Notification with ViewportNotifica
/// Creates a notification that the extent of a [DraggableScrollableSheet] has /// Creates a notification that the extent of a [DraggableScrollableSheet] has
/// changed. /// changed.
/// ///
/// All parameters are required. The [minExtent] must be >= 0. The [maxExtent] /// All parameters are required. The [minExtent] must be >= 0. The [maxExtent]
/// must be <= 1.0. The [extent] must be between [minExtent] and [maxExtent]. /// must be <= 1.0. The [extent] must be between [minExtent] and [maxExtent].
DraggableScrollableNotification({ DraggableScrollableNotification({
required this.extent, required this.extent,
required this.minExtent, required this.minExtent,

View File

@ -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])** | /// | **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. | /// | [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. | /// | [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. | /// | [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 .| /// | [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. | /// | [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. | /// | [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 /// #### Intents for Extending the Selection
/// ///

View File

@ -452,7 +452,7 @@ class FocusNode with DiagnosticableTreeMixin, ChangeNotifier {
/// If true, this focus node may request the primary focus. /// 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. /// [requestFocus] is called on it.
/// ///
/// If set to false on a [FocusScopeNode], will cause all of the children of /// 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; handled = false;
break; 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. // options will stop the event propagation.
assert(result != KeyEventResult.ignored); assert(result != KeyEventResult.ignored);
break; break;

View File

@ -234,7 +234,7 @@ class Focus extends StatefulWidget {
/// {@template flutter.widgets.Focus.canRequestFocus} /// {@template flutter.widgets.Focus.canRequestFocus}
/// If true, this widget may request the primary focus. /// 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 /// manages to do nothing when [FocusNode.requestFocus] is called on it. Does
/// not affect the children of this node, and [FocusNode.hasFocus] can still /// not affect the children of this node, and [FocusNode.hasFocus] can still
/// return true if this node is the ancestor of the primary focus. /// return true if this node is the ancestor of the primary focus.

View File

@ -1347,7 +1347,7 @@ class OrderedTraversalPolicy extends FocusTraversalPolicy with DirectionalFocusT
a.order.runtimeType == b.order.runtimeType, a.order.runtimeType == b.order.runtimeType,
'When sorting nodes for determining focus order, the order (${a.order}) of ' '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}. " "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.', 'similar orders together.',
); );
return a.order.compareTo(b.order); return a.order.compareTo(b.order);
@ -1442,7 +1442,7 @@ class FocusTraversalOrder extends InheritedWidget {
/// {@tool dartpad} /// {@tool dartpad}
/// This sample shows three rows of buttons, each grouped by a /// This sample shows three rows of buttons, each grouped by a
/// [FocusTraversalGroup], each with different traversal order policies. Use tab /// [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 /// 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 /// right to left), and the third ignores the numerical order assigned to it and
/// traverses in widget order. /// traverses in widget order.

View File

@ -32,7 +32,7 @@ export 'package:flutter/services.dart' show KeyEvent;
/// * [RawKeyboardListener], a similar widget based on the old [RawKeyboard] /// * [RawKeyboardListener], a similar widget based on the old [RawKeyboard]
/// API. /// API.
class KeyboardListener extends StatelessWidget { 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 /// For text entry, consider using a [EditableText], which integrates with
/// on-screen keyboards and input method editors (IMEs). /// on-screen keyboards and input method editors (IMEs).

View File

@ -624,12 +624,12 @@ class NavigatorObserver {
NavigatorState? get navigator => _navigators[this]; NavigatorState? get navigator => _navigators[this];
/// Expando mapping instances of NavigatorObserver to their associated /// 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 /// reason we don't simply use a private instance field of type
/// `NavigatorState?` is because as part of implementing /// `NavigatorState?` is because as part of implementing
/// https://github.com/dart-lang/language/issues/2020, it will soon become a /// 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 /// 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 /// that a mocked NavigatorObserver can still properly keep track of its
/// associated NavigatorState. /// associated NavigatorState.
static final Expando<NavigatorState> _navigators = Expando<NavigatorState>(); static final Expando<NavigatorState> _navigators = Expando<NavigatorState>();

View File

@ -33,7 +33,7 @@ enum OverflowBarAlignment {
/// ///
/// This widget's width will expand to contain its children and the /// This widget's width will expand to contain its children and the
/// specified [spacing] until it overflows. The overflow column will /// 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 /// defines how each child will be aligned within the overflow column
/// and the [overflowSpacing] defines the gap between each child. /// and the [overflowSpacing] defines the gap between each child.
/// ///

View File

@ -1060,7 +1060,7 @@ class ChildBackButtonDispatcher extends BackButtonDispatcher {
final BackButtonDispatcher parent; final BackButtonDispatcher parent;
/// The parent of this child back button dispatcher decide to let this /// 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]. /// [BackButtonDispatcher.invokeCallback].
/// ///
/// Return a boolean future with true if this child will handle the request; /// Return a boolean future with true if this child will handle the request;

View File

@ -419,7 +419,7 @@ abstract class TransitionRoute<T> extends OverlayRoute<T> {
/// ///
/// If true, and `nextRoute.canTransitionFrom()` is true, then the /// If true, and `nextRoute.canTransitionFrom()` is true, then the
/// [ModalRoute.buildTransitions] `secondaryAnimation` will run from 0.0 - 1.0 /// [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 /// the [nextRoute] is popped off of this route, the
/// `secondaryAnimation` will run from 1.0 - 0.0. /// `secondaryAnimation` will run from 1.0 - 0.0.
/// ///

View File

@ -48,7 +48,7 @@ abstract class ScrollActivityDelegate {
/// given velocity. /// given velocity.
void goBallistic(double 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 result of a layout change after a flinging gesture.
/// ///
/// The [initVelocity] and [initPosition] refer to the starting values of the /// The [initVelocity] and [initPosition] refer to the starting values of the

View File

@ -102,7 +102,7 @@ class ScrollAwareImageProvider<T extends Object> extends ImageProvider<T> {
return; return;
} }
// We are in the tree, we're not scrolling too fast, the cache doesn't // 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); imageProvider.resolveStreamForKey(configuration, stream, key, handleError);
} }

View File

@ -863,7 +863,7 @@ class ScrollbarPainter extends ChangeNotifier implements CustomPainter {
/// If the child [ScrollView] is infinitely long, the [RawScrollbar] will not be /// If the child [ScrollView] is infinitely long, the [RawScrollbar] will not be
/// painted. In this case, the scrollbar cannot accurately represent the /// painted. In this case, the scrollbar cannot accurately represent the
/// relative location of the visible area, or calculate the accurate delta to /// 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 /// ### Interaction
/// ///
@ -1134,7 +1134,7 @@ class RawScrollbar extends StatefulWidget {
/// controller: controllerOne, /// controller: controllerOne,
/// itemCount: 120, /// itemCount: 120,
/// itemBuilder: (BuildContext context, int index) { /// itemBuilder: (BuildContext context, int index) {
/// return Text('item $index'); /// return Text('item $index');
/// }, /// },
/// ), /// ),
/// ), /// ),
@ -1219,7 +1219,7 @@ class RawScrollbar extends StatefulWidget {
/// controller: controllerOne, /// controller: controllerOne,
/// itemCount: 120, /// itemCount: 120,
/// itemBuilder: (BuildContext context, int index) { /// itemBuilder: (BuildContext context, int index) {
/// return Text('item $index'); /// return Text('item $index');
/// }, /// },
/// ), /// ),
/// ), /// ),

View File

@ -65,7 +65,7 @@ class KeySet<T extends KeyboardKey> {
assert(_keys.length == count, 'Two or more provided keys are identical. Each key must appear only once.'); 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. /// Do not mutate the `keys` set after passing it to this object.
/// ///
@ -272,7 +272,7 @@ class LogicalKeySet extends KeySet<LogicalKeyboardKey> with Diagnosticable
super.key4, 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. /// Do not mutate the `keys` set after passing it to this object.
LogicalKeySet.fromSet(super.keys) : super.fromSet(); LogicalKeySet.fromSet(super.keys) : super.fromSet();

View File

@ -318,7 +318,7 @@ class _RenderSnapshotWidget extends RenderProxyBox {
/// would be a snapshot. /// would be a snapshot.
/// ///
/// The painter can call [notifyListeners] to have the [SnapshotWidget] /// 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 /// without re-snapshotting of children. For certain scale or perspective changing
/// transforms, such as a rotation, this can be significantly faster than performing /// transforms, such as a rotation, this can be significantly faster than performing
/// the same animation at the widget level. /// the same animation at the widget level.

View File

@ -99,7 +99,7 @@ abstract class DirectionalCaretMovementIntent extends DirectionalTextEditingInte
/// ///
/// If true, when an [Intent] to go to the beginning/end of a wordwrapped line /// 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, /// 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. /// selection will remain at the wordwrap.
final bool continuesAtWrap; final bool continuesAtWrap;
} }

View File

@ -34,7 +34,7 @@ import 'gesture_detector.dart';
/// [WidgetInspector.selectButtonBuilder]. /// [WidgetInspector.selectButtonBuilder].
typedef InspectorSelectButtonBuilder = Widget Function(BuildContext context, VoidCallback onPressed); 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`. /// the given `name`.
/// ///
/// Used as argument to [WidgetInspectorService.initServiceExtensions]. The /// Used as argument to [WidgetInspectorService.initServiceExtensions]. The

View File

@ -48,7 +48,7 @@ RenderParagraph _getTextRenderObjectFromDialog(WidgetTester tester, String text)
// What was the AlertDialog's ButtonBar when many of these tests were written, // 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 // 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() { Finder _findButtonBar() {
return find.ancestor(of: find.byType(OverflowBar), matching: find.byType(Padding)).first; return find.ancestor(of: find.byType(OverflowBar), matching: find.byType(Padding)).first;
} }

View File

@ -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: // is 100x100 and the rest of the elements only require 40dps:
// 12 - top padding // 12 - top padding
// 16 - input text (ahem font size 16dps) // 16 - input text (ahem font size 16dps)

View File

@ -1143,7 +1143,7 @@ void main() {
); );
// Since the rail is icon only, its preferred width should not be affected // 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)); final RenderBox renderBox = tester.renderObject(find.byType(NavigationRail));
expect(renderBox.size.width, compactWidth); expect(renderBox.size.width, compactWidth);
@ -1221,7 +1221,7 @@ void main() {
); );
// Since the rail is icon only, its preferred width should not be affected // 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)); final RenderBox renderBox = tester.renderObject(find.byType(NavigationRail));
expect(renderBox.size.width, compactWidth); expect(renderBox.size.width, compactWidth);
@ -3603,7 +3603,7 @@ void main() {
); );
// Since the rail is icon only, its preferred width should not be affected // 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)); final RenderBox renderBox = tester.renderObject(find.byType(NavigationRail));
expect(renderBox.size.width, 56.0); 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 // 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)); final RenderBox renderBox = tester.renderObject(find.byType(NavigationRail));
expect(renderBox.size.width, 56.0); expect(renderBox.size.width, 56.0);

View File

@ -2062,7 +2062,7 @@ void main() {
await tester.pumpWidget(buildFrame(false, false)); await tester.pumpWidget(buildFrame(false, false));
expect(tester.getSize(find.byKey(bodyKey)), const Size(800.0, 600.0)); 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)); expect(tester.getSize(find.byKey(bodyKey)), const Size(800.0, 500.0));
await tester.pumpWidget(buildFrame(null, false)); await tester.pumpWidget(buildFrame(null, false));

View File

@ -840,7 +840,7 @@ void main() {
}); });
testWidgets('pushReplacement correctly reports didReplace to the observer', (WidgetTester tester) async { 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<String, WidgetBuilder> routes = <String, WidgetBuilder>{ final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
'/' : (BuildContext context) => const OnTapPage( '/' : (BuildContext context) => const OnTapPage(
id: '/', id: '/',

View File

@ -2216,7 +2216,7 @@ void main() {
await tester.drag(find.text('Item 49'), const Offset(0.0, -50.0)); await tester.drag(find.text('Item 49'), const Offset(0.0, -50.0));
await tester.pump(); await tester.pump();
// If handled correctly, the last item should still be visible and // 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. // up the list and out of view.
expect(find.text('Item 49'), findsOneWidget); expect(find.text('Item 49'), findsOneWidget);
await tester.pumpAndSettle(); await tester.pumpAndSettle();

View File

@ -102,7 +102,7 @@ class AnimationSheetBuilder {
/// subtree of [record]. /// subtree of [record].
/// ///
/// If [allLayers] is false, then the [record] widget will capture the image /// 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. /// capture the entire tree composited and clipped by [record]'s region.
/// ///
/// The two modes are identical if there is nothing in front of [record]. /// The two modes are identical if there is nothing in front of [record].

View File

@ -722,7 +722,7 @@ class KeyEventSimulator {
// its values. // its values.
// //
// The `_transitMode` defaults to [KeyDataTransitMode.rawKeyEvent], and can be // 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]. // is often set with [KeySimulationModeVariant].
static KeyDataTransitMode get _transitMode { static KeyDataTransitMode get _transitMode {
KeyDataTransitMode? result; KeyDataTransitMode? result;

View File

@ -500,7 +500,7 @@ AsyncMatcher matchesReferenceImage(ui.Image image) {
/// Asserts that a [SemanticsNode] contains the specified information. /// Asserts that a [SemanticsNode] contains the specified information.
/// ///
/// If either the label, hint, value, textDirection, or rect fields are not /// 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. /// flag and action fields must match, and default to false.
/// ///
/// To retrieve the semantics data of a widget, use [WidgetTester.getSemantics] /// To retrieve the semantics data of a widget, use [WidgetTester.getSemantics]

View File

@ -62,12 +62,12 @@ Future<int> run(
await runner.run(args); await runner.run(args);
// Triggering [runZoned]'s error callback does not necessarily mean that // 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) { if (firstError == null) {
return await _exit(0); 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(). // (which should be in progress) is responsible for calling _exit().
return 1; return 1;
} catch (error, stackTrace) { // ignore: avoid_catches_without_on_clauses } catch (error, stackTrace) { // ignore: avoid_catches_without_on_clauses

View File

@ -20,7 +20,6 @@ import '../device.dart';
import '../device_port_forwarder.dart'; import '../device_port_forwarder.dart';
import '../project.dart'; import '../project.dart';
import '../protocol_discovery.dart'; import '../protocol_discovery.dart';
import 'android.dart'; import 'android.dart';
import 'android_builder.dart'; import 'android_builder.dart';
import 'android_console.dart'; import 'android_console.dart';
@ -313,7 +312,7 @@ class AndroidDevice extends Device {
try { try {
// If the server is automatically restarted, then we get irrelevant // If the server is automatically restarted, then we get irrelevant
// output lines like this, which we want to ignore: // 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 * // * daemon started successfully *
await _processUtils.run( await _processUtils.run(
<String>[adbPath, 'start-server'], <String>[adbPath, 'start-server'],

View File

@ -270,7 +270,7 @@ class ManifestAssetBundle implements AssetBundle {
return 1; return 1;
} }
// Parse assets for deferred components. // Parse assets for deferred components.
final Map<String, Map<_Asset, List<_Asset>>> deferredComponentsAssetVariants = _parseDeferredComponentsAssets( final Map<String, Map<_Asset, List<_Asset>>> deferredComponentsAssetVariants = _parseDeferredComponentsAssets(
flutterManifest, flutterManifest,
packageConfig, packageConfig,

View File

@ -1198,7 +1198,7 @@ class SilentStatus extends Status {
const int _kTimePadding = 8; // should fit "99,999ms" 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. /// [onFinish]. On [stop], will additionally print out summary information.
class SummaryStatus extends Status { class SummaryStatus extends Status {
SummaryStatus({ SummaryStatus({

View File

@ -115,8 +115,8 @@ class UserMessages {
'You can download the JDK from https://www.oracle.com/technetwork/java/javase/downloads/.'; 'You can download the JDK from https://www.oracle.com/technetwork/java/javase/downloads/.';
String androidJdkLocation(String location) => 'Java binary at: $location'; String androidJdkLocation(String location) => 'Java binary at: $location';
String get androidLicensesAll => 'All Android licenses accepted.'; 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 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 androidLicensesNone => 'Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses';
String androidLicensesUnknown(Platform platform) => String androidLicensesUnknown(Platform platform) =>
'Android license status unknown.\n' 'Android license status unknown.\n'
'Run `flutter doctor --android-licenses` to accept the SDK licenses.\n' 'Run `flutter doctor --android-licenses` to accept the SDK licenses.\n'

View File

@ -84,7 +84,7 @@ enum FileStoreStrategy {
/// through this class. /// through this class.
/// ///
/// This class uses either timestamps or file hashes depending on the /// 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 /// a build operation, and may be persisted to cache in the root build
/// directory. /// directory.
/// ///

View File

@ -166,7 +166,7 @@ Future<void> writeBundle(
try { try {
// This will result in strange looking files, for example files with `/` // This will result in strange looking files, for example files with `/`
// on Windows or files that end up getting URI encoded such as `#.ext` // 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, // platform channels in the framework will URI encode these values,
// and the native APIs will look for files this way. // and the native APIs will look for files this way.
final File file = globals.fs.file(globals.fs.path.join(bundleDir.path, entry.key)); final File file = globals.fs.file(globals.fs.path.join(bundleDir.path, entry.key));

View File

@ -644,7 +644,7 @@ Your $application code is in $relativeAppMain.
} }
// Takes an application template and replaces the main.dart with one from the // 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 // 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). // test directory (since the template's test doesn't apply to the sample).
int _applySample(Directory directory, String sampleCode) { int _applySample(Directory directory, String sampleCode) {

View File

@ -704,7 +704,7 @@ class IOSDeviceLogReader extends DeviceLogReader {
void logMessage(vm_service.Event event) { void logMessage(vm_service.Event event) {
if (_iosDeployDebugger != null && _iosDeployDebugger!.debuggerAttached) { if (_iosDeployDebugger != null && _iosDeployDebugger!.debuggerAttached) {
// Prefer the more complete logs from the attached debugger. // Prefer the more complete logs from the attached debugger.
return; return;
} }
final String message = processVmServiceMessage(event); final String message = processVmServiceMessage(event);

View File

@ -41,7 +41,7 @@ class MDnsObservatoryDiscovery {
/// Executes an mDNS query for a Dart Observatory. /// Executes an mDNS query for a Dart Observatory.
/// ///
/// The [applicationId] parameter may be used to specify which application /// 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. /// the bundle ID.
/// ///
/// If it is not null, this method will find the port and authentication code /// If it is not null, this method will find the port and authentication code

View File

@ -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 /// 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 /// replacing the cached artifacts. Typically this is done by setting the
/// `--local-engine` command line flag to the name of the desired engine variant /// `--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 /// are located adjacent to one another, the output folder will be located
/// automatically. /// automatically.
/// ///

View File

@ -327,7 +327,7 @@ class FlutterVersion {
} }
/// log.showSignature=false is a user setting and it will break things, /// 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. /// wrapper that does that.
@visibleForTesting @visibleForTesting
static List<String> gitLog(List<String> args) { static List<String> gitLog(List<String> args) {

View File

@ -34,7 +34,7 @@ void main() {
// Instead of exiting with dart:io exit(), this causes an exception to // 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. // 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. // cause the VM to terminate immediately, so only the first one matters.
firstExitCode = null; firstExitCode = null;
io.setExitFunctionForTests((int exitCode) { io.setExitFunctionForTests((int exitCode) {
@ -102,7 +102,7 @@ void main() {
// This Completer completes when CrashingFlutterCommand.runCommand // This Completer completes when CrashingFlutterCommand.runCommand
// completes, but ideally we'd want it to complete when execution resumes // 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 // does, this test might fail to catch a regression of
// https://github.com/flutter/flutter/issues/56406. // https://github.com/flutter/flutter/issues/56406.
final Completer<void> commandCompleter = Completer<void>(); final Completer<void> commandCompleter = Completer<void>();
@ -338,7 +338,7 @@ class CustomBugInstructions extends UserMessages {
/// A fake [CrashReporter] that waits for a [Future] to complete. /// A fake [CrashReporter] that waits for a [Future] to complete.
/// ///
/// Used to exacerbate a race between the success and failure paths of /// 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 { class WaitingCrashReporter implements CrashReporter {
WaitingCrashReporter(Future<void> future) : _future = future; WaitingCrashReporter(Future<void> future) : _future = future;

View File

@ -154,7 +154,7 @@ void testUsingContext(
); );
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
// This has to go here so that runInContext will pick it up when it tries // 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 // because the test may be giving us a fake HttpClientFactory, which may
// throw in unexpected/abnormal ways. // throw in unexpected/abnormal ways.
// If a test needs a BotDetector that does not always return true, it // If a test needs a BotDetector that does not always return true, it

View File

@ -424,7 +424,7 @@ class FuchsiaRemoteConnection {
}) async { }) async {
if (!_dartVmCache.containsKey(uri)) { if (!_dartVmCache.containsKey(uri)) {
// When raising an HttpException this means that there is no instance of // 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. // the Dart VM instance is shut down in the middle of communicating.
try { try {
final DartVm dartVm = await DartVm.connect(uri, timeout: timeout); final DartVm dartVm = await DartVm.connect(uri, timeout: timeout);