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