Fixed large amount of spelling errors (#83744)
This commit is contained in:
parent
9a243a1213
commit
c99ed373b3
@ -23,7 +23,7 @@ void main() {
|
|||||||
driver.close();
|
driver.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('inital tree creation', () async {
|
test('initial tree creation', () async {
|
||||||
// Let app become fully idle.
|
// Let app become fully idle.
|
||||||
await Future<void>.delayed(const Duration(seconds: 2));
|
await Future<void>.delayed(const Duration(seconds: 2));
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class BenchDynamicClipOnStaticPicture extends SceneBuilderRecorder {
|
|||||||
BenchDynamicClipOnStaticPicture() : super(name: benchmarkName) {
|
BenchDynamicClipOnStaticPicture() : super(name: benchmarkName) {
|
||||||
// If the scrollable extent is too small, the benchmark may end up
|
// If the scrollable extent is too small, the benchmark may end up
|
||||||
// scrolling the picture out of the clip area entirely, resulting in
|
// scrolling the picture out of the clip area entirely, resulting in
|
||||||
// bogus metric vaules.
|
// bogus metric values.
|
||||||
const double maxScrollExtent = kTotalSampleCount * kScrollDelta;
|
const double maxScrollExtent = kTotalSampleCount * kScrollDelta;
|
||||||
const double pictureHeight = kRows * kRowHeight;
|
const double pictureHeight = kRows * kRowHeight;
|
||||||
if (maxScrollExtent > pictureHeight) {
|
if (maxScrollExtent > pictureHeight) {
|
||||||
|
@ -245,7 +245,7 @@ class TimeseriesVisualization {
|
|||||||
final AnnotatedSample sample = _stats.samples[i];
|
final AnnotatedSample sample = _stats.samples[i];
|
||||||
|
|
||||||
if (sample.isWarmUpValue) {
|
if (sample.isWarmUpValue) {
|
||||||
// Put gray background behing warm-up samples.
|
// Put gray background behind warm-up samples.
|
||||||
_ctx.fillStyle = 'rgba(200,200,200,1)';
|
_ctx.fillStyle = 'rgba(200,200,200,1)';
|
||||||
_ctx.fillRect(xOffset, 0, barWidth, _normalized(_maxValueChartRange));
|
_ctx.fillRect(xOffset, 0, barWidth, _normalized(_maxValueChartRange));
|
||||||
}
|
}
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
// 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.
|
||||||
|
|
||||||
// THE FOLLLOWING FILES WERE GENERATED BY `flutter gen-l10n`.
|
// THE FOLLOWING FILES WERE GENERATED BY `flutter gen-l10n`.
|
||||||
|
@ -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.
|
||||||
|
|
||||||
// THE FOLLLOWING FILES WERE GENERATED BY `flutter gen-l10n`.
|
// THE FOLLOWING FILES WERE GENERATED BY `flutter gen-l10n`.
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
|
@ -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.
|
||||||
|
|
||||||
// THE FOLLLOWING FILES WERE GENERATED BY `flutter gen-l10n`.
|
// THE FOLLOWING FILES WERE GENERATED BY `flutter gen-l10n`.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -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.
|
||||||
|
|
||||||
// THE FOLLLOWING FILES WERE GENERATED BY `flutter gen-l10n`.
|
// THE FOLLOWING FILES WERE GENERATED BY `flutter gen-l10n`.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ class Cocoon {
|
|||||||
/// Flutter infrastructure's workflow is:
|
/// Flutter infrastructure's workflow is:
|
||||||
/// 1. Run DeviceLab test, writing results to a known path
|
/// 1. Run DeviceLab test, writing results to a known path
|
||||||
/// 2. Request service account token from luci auth (valid for at least 3 minutes)
|
/// 2. Request service account token from luci auth (valid for at least 3 minutes)
|
||||||
/// 3. Upload results from (1) to Cocooon
|
/// 3. Upload results from (1) to Cocoon
|
||||||
Future<void> sendResultsPath(String resultsPath) async {
|
Future<void> sendResultsPath(String resultsPath) async {
|
||||||
final File resultFile = fs.file(resultsPath);
|
final File resultFile = fs.file(resultsPath);
|
||||||
final Map<String, dynamic> resultsJson = json.decode(await resultFile.readAsString()) as Map<String, dynamic>;
|
final Map<String, dynamic> resultsJson = json.decode(await resultFile.readAsString()) as Map<String, dynamic>;
|
||||||
|
@ -25,7 +25,7 @@ final Set<String> noRebootForbidList = <String>{
|
|||||||
/// The maximum number of test runs before a device must be rebooted.
|
/// The maximum number of test runs before a device must be rebooted.
|
||||||
///
|
///
|
||||||
/// This number was chosen arbitrarily.
|
/// This number was chosen arbitrarily.
|
||||||
const int maxiumRuns = 30;
|
const int maximumRuns = 30;
|
||||||
|
|
||||||
/// Represents a unit of work performed in the CI environment that can
|
/// Represents a unit of work performed in the CI environment that can
|
||||||
/// succeed, fail and be retried independently of others.
|
/// succeed, fail and be retried independently of others.
|
||||||
@ -190,7 +190,7 @@ class _TaskRunner {
|
|||||||
} else {
|
} else {
|
||||||
runCount = 0;
|
runCount = 0;
|
||||||
}
|
}
|
||||||
if (runCount < maxiumRuns) {
|
if (runCount < maximumRuns) {
|
||||||
rebootFile
|
rebootFile
|
||||||
..createSync()
|
..createSync()
|
||||||
..writeAsStringSync((runCount + 1).toString());
|
..writeAsStringSync((runCount + 1).toString());
|
||||||
|
@ -466,7 +466,7 @@ TaskFunction createFramePolicyIntegrationTest() {
|
|||||||
) as Map<String, dynamic>;
|
) as Map<String, dynamic>;
|
||||||
final Map<String, dynamic> fullLiveData = data['fullyLive'] as Map<String, dynamic>;
|
final Map<String, dynamic> fullLiveData = data['fullyLive'] as Map<String, dynamic>;
|
||||||
final Map<String, dynamic> benchmarkLiveData = data['benchmarkLive'] as Map<String, dynamic>;
|
final Map<String, dynamic> benchmarkLiveData = data['benchmarkLive'] as Map<String, dynamic>;
|
||||||
final Map<String, dynamic> dataFormated = <String, dynamic>{
|
final Map<String, dynamic> dataFormatted = <String, dynamic>{
|
||||||
'average_delay_fullyLive_millis':
|
'average_delay_fullyLive_millis':
|
||||||
fullLiveData['average_delay_millis'],
|
fullLiveData['average_delay_millis'],
|
||||||
'average_delay_benchmarkLive_millis':
|
'average_delay_benchmarkLive_millis':
|
||||||
@ -478,8 +478,8 @@ TaskFunction createFramePolicyIntegrationTest() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return TaskResult.success(
|
return TaskResult.success(
|
||||||
dataFormated,
|
dataFormatted,
|
||||||
benchmarkScoreKeys: dataFormated.keys.toList(),
|
benchmarkScoreKeys: dataFormatted.keys.toList(),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -56,7 +56,7 @@ Future<TaskResult> runWebBenchmark({ @required bool useCanvasKit }) async {
|
|||||||
if (benchmarkName != benchmarkIterator.current) {
|
if (benchmarkName != benchmarkIterator.current) {
|
||||||
profileData.completeError(Exception(
|
profileData.completeError(Exception(
|
||||||
'Browser returned benchmark results from a wrong benchmark.\n'
|
'Browser returned benchmark results from a wrong benchmark.\n'
|
||||||
'Requested to run bechmark ${benchmarkIterator.current}, but '
|
'Requested to run benchmark ${benchmarkIterator.current}, but '
|
||||||
'got results for $benchmarkName.',
|
'got results for $benchmarkName.',
|
||||||
));
|
));
|
||||||
unawaited(server.close());
|
unawaited(server.close());
|
||||||
|
@ -10,7 +10,7 @@ Future<void> main() async {
|
|||||||
const MethodChannel channel = MethodChannel('com.example.abstract_method_smoke_test');
|
const MethodChannel channel = MethodChannel('com.example.abstract_method_smoke_test');
|
||||||
await channel.invokeMethod<void>('show_keyboard');
|
await channel.invokeMethod<void>('show_keyboard');
|
||||||
runApp(const MyApp());
|
runApp(const MyApp());
|
||||||
print('Test suceeded');
|
print('Test succeeded');
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
|
@ -13,5 +13,5 @@ void main() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
print('Test suceeded');
|
print('Test succeeded');
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,9 @@ public class MainActivity extends FlutterActivity {
|
|||||||
result.put("contentDescription", node.getContentDescription());
|
result.put("contentDescription", node.getContentDescription());
|
||||||
flags.put("isChecked", node.isChecked());
|
flags.put("isChecked", node.isChecked());
|
||||||
flags.put("isCheckable", node.isCheckable());
|
flags.put("isCheckable", node.isCheckable());
|
||||||
flags.put("isDismissable", node.isDismissable());
|
// This is not a typo.
|
||||||
|
// See: https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#isDismissable()
|
||||||
|
flags.put("isDismissible", node.isDismissable());
|
||||||
flags.put("isEditable", node.isEditable());
|
flags.put("isEditable", node.isEditable());
|
||||||
flags.put("isEnabled", node.isEnabled());
|
flags.put("isEnabled", node.isEnabled());
|
||||||
flags.put("isFocusable", node.isFocusable());
|
flags.put("isFocusable", node.isFocusable());
|
||||||
|
@ -172,7 +172,7 @@ class AndroidSemanticsAction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const Map<int, AndroidSemanticsAction> _kactionById = <int, AndroidSemanticsAction>{
|
static const Map<int, AndroidSemanticsAction> _kActionById = <int, AndroidSemanticsAction>{
|
||||||
_kFocusIndex: focus,
|
_kFocusIndex: focus,
|
||||||
_kClearFocusIndex: clearFocus,
|
_kClearFocusIndex: clearFocus,
|
||||||
_kSelectIndex: select,
|
_kSelectIndex: select,
|
||||||
@ -211,6 +211,6 @@ class AndroidSemanticsAction {
|
|||||||
///
|
///
|
||||||
/// Returns `null` if the id is not a known Android accessibility action.
|
/// Returns `null` if the id is not a known Android accessibility action.
|
||||||
static AndroidSemanticsAction deserialize(int value) {
|
static AndroidSemanticsAction deserialize(int value) {
|
||||||
return _kactionById[value];
|
return _kActionById[value];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,8 @@ class BottomAppBarDemo extends StatefulWidget {
|
|||||||
State createState() => _BottomAppBarDemoState();
|
State createState() => _BottomAppBarDemoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flutter generally frowns upon abbrevation however this class uses two
|
// Flutter generally frowns upon abbreviation however this class uses two
|
||||||
// abbrevations extensively: "fab" for floating action button, and "bab"
|
// abbreviations extensively: "fab" for floating action button, and "bab"
|
||||||
// for bottom application bar.
|
// for bottom application bar.
|
||||||
|
|
||||||
class _BottomAppBarDemoState extends State<BottomAppBarDemo> {
|
class _BottomAppBarDemoState extends State<BottomAppBarDemo> {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class GalleryIcons {
|
class GalleryIcons {
|
||||||
// This class is not meant to be instatiated or extended; this constructor
|
// This class is not meant to be instantiated or extended; this constructor
|
||||||
// prevents instantiation and extension.
|
// prevents instantiation and extension.
|
||||||
GalleryIcons._();
|
GalleryIcons._();
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter_gallery/demo_lists.dart';
|
import 'package:flutter_gallery/demo_lists.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
|
||||||
/// The demos we don't run as part of the integraiton test.
|
/// The demos we don't run as part of the integration test.
|
||||||
///
|
///
|
||||||
/// Demo names are formatted as 'DEMO_NAME@DEMO_CATEGORY' (see
|
/// Demo names are formatted as 'DEMO_NAME@DEMO_CATEGORY' (see
|
||||||
/// `demo_lists.dart` for more examples).
|
/// `demo_lists.dart` for more examples).
|
||||||
|
@ -165,7 +165,7 @@ void main([List<String> args = const <String>[]]) {
|
|||||||
// Wait for the first frame to be rasterized.
|
// Wait for the first frame to be rasterized.
|
||||||
await driver.waitUntilFirstFrameRasterized();
|
await driver.waitUntilFirstFrameRasterized();
|
||||||
if (withSemantics) {
|
if (withSemantics) {
|
||||||
print('Enabeling semantics...');
|
print('Enabling semantics...');
|
||||||
await driver.setSemantics(true);
|
await driver.setSemantics(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ static NSString *_kReloadChannelName = @"reload";
|
|||||||
return _engine;
|
return _engine;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (FlutterBasicMessageChannel *)reloadMessabeChannel {
|
- (FlutterBasicMessageChannel *)reloadMessageChannel {
|
||||||
return _reloadMessageChannel;
|
return _reloadMessageChannel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,8 +85,8 @@ void main() {
|
|||||||
expect(text.data, 'no-enter');
|
expect(text.data, 'no-enter');
|
||||||
|
|
||||||
// Focus on a TextFormField.
|
// Focus on a TextFormField.
|
||||||
final Finder textFormFielsFinder = find.byKey(const Key('input2'));
|
final Finder textFormFieldsFinder = find.byKey(const Key('input2'));
|
||||||
expect(textFormFielsFinder, findsOneWidget);
|
expect(textFormFieldsFinder, findsOneWidget);
|
||||||
await tester.tap(find.byKey(const Key('input2')));
|
await tester.tap(find.byKey(const Key('input2')));
|
||||||
|
|
||||||
// // Press Tab. This should trigger `onFieldSubmitted` of TextField.
|
// // Press Tab. This should trigger `onFieldSubmitted` of TextField.
|
||||||
|
@ -75,7 +75,7 @@ void main(List<String> arguments) {
|
|||||||
// Verify that the Gradlew wrapper exists.
|
// Verify that the Gradlew wrapper exists.
|
||||||
final File gradleWrapper = androidDirectory.childFile('gradlew');
|
final File gradleWrapper = androidDirectory.childFile('gradlew');
|
||||||
// Generate Gradle wrapper if it doesn't exists.
|
// Generate Gradle wrapper if it doesn't exists.
|
||||||
// This logic is embededed within the Flutter tool.
|
// This logic is embedded within the Flutter tool.
|
||||||
// To generate the wrapper, build a flavor that doesn't exist.
|
// To generate the wrapper, build a flavor that doesn't exist.
|
||||||
if (!gradleWrapper.existsSync()) {
|
if (!gradleWrapper.existsSync()) {
|
||||||
Process.runSync(
|
Process.runSync(
|
||||||
|
@ -140,7 +140,7 @@ const Map<String, LogicalKeyboardKey> kWebNumPadMap = <String, LogicalKeyboardKe
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// A map of Web KeyboardEvent keys which needs to be decided based on location,
|
/// A map of Web KeyboardEvent keys which needs to be decided based on location,
|
||||||
/// typically for numpad kyes and modifier keys. Used to provide different key
|
/// typically for numpad keys and modifier keys. Used to provide different key
|
||||||
/// objects for keys like KEY_EQUALS and NUMPAD_EQUALS.
|
/// objects for keys like KEY_EQUALS and NUMPAD_EQUALS.
|
||||||
const Map<String, List<LogicalKeyboardKey?>> kWebLocationMap = <String, List<LogicalKeyboardKey?>>{
|
const Map<String, List<LogicalKeyboardKey?>> kWebLocationMap = <String, List<LogicalKeyboardKey?>>{
|
||||||
@@@WEB_LOCATION_MAP@@@
|
@@@WEB_LOCATION_MAP@@@
|
||||||
|
@ -41,7 +41,7 @@ ui.Picture paint(ui.Rect paintBounds) {
|
|||||||
ui.Scene composite(ui.Picture picture, ui.Rect paintBounds) {
|
ui.Scene composite(ui.Picture picture, ui.Rect paintBounds) {
|
||||||
// The device pixel ratio gives an approximate ratio of the size of pixels on
|
// The device pixel ratio gives an approximate ratio of the size of pixels on
|
||||||
// the device's screen to "normal" sized pixels. We commonly work in logical
|
// the device's screen to "normal" sized pixels. We commonly work in logical
|
||||||
// pixels, which are then scalled by the device pixel ratio before being drawn
|
// pixels, which are then scaled by the device pixel ratio before being drawn
|
||||||
// on the screen.
|
// on the screen.
|
||||||
final double devicePixelRatio = ui.window.devicePixelRatio;
|
final double devicePixelRatio = ui.window.devicePixelRatio;
|
||||||
|
|
||||||
|
@ -1401,7 +1401,7 @@ class ElasticInOutCurve extends Curve {
|
|||||||
/// * [Curve], the interface implemented by the constants available from the
|
/// * [Curve], the interface implemented by the constants available from the
|
||||||
/// [Curves] class.
|
/// [Curves] class.
|
||||||
class Curves {
|
class Curves {
|
||||||
// This class is not meant to be instatiated or extended; this constructor
|
// This class is not meant to be instantiated or extended; this constructor
|
||||||
// prevents instantiation and extension.
|
// prevents instantiation and extension.
|
||||||
Curves._();
|
Curves._();
|
||||||
|
|
||||||
|
@ -230,7 +230,7 @@ class _CupertinoDesktopTextSelectionControlsToolbarState extends State<_Cupertin
|
|||||||
/// Typically displays buttons for text manipulation, e.g. copying and pasting
|
/// Typically displays buttons for text manipulation, e.g. copying and pasting
|
||||||
/// text.
|
/// text.
|
||||||
///
|
///
|
||||||
/// Tries to position itself as closesly as possible to [anchor] while remaining
|
/// Tries to position itself as closely as possible to [anchor] while remaining
|
||||||
/// fully on-screen.
|
/// fully on-screen.
|
||||||
///
|
///
|
||||||
/// See also:
|
/// See also:
|
||||||
|
@ -890,7 +890,7 @@ class _CupertinoDialogRenderWidget extends RenderObjectWidget {
|
|||||||
class _CupertinoDialogRenderElement extends RenderObjectElement {
|
class _CupertinoDialogRenderElement extends RenderObjectElement {
|
||||||
_CupertinoDialogRenderElement(_CupertinoDialogRenderWidget widget, {this.allowMoveRenderObjectChild = false}) : super(widget);
|
_CupertinoDialogRenderElement(_CupertinoDialogRenderWidget widget, {this.allowMoveRenderObjectChild = false}) : super(widget);
|
||||||
|
|
||||||
// Whether to allow overriden method moveRenderObjectChild call or default to super.
|
// Whether to allow overridden method moveRenderObjectChild call or default to super.
|
||||||
// CupertinoActionSheet should default to [super] but CupertinoAlertDialog not.
|
// CupertinoActionSheet should default to [super] but CupertinoAlertDialog not.
|
||||||
final bool allowMoveRenderObjectChild;
|
final bool allowMoveRenderObjectChild;
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ enum _CupertinoFormSectionType { base, insetGrouped }
|
|||||||
///
|
///
|
||||||
/// {@macro flutter.material.Material.clipBehavior}
|
/// {@macro flutter.material.Material.clipBehavior}
|
||||||
class CupertinoFormSection extends StatelessWidget {
|
class CupertinoFormSection extends StatelessWidget {
|
||||||
/// Creates a section that mimicks standard iOS forms.
|
/// Creates a section that mimics standard iOS forms.
|
||||||
///
|
///
|
||||||
/// The base constructor for [CupertinoFormSection] constructs an
|
/// The base constructor for [CupertinoFormSection] constructs an
|
||||||
/// edge-to-edge style section which includes an iOS-style header,
|
/// edge-to-edge style section which includes an iOS-style header,
|
||||||
@ -111,7 +111,7 @@ class CupertinoFormSection extends StatelessWidget {
|
|||||||
assert(children.length > 0),
|
assert(children.length > 0),
|
||||||
super(key: key);
|
super(key: key);
|
||||||
|
|
||||||
/// Creates a section that mimicks standard "Inset Grouped" iOS forms.
|
/// Creates a section that mimics standard "Inset Grouped" iOS forms.
|
||||||
///
|
///
|
||||||
/// The [CupertinoFormSection.insetGrouped] constructor creates a round-edged and
|
/// The [CupertinoFormSection.insetGrouped] constructor creates a round-edged and
|
||||||
/// padded section that is commonly seen in notched-displays like iPhone X and
|
/// padded section that is commonly seen in notched-displays like iPhone X and
|
||||||
@ -217,7 +217,7 @@ class CupertinoFormSection extends StatelessWidget {
|
|||||||
|
|
||||||
// Short divider is used between rows.
|
// Short divider is used between rows.
|
||||||
// The value of the starting inset (15.0) is determined using SwiftUI's Form
|
// The value of the starting inset (15.0) is determined using SwiftUI's Form
|
||||||
// seperators in the iOS 14.2 SDK.
|
// separators in the iOS 14.2 SDK.
|
||||||
final Widget shortDivider = Container(
|
final Widget shortDivider = Container(
|
||||||
margin: const EdgeInsetsDirectional.only(start: 15.0),
|
margin: const EdgeInsetsDirectional.only(start: 15.0),
|
||||||
color: dividerColor,
|
color: dividerColor,
|
||||||
|
@ -433,7 +433,7 @@ class _RenderCupertinoPickerSemantics extends RenderProxyBox {
|
|||||||
late FixedExtentScrollController _controller;
|
late FixedExtentScrollController _controller;
|
||||||
set controller(FixedExtentScrollController value) => _updateController(_controller, value);
|
set controller(FixedExtentScrollController value) => _updateController(_controller, value);
|
||||||
|
|
||||||
// This method exists to allow controller to be non-null. It is only called with a null oldValue from construtor.
|
// This method exists to allow controller to be non-null. It is only called with a null oldValue from constructor.
|
||||||
void _updateController(FixedExtentScrollController? oldValue, FixedExtentScrollController value) {
|
void _updateController(FixedExtentScrollController? oldValue, FixedExtentScrollController value) {
|
||||||
if (value == oldValue)
|
if (value == oldValue)
|
||||||
return;
|
return;
|
||||||
|
@ -993,7 +993,7 @@ class _RenderSegmentedControl<T> extends RenderBox
|
|||||||
assert(rightMost > leftMost);
|
assert(rightMost > leftMost);
|
||||||
|
|
||||||
// Ignore the horizontal position and the height of `thumbRect`, and
|
// Ignore the horizontal position and the height of `thumbRect`, and
|
||||||
// calcuates them from `children`.
|
// calculates them from `children`.
|
||||||
return Rect.fromLTRB(
|
return Rect.fromLTRB(
|
||||||
math.max(thumbRect.left, leftMost - _kThumbInsets.left),
|
math.max(thumbRect.left, leftMost - _kThumbInsets.left),
|
||||||
firstChildOffset.dy - _kThumbInsets.top,
|
firstChildOffset.dy - _kThumbInsets.top,
|
||||||
|
@ -2549,7 +2549,7 @@ class FlagsSummary<T> extends DiagnosticsProperty<Map<String, T?>> {
|
|||||||
//
|
//
|
||||||
// For a non-null value, its description is its key.
|
// For a non-null value, its description is its key.
|
||||||
//
|
//
|
||||||
// For a null value, it is omitted unless `includeEmtpy` is true and
|
// For a null value, it is omitted unless `includeEmpty` is true and
|
||||||
// [ifEntryNull] contains a corresponding description.
|
// [ifEntryNull] contains a corresponding description.
|
||||||
Iterable<String> _formattedValues() sync* {
|
Iterable<String> _formattedValues() sync* {
|
||||||
for (final MapEntry<String, T?> entry in value.entries) {
|
for (final MapEntry<String, T?> entry in value.entries) {
|
||||||
|
@ -27,7 +27,7 @@ import '_platform_io.dart'
|
|||||||
/// Tests can also create specific platform tests by and adding a `variant:`
|
/// Tests can also create specific platform tests by and adding a `variant:`
|
||||||
/// argument to the test and using a [TargetPlatformVariant].
|
/// argument to the test and using a [TargetPlatformVariant].
|
||||||
//
|
//
|
||||||
// When adding support for a new platform (e.g. Windows Phone, Rasberry Pi),
|
// When adding support for a new platform (e.g. Windows Phone, Raspberry Pi),
|
||||||
// first create a new value on the [TargetPlatform] enum, then add a rule for
|
// first create a new value on the [TargetPlatform] enum, then add a rule for
|
||||||
// selecting that platform here.
|
// selecting that platform here.
|
||||||
//
|
//
|
||||||
|
@ -240,7 +240,7 @@ class PointerEventResampler {
|
|||||||
// Add synthetics `move` or `hover` event if position has changed.
|
// Add synthetics `move` or `hover` event if position has changed.
|
||||||
// Note: Devices without `hover` events are expected to always have
|
// Note: Devices without `hover` events are expected to always have
|
||||||
// `add` and `down` events with the same position and this logic will
|
// `add` and `down` events with the same position and this logic will
|
||||||
// therefor never produce `hover` events.
|
// therefore never produce `hover` events.
|
||||||
if (position != _position) {
|
if (position != _position) {
|
||||||
final Offset delta = position - _position;
|
final Offset delta = position - _position;
|
||||||
callback(_toMoveOrHoverEvent(event, position, delta,
|
callback(_toMoveOrHoverEvent(event, position, delta,
|
||||||
|
@ -333,7 +333,7 @@ class IOSScrollViewFlingVelocityTracker extends VelocityTracker {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
VelocityEstimate getVelocityEstimate() {
|
VelocityEstimate getVelocityEstimate() {
|
||||||
// The velocity estimated using this expression is an aproximation of the
|
// The velocity estimated using this expression is an approximation of the
|
||||||
// scroll velocity of an iOS scroll view at the moment the user touch was
|
// scroll velocity of an iOS scroll view at the moment the user touch was
|
||||||
// released, not the final velocity of the iOS pan gesture recognizer
|
// released, not the final velocity of the iOS pan gesture recognizer
|
||||||
// installed on the scroll view would report. Typically in an iOS scroll
|
// installed on the scroll view would report. Typically in an iOS scroll
|
||||||
|
@ -639,7 +639,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
|
|||||||
/// value is true.
|
/// value is true.
|
||||||
///
|
///
|
||||||
/// This is a temporary property. When setting it to false is no
|
/// This is a temporary property. When setting it to false is no
|
||||||
/// longer considered a breaking change, it will be depreacted and
|
/// longer considered a breaking change, it will be deprecated and
|
||||||
/// its default value will be changed to false. App developers are
|
/// its default value will be changed to false. App developers are
|
||||||
/// encouraged to opt into the new features by setting it to false
|
/// encouraged to opt into the new features by setting it to false
|
||||||
/// and using the [foregroundColor] and [systemOverlayStyle]
|
/// and using the [foregroundColor] and [systemOverlayStyle]
|
||||||
|
@ -221,7 +221,7 @@ class _DesktopTextSelectionControlsToolbarState extends State<_DesktopTextSelect
|
|||||||
/// Typically displays buttons for text manipulation, e.g. copying and pasting
|
/// Typically displays buttons for text manipulation, e.g. copying and pasting
|
||||||
/// text.
|
/// text.
|
||||||
///
|
///
|
||||||
/// Tries to position itself as closesly as possible to [anchor] while remaining
|
/// Tries to position itself as closely as possible to [anchor] while remaining
|
||||||
/// fully on-screen.
|
/// fully on-screen.
|
||||||
///
|
///
|
||||||
/// See also:
|
/// See also:
|
||||||
|
@ -230,7 +230,7 @@ class Dialog extends StatelessWidget {
|
|||||||
/// onPressed: () => showDialog<String>(
|
/// onPressed: () => showDialog<String>(
|
||||||
/// context: context,
|
/// context: context,
|
||||||
/// builder: (BuildContext context) => AlertDialog(
|
/// builder: (BuildContext context) => AlertDialog(
|
||||||
/// title: const Text('AlertDialog Tilte'),
|
/// title: const Text('AlertDialog Title'),
|
||||||
/// content: const Text('AlertDialog description'),
|
/// content: const Text('AlertDialog description'),
|
||||||
/// actions: <Widget>[
|
/// actions: <Widget>[
|
||||||
/// TextButton(
|
/// TextButton(
|
||||||
|
@ -584,7 +584,7 @@ class _DropdownRoutePage<T> extends StatelessWidget {
|
|||||||
// DropdownButton.itemHeight is specified or DropdownButton.itemHeight is null
|
// DropdownButton.itemHeight is specified or DropdownButton.itemHeight is null
|
||||||
// and all of the items' intrinsic heights are less than kMinInteractiveDimension.
|
// and all of the items' intrinsic heights are less than kMinInteractiveDimension.
|
||||||
// Otherwise the initialScrollOffset is just a rough approximation based on
|
// Otherwise the initialScrollOffset is just a rough approximation based on
|
||||||
// treating the items as if their heights were all equal to kMinInteractveDimension.
|
// treating the items as if their heights were all equal to kMinInteractiveDimension.
|
||||||
if (route.scrollController == null) {
|
if (route.scrollController == null) {
|
||||||
final _MenuLimits menuLimits = route.getMenuLimits(buttonRect, constraints.maxHeight, selectedIndex);
|
final _MenuLimits menuLimits = route.getMenuLimits(buttonRect, constraints.maxHeight, selectedIndex);
|
||||||
route.scrollController = ScrollController(initialScrollOffset: menuLimits.scrollOffset);
|
route.scrollController = ScrollController(initialScrollOffset: menuLimits.scrollOffset);
|
||||||
|
@ -781,7 +781,7 @@ class _InkResponseState extends State<_InkResponseStateWidget>
|
|||||||
super.didUpdateWidget(oldWidget);
|
super.didUpdateWidget(oldWidget);
|
||||||
if (_isWidgetEnabled(widget) != _isWidgetEnabled(oldWidget)) {
|
if (_isWidgetEnabled(widget) != _isWidgetEnabled(oldWidget)) {
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
// Don't call wigdet.onHover because many wigets, including the button
|
// Don't call widget.onHover because many widgets, including the button
|
||||||
// widgets, apply setState to an ancestor context from onHover.
|
// widgets, apply setState to an ancestor context from onHover.
|
||||||
updateHighlight(_HighlightType.hover, value: _hovering, callOnHover: false);
|
updateHighlight(_HighlightType.hover, value: _hovering, callOnHover: false);
|
||||||
}
|
}
|
||||||
|
@ -623,7 +623,7 @@ class _TabBarScrollController extends ScrollController {
|
|||||||
/// {@end-tool}
|
/// {@end-tool}
|
||||||
///
|
///
|
||||||
/// {@tool dartpad --template=stateful_widget_material_ticker}
|
/// {@tool dartpad --template=stateful_widget_material_ticker}
|
||||||
/// [TabBar] can also be implmented by using a [TabController] which provides more options
|
/// [TabBar] can also be implemented by using a [TabController] which provides more options
|
||||||
/// to control the behavior of the [TabBar] and [TabBarView]. This can be used instead of
|
/// to control the behavior of the [TabBar] and [TabBarView]. This can be used instead of
|
||||||
/// a [DefaultTabController], demonstrated below.
|
/// a [DefaultTabController], demonstrated below.
|
||||||
///
|
///
|
||||||
|
@ -39,7 +39,7 @@ abstract class ClipContext {
|
|||||||
///
|
///
|
||||||
/// `bounds` is the saveLayer bounds used for [Clip.antiAliasWithSaveLayer].
|
/// `bounds` is the saveLayer bounds used for [Clip.antiAliasWithSaveLayer].
|
||||||
void clipPathAndPaint(Path path, Clip clipBehavior, Rect bounds, VoidCallback painter) {
|
void clipPathAndPaint(Path path, Clip clipBehavior, Rect bounds, VoidCallback painter) {
|
||||||
_clipAndPaint((bool doAntiAias) => canvas.clipPath(path, doAntiAlias: doAntiAias), clipBehavior, bounds, painter);
|
_clipAndPaint((bool doAntiAlias) => canvas.clipPath(path, doAntiAlias: doAntiAlias), clipBehavior, bounds, painter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Clip [canvas] with [Path] according to `rrect` and then paint. [canvas] is
|
/// Clip [canvas] with [Path] according to `rrect` and then paint. [canvas] is
|
||||||
@ -47,7 +47,7 @@ abstract class ClipContext {
|
|||||||
///
|
///
|
||||||
/// `bounds` is the saveLayer bounds used for [Clip.antiAliasWithSaveLayer].
|
/// `bounds` is the saveLayer bounds used for [Clip.antiAliasWithSaveLayer].
|
||||||
void clipRRectAndPaint(RRect rrect, Clip clipBehavior, Rect bounds, VoidCallback painter) {
|
void clipRRectAndPaint(RRect rrect, Clip clipBehavior, Rect bounds, VoidCallback painter) {
|
||||||
_clipAndPaint((bool doAntiAias) => canvas.clipRRect(rrect, doAntiAlias: doAntiAias), clipBehavior, bounds, painter);
|
_clipAndPaint((bool doAntiAlias) => canvas.clipRRect(rrect, doAntiAlias: doAntiAlias), clipBehavior, bounds, painter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Clip [canvas] with [Path] according to `rect` and then paint. [canvas] is
|
/// Clip [canvas] with [Path] according to `rect` and then paint. [canvas] is
|
||||||
@ -55,6 +55,6 @@ abstract class ClipContext {
|
|||||||
///
|
///
|
||||||
/// `bounds` is the saveLayer bounds used for [Clip.antiAliasWithSaveLayer].
|
/// `bounds` is the saveLayer bounds used for [Clip.antiAliasWithSaveLayer].
|
||||||
void clipRectAndPaint(Rect rect, Clip clipBehavior, Rect bounds, VoidCallback painter) {
|
void clipRectAndPaint(Rect rect, Clip clipBehavior, Rect bounds, VoidCallback painter) {
|
||||||
_clipAndPaint((bool doAntiAias) => canvas.clipRect(rect, doAntiAlias: doAntiAias), clipBehavior, bounds, painter);
|
_clipAndPaint((bool doAntiAlias) => canvas.clipRect(rect, doAntiAlias: doAntiAlias), clipBehavior, bounds, painter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -369,7 +369,7 @@ class AssetImage extends AssetBundleImageProvider {
|
|||||||
// lowest key.
|
// lowest key.
|
||||||
// - If `value` is greater than the highest key, choose the variant with
|
// - If `value` is greater than the highest key, choose the variant with
|
||||||
// the highest key.
|
// the highest key.
|
||||||
// - If the screen has low device pixel ratio, chosse the variant with the
|
// - If the screen has low device pixel ratio, choose the variant with the
|
||||||
// lowest key higher than `value`.
|
// lowest key higher than `value`.
|
||||||
// - If the screen has high device pixel ratio, choose the variant with the
|
// - If the screen has high device pixel ratio, choose the variant with the
|
||||||
// key nearest to `value`.
|
// key nearest to `value`.
|
||||||
|
@ -474,7 +474,7 @@ class StrutStyle with Diagnosticable {
|
|||||||
final FontStyle? fontStyle;
|
final FontStyle? fontStyle;
|
||||||
|
|
||||||
/// The additional leading to apply to the strut as a multiple of [fontSize],
|
/// The additional leading to apply to the strut as a multiple of [fontSize],
|
||||||
/// indepdent of [height] and [leadingDistribution].
|
/// independent of [height] and [leadingDistribution].
|
||||||
///
|
///
|
||||||
/// Leading is additional spacing between lines. Half of the leading is added
|
/// Leading is additional spacing between lines. Half of the leading is added
|
||||||
/// to the top and the other half to the bottom of the line. This differs
|
/// to the top and the other half to the bottom of the line. This differs
|
||||||
|
@ -1298,7 +1298,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Deletes in the foward direction, from the current selection in
|
/// Deletes in the forward direction, from the current selection in
|
||||||
/// [textSelectionDelegate].
|
/// [textSelectionDelegate].
|
||||||
///
|
///
|
||||||
/// This method operates on the text/selection contained in
|
/// This method operates on the text/selection contained in
|
||||||
@ -1349,7 +1349,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Deletes a word in the foward direction from the current selection.
|
/// Deletes a word in the forward direction from the current selection.
|
||||||
///
|
///
|
||||||
/// If the [selection] is collapsed, deletes a word after the cursor.
|
/// If the [selection] is collapsed, deletes a word after the cursor.
|
||||||
///
|
///
|
||||||
@ -1398,7 +1398,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Deletes a line in the foward direction from the current selection.
|
/// Deletes a line in the forward direction from the current selection.
|
||||||
///
|
///
|
||||||
/// If the [selection] is collapsed, deletes a line after the cursor.
|
/// If the [selection] is collapsed, deletes a line after the cursor.
|
||||||
///
|
///
|
||||||
|
@ -279,7 +279,7 @@ class MouseTracker extends ChangeNotifier {
|
|||||||
_mouseCursorMixin.handleDeviceCursorUpdate(
|
_mouseCursorMixin.handleDeviceCursorUpdate(
|
||||||
details.device,
|
details.device,
|
||||||
details.triggeringEvent,
|
details.triggeringEvent,
|
||||||
details.nextAnnotations.keys.map((MouseTrackerAnnotation annotaion) => annotaion.cursor),
|
details.nextAnnotations.keys.map((MouseTrackerAnnotation annotation) => annotation.cursor),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -414,7 +414,7 @@ class RenderUiKitView extends RenderBox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This recognizer constructs gesture recognizers from a set of gesture recognizer factories
|
// This recognizer constructs gesture recognizers from a set of gesture recognizer factories
|
||||||
// it was give, adds all of them to a gesture arena team with the _UiKitViewGesturrRecognizer
|
// it was give, adds all of them to a gesture arena team with the _UiKitViewGestureRecognizer
|
||||||
// as the team captain.
|
// as the team captain.
|
||||||
// When the team wins a gesture the recognizer notifies the engine that it should release
|
// When the team wins a gesture the recognizer notifies the engine that it should release
|
||||||
// the touch sequence to the embedded UIView.
|
// the touch sequence to the embedded UIView.
|
||||||
|
@ -4283,7 +4283,7 @@ class RenderSemanticsAnnotations extends RenderProxyBox {
|
|||||||
markNeedsSemanticsUpdate();
|
markNeedsSemanticsUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Adds a semenatics tag to the semantics subtree.
|
/// Adds a semantics tag to the semantics subtree.
|
||||||
SemanticsTag? get tagForChildren => _tagForChildren;
|
SemanticsTag? get tagForChildren => _tagForChildren;
|
||||||
SemanticsTag? _tagForChildren;
|
SemanticsTag? _tagForChildren;
|
||||||
set tagForChildren(SemanticsTag? value) {
|
set tagForChildren(SemanticsTag? value) {
|
||||||
|
@ -2880,7 +2880,7 @@ const Map<String, LogicalKeyboardKey> kWebNumPadMap = <String, LogicalKeyboardKe
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// A map of Web KeyboardEvent keys which needs to be decided based on location,
|
/// A map of Web KeyboardEvent keys which needs to be decided based on location,
|
||||||
/// typically for numpad kyes and modifier keys. Used to provide different key
|
/// typically for numpad keys and modifier keys. Used to provide different key
|
||||||
/// objects for keys like KEY_EQUALS and NUMPAD_EQUALS.
|
/// objects for keys like KEY_EQUALS and NUMPAD_EQUALS.
|
||||||
const Map<String, List<LogicalKeyboardKey?>> kWebLocationMap = <String, List<LogicalKeyboardKey?>>{
|
const Map<String, List<LogicalKeyboardKey?>> kWebLocationMap = <String, List<LogicalKeyboardKey?>>{
|
||||||
'0': <LogicalKeyboardKey?>[LogicalKeyboardKey.digit0, null, null, LogicalKeyboardKey.numpad0],
|
'0': <LogicalKeyboardKey?>[LogicalKeyboardKey.digit0, null, null, LogicalKeyboardKey.numpad0],
|
||||||
|
@ -131,7 +131,7 @@ class MethodChannel {
|
|||||||
/// If the result is null and `missingOk` is true, this returns null. (This is
|
/// If the result is null and `missingOk` is true, this returns null. (This is
|
||||||
/// the behaviour of [OptionalMethodChannel.invokeMethod].)
|
/// the behaviour of [OptionalMethodChannel.invokeMethod].)
|
||||||
///
|
///
|
||||||
/// If the result is null and `missingOk` is false, this throwsa
|
/// If the result is null and `missingOk` is false, this throws a
|
||||||
/// [MissingPluginException]. (This is the behaviour of
|
/// [MissingPluginException]. (This is the behaviour of
|
||||||
/// [MethodChannel.invokeMethod].)
|
/// [MethodChannel.invokeMethod].)
|
||||||
///
|
///
|
||||||
|
@ -116,7 +116,7 @@ class RawKeyEventDataIos extends RawKeyEventData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If this key is printable, generate the LogicalKeyboardKey from its
|
// If this key is printable, generate the LogicalKeyboardKey from its
|
||||||
// Unicode value. Control keys such as ESC, CRTL, and SHIFT are not
|
// Unicode value. Control keys such as ESC, CTRL, and SHIFT are not
|
||||||
// printable. HOME, DEL, arrow keys, and function keys are considered
|
// printable. HOME, DEL, arrow keys, and function keys are considered
|
||||||
// modifier function keys, which generate invalid Unicode scalar values.
|
// modifier function keys, which generate invalid Unicode scalar values.
|
||||||
if (keyLabel.isNotEmpty &&
|
if (keyLabel.isNotEmpty &&
|
||||||
|
@ -85,7 +85,7 @@ class RawKeyEventDataMacOs extends RawKeyEventData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If this key is printable, generate the LogicalKeyboardKey from its
|
// If this key is printable, generate the LogicalKeyboardKey from its
|
||||||
// Unicode value. Control keys such as ESC, CRTL, and SHIFT are not
|
// Unicode value. Control keys such as ESC, CTRL, and SHIFT are not
|
||||||
// printable. HOME, DEL, arrow keys, and function keys are considered
|
// printable. HOME, DEL, arrow keys, and function keys are considered
|
||||||
// modifier function keys, which generate invalid Unicode scalar values.
|
// modifier function keys, which generate invalid Unicode scalar values.
|
||||||
if (keyLabel.isNotEmpty &&
|
if (keyLabel.isNotEmpty &&
|
||||||
|
@ -51,7 +51,7 @@ class SystemNavigator {
|
|||||||
|
|
||||||
/// Selects the multiple-entry history mode.
|
/// Selects the multiple-entry history mode.
|
||||||
///
|
///
|
||||||
/// On web, this switches the browser history model to one that tracks alll
|
/// On web, this switches the browser history model to one that tracks all
|
||||||
/// updates to [routeInformationUpdated] to form a history stack. This is the
|
/// updates to [routeInformationUpdated] to form a history stack. This is the
|
||||||
/// default.
|
/// default.
|
||||||
///
|
///
|
||||||
|
@ -391,7 +391,7 @@ class ToolbarOptions {
|
|||||||
/// [RenderEditable.selectWord], etc. programmatically.
|
/// [RenderEditable.selectWord], etc. programmatically.
|
||||||
///
|
///
|
||||||
/// {@template flutter.widgets.editableText.showCaretOnScreen}
|
/// {@template flutter.widgets.editableText.showCaretOnScreen}
|
||||||
/// ## Keep the caret visisble when focused
|
/// ## Keep the caret visible when focused
|
||||||
///
|
///
|
||||||
/// When focused, this widget will make attempts to keep the text area and its
|
/// When focused, this widget will make attempts to keep the text area and its
|
||||||
/// caret (even when [showCursor] is `false`) visible, on these occasions:
|
/// caret (even when [showCursor] is `false`) visible, on these occasions:
|
||||||
@ -1253,7 +1253,7 @@ class EditableText extends StatefulWidget {
|
|||||||
/// #### Autofill UI refuses to show up when I tap on the text field
|
/// #### Autofill UI refuses to show up when I tap on the text field
|
||||||
///
|
///
|
||||||
/// Check the device's system settings and make sure autofill is turned on,
|
/// Check the device's system settings and make sure autofill is turned on,
|
||||||
/// and there're available credentials stored in the autofill service.
|
/// and there are available credentials stored in the autofill service.
|
||||||
///
|
///
|
||||||
/// * iOS password autofill: Go to Settings -> Password, turn on "Autofill
|
/// * iOS password autofill: Go to Settings -> Password, turn on "Autofill
|
||||||
/// Passwords", and add new passwords for testing by pressing the top right
|
/// Passwords", and add new passwords for testing by pressing the top right
|
||||||
@ -1271,7 +1271,7 @@ class EditableText extends StatefulWidget {
|
|||||||
///
|
///
|
||||||
/// * Android autofill: Go to Settings -> System -> Languages & input ->
|
/// * Android autofill: Go to Settings -> System -> Languages & input ->
|
||||||
/// Autofill service. Enable the autofill service of your choice, and make
|
/// Autofill service. Enable the autofill service of your choice, and make
|
||||||
/// sure there're available credentials associated with your app.
|
/// sure there are available credentials associated with your app.
|
||||||
///
|
///
|
||||||
/// #### I called `TextInput.finishAutofillContext` but the autofill save
|
/// #### I called `TextInput.finishAutofillContext` but the autofill save
|
||||||
/// prompt isn't showing
|
/// prompt isn't showing
|
||||||
|
@ -427,7 +427,7 @@ class _HeroState extends State<Hero> {
|
|||||||
|
|
||||||
_placeholderSize = null;
|
_placeholderSize = null;
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
// Tell the widget to rebuild if it's mounted. _paceholderSize has already
|
// Tell the widget to rebuild if it's mounted. _placeholderSize has already
|
||||||
// been updated.
|
// been updated.
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
@ -626,7 +626,7 @@ class _HeroFlight {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _scheduledPerformAnimtationUpdate = false;
|
bool _scheduledPerformAnimationUpdate = false;
|
||||||
void _handleAnimationUpdate(AnimationStatus status) {
|
void _handleAnimationUpdate(AnimationStatus status) {
|
||||||
// The animation will not finish until the user lifts their finger, so we
|
// The animation will not finish until the user lifts their finger, so we
|
||||||
// should suppress the status update if the gesture is in progress, and
|
// should suppress the status update if the gesture is in progress, and
|
||||||
@ -636,23 +636,23 @@ class _HeroFlight {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_scheduledPerformAnimtationUpdate)
|
if (_scheduledPerformAnimationUpdate)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// The `navigator` must be non-null here, or the first if clause above would
|
// The `navigator` must be non-null here, or the first if clause above would
|
||||||
// have returned from this method.
|
// have returned from this method.
|
||||||
final NavigatorState navigator = manifest.fromRoute.navigator!;
|
final NavigatorState navigator = manifest.fromRoute.navigator!;
|
||||||
|
|
||||||
void delayedPerformAnimtationUpdate() {
|
void delayedPerformAnimationUpdate() {
|
||||||
assert(!navigator.userGestureInProgress);
|
assert(!navigator.userGestureInProgress);
|
||||||
assert(_scheduledPerformAnimtationUpdate);
|
assert(_scheduledPerformAnimationUpdate);
|
||||||
_scheduledPerformAnimtationUpdate = false;
|
_scheduledPerformAnimationUpdate = false;
|
||||||
navigator.userGestureInProgressNotifier.removeListener(delayedPerformAnimtationUpdate);
|
navigator.userGestureInProgressNotifier.removeListener(delayedPerformAnimationUpdate);
|
||||||
_performAnimationUpdate(_proxyAnimation.status);
|
_performAnimationUpdate(_proxyAnimation.status);
|
||||||
}
|
}
|
||||||
assert(navigator.userGestureInProgress);
|
assert(navigator.userGestureInProgress);
|
||||||
_scheduledPerformAnimtationUpdate = true;
|
_scheduledPerformAnimationUpdate = true;
|
||||||
navigator.userGestureInProgressNotifier.addListener(delayedPerformAnimtationUpdate);
|
navigator.userGestureInProgressNotifier.addListener(delayedPerformAnimationUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
void onTick() {
|
void onTick() {
|
||||||
@ -705,20 +705,20 @@ class _HeroFlight {
|
|||||||
|
|
||||||
manifest = initialManifest;
|
manifest = initialManifest;
|
||||||
|
|
||||||
final bool shouldIncludeChildInPlacehold;
|
final bool shouldIncludeChildInPlaceholder;
|
||||||
switch (manifest.type) {
|
switch (manifest.type) {
|
||||||
case HeroFlightDirection.pop:
|
case HeroFlightDirection.pop:
|
||||||
_proxyAnimation.parent = ReverseAnimation(manifest.animation);
|
_proxyAnimation.parent = ReverseAnimation(manifest.animation);
|
||||||
shouldIncludeChildInPlacehold = false;
|
shouldIncludeChildInPlaceholder = false;
|
||||||
break;
|
break;
|
||||||
case HeroFlightDirection.push:
|
case HeroFlightDirection.push:
|
||||||
_proxyAnimation.parent = manifest.animation;
|
_proxyAnimation.parent = manifest.animation;
|
||||||
shouldIncludeChildInPlacehold = true;
|
shouldIncludeChildInPlaceholder = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
heroRectTween = manifest.createHeroRectTween(begin: manifest.fromHeroLocation, end: manifest.toHeroLocation);
|
heroRectTween = manifest.createHeroRectTween(begin: manifest.fromHeroLocation, end: manifest.toHeroLocation);
|
||||||
manifest.fromHero.startFlight(shouldIncludedChildInPlaceholder: shouldIncludeChildInPlacehold);
|
manifest.fromHero.startFlight(shouldIncludedChildInPlaceholder: shouldIncludeChildInPlaceholder);
|
||||||
manifest.toHero.startFlight();
|
manifest.toHero.startFlight();
|
||||||
manifest.overlay.insert(overlayEntry = OverlayEntry(builder: _buildOverlay));
|
manifest.overlay.insert(overlayEntry = OverlayEntry(builder: _buildOverlay));
|
||||||
_proxyAnimation.addListener(onTick);
|
_proxyAnimation.addListener(onTick);
|
||||||
@ -955,7 +955,7 @@ class HeroController extends NavigatorObserver {
|
|||||||
// If the navigator or the overlay was removed before this end-of-frame
|
// If the navigator or the overlay was removed before this end-of-frame
|
||||||
// callback was called, then don't actually start a transition, and we don'
|
// callback was called, then don't actually start a transition, and we don'
|
||||||
// t have to worry about any Hero widget we might have hidden in a previous
|
// t have to worry about any Hero widget we might have hidden in a previous
|
||||||
// flight, or onging flights.
|
// flight, or ongoing flights.
|
||||||
if (navigator == null || overlay == null)
|
if (navigator == null || overlay == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -548,7 +548,7 @@ class InteractiveViewer extends StatefulWidget {
|
|||||||
///
|
///
|
||||||
/// At the time this is called, the [TransformationController] will have
|
/// At the time this is called, the [TransformationController] will have
|
||||||
/// already been updated to reflect the change caused by the interaction, if
|
/// already been updated to reflect the change caused by the interaction, if
|
||||||
/// the interation caused the matrix to change.
|
/// the interaction caused the matrix to change.
|
||||||
///
|
///
|
||||||
/// {@macro flutter.widgets.InteractiveViewer.onInteractionEnd}
|
/// {@macro flutter.widgets.InteractiveViewer.onInteractionEnd}
|
||||||
///
|
///
|
||||||
|
@ -420,7 +420,7 @@ class ScrollPhysics {
|
|||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
if (parent == null)
|
if (parent == null)
|
||||||
return objectRuntimeType(this, 'ScrollPhsyics');
|
return objectRuntimeType(this, 'ScrollPhysics');
|
||||||
return '${objectRuntimeType(this, 'ScrollPhysics')} -> $parent';
|
return '${objectRuntimeType(this, 'ScrollPhysics')} -> $parent';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -750,7 +750,7 @@ class SliverChildListDelegate extends SliverChildDelegate {
|
|||||||
///
|
///
|
||||||
/// See also:
|
/// See also:
|
||||||
///
|
///
|
||||||
/// * [KeepAlive], which marks whether its chlild widget should be kept alive.
|
/// * [KeepAlive], which marks whether its child widget should be kept alive.
|
||||||
/// * [SliverChildBuilderDelegate] and [SliverChildListDelegate], slivers
|
/// * [SliverChildBuilderDelegate] and [SliverChildListDelegate], slivers
|
||||||
/// which make usr of the keep alive functionality through the
|
/// which make usr of the keep alive functionality through the
|
||||||
/// `addAutomaticKeepAlives` property.
|
/// `addAutomaticKeepAlives` property.
|
||||||
|
@ -293,7 +293,7 @@ void main() {
|
|||||||
|
|
||||||
testWidgets(
|
testWidgets(
|
||||||
'When isAlwaysShown is true, '
|
'When isAlwaysShown is true, '
|
||||||
'must pass a controller or find PrimarySCrollController that is attached to a scroll view',
|
'must pass a controller or find PrimaryScrollController that is attached to a scroll view',
|
||||||
(WidgetTester tester) async {
|
(WidgetTester tester) async {
|
||||||
final ScrollController controller = ScrollController();
|
final ScrollController controller = ScrollController();
|
||||||
Widget viewWithScroll() {
|
Widget viewWithScroll() {
|
||||||
|
@ -279,7 +279,7 @@ package:dart-sdk/lib/async/schedule_microtask.dart 52:5
|
|||||||
package:dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 168:15 <fn>''';
|
package:dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 168:15 <fn>''';
|
||||||
|
|
||||||
const List<StackFrame> webStackTraceFrames = <StackFrame>[
|
const List<StackFrame> webStackTraceFrames = <StackFrame>[
|
||||||
StackFrame(number: -1, className: '<unknown>', method: 'throw_', packageScheme: 'package', package: 'dart-sdk', packagePath: 'lib/_intenral/js_dev_runtime/private/ddc_runtime/errors.dart', line: 196, column: 49, source: 'package:dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 196:49 throw_'),
|
StackFrame(number: -1, className: '<unknown>', method: 'throw_', packageScheme: 'package', package: 'dart-sdk', packagePath: 'lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart', line: 196, column: 49, source: 'package:dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 196:49 throw_'),
|
||||||
StackFrame(number: -1, className: '<unknown>', method: 'blah', packageScheme: 'package', package: 'assertions', packagePath: 'main.dart', line: 4, column: 3, source: 'package:assertions/main.dart 4:3 blah'),
|
StackFrame(number: -1, className: '<unknown>', method: 'blah', packageScheme: 'package', package: 'assertions', packagePath: 'main.dart', line: 4, column: 3, source: 'package:assertions/main.dart 4:3 blah'),
|
||||||
StackFrame(number: -1, className: '<unknown>', method: r'main$', packageScheme: 'package', package: 'assertions', packagePath: 'main.dart', line: 8, column: 5, source: r'package:assertions/main.dart 8:5 main$'),
|
StackFrame(number: -1, className: '<unknown>', method: r'main$', packageScheme: 'package', package: 'assertions', packagePath: 'main.dart', line: 8, column: 5, source: r'package:assertions/main.dart 8:5 main$'),
|
||||||
StackFrame(number: -1, className: '<unknown>', method: r'main$', packageScheme: 'package', package: 'assertions', packagePath: 'main_web_entrypoint.dart', line: 9, column: 3, source: r'package:assertions/main_web_entrypoint.dart 9:3 main$'),
|
StackFrame(number: -1, className: '<unknown>', method: r'main$', packageScheme: 'package', package: 'assertions', packagePath: 'main_web_entrypoint.dart', line: 9, column: 3, source: r'package:assertions/main_web_entrypoint.dart 9:3 main$'),
|
||||||
|
@ -687,7 +687,7 @@ void main() {
|
|||||||
|
|
||||||
resampler.stop(result.add);
|
resampler.stop(result.add);
|
||||||
|
|
||||||
// All pointer events should have been returned with orignal
|
// All pointer events should have been returned with original
|
||||||
// time stamps and positions.
|
// time stamps and positions.
|
||||||
expect(result.length, 6);
|
expect(result.length, 6);
|
||||||
expect(result[0].timeStamp, const Duration(microseconds: 1000));
|
expect(result[0].timeStamp, const Duration(microseconds: 1000));
|
||||||
|
@ -1941,7 +1941,7 @@ void main() {
|
|||||||
semantics.dispose();
|
semantics.dispose();
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('SliverAppBar with flexable space has correct semantics order', (WidgetTester tester) async {
|
testWidgets('SliverAppBar with flexible space has correct semantics order', (WidgetTester tester) async {
|
||||||
// Regression test for https://github.com/flutter/flutter/issues/64922.
|
// Regression test for https://github.com/flutter/flutter/issues/64922.
|
||||||
final SemanticsTester semantics = SemanticsTester(tester);
|
final SemanticsTester semantics = SemanticsTester(tester);
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ void main() {
|
|||||||
'koala',
|
'koala',
|
||||||
'lemur',
|
'lemur',
|
||||||
'mouse',
|
'mouse',
|
||||||
'northern white rhinocerous',
|
'northern white rhinoceros',
|
||||||
];
|
];
|
||||||
|
|
||||||
const List<User> kOptionsUsers = <User>[
|
const List<User> kOptionsUsers = <User>[
|
||||||
@ -100,7 +100,7 @@ void main() {
|
|||||||
expect(find.byType(ListView), findsOneWidget);
|
expect(find.byType(ListView), findsOneWidget);
|
||||||
list = find.byType(ListView).evaluate().first.widget as ListView;
|
list = find.byType(ListView).evaluate().first.widget as ListView;
|
||||||
// 'chameleon', 'elephant', 'goose', 'lemur', 'mouse', and
|
// 'chameleon', 'elephant', 'goose', 'lemur', 'mouse', and
|
||||||
// 'northern white rhinocerous' are displayed.
|
// 'northern white rhinoceros' are displayed.
|
||||||
expect(list.semanticChildCount, 6);
|
expect(list.semanticChildCount, 6);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -336,8 +336,8 @@ void main() {
|
|||||||
final Finder listFinder = find.byType(ListView);
|
final Finder listFinder = find.byType(ListView);
|
||||||
expect(listFinder, findsNothing);
|
expect(listFinder, findsNothing);
|
||||||
|
|
||||||
/// entering `a` returns 9 items(height > `maxOptionsheight`) from the kOptions
|
/// entering `a` returns 9 items(height > `maxOptionsHeight`) from the kOptions
|
||||||
/// so height gets restricted to `maxOptionsheight =250`
|
/// so height gets restricted to `maxOptionsHeight =250`
|
||||||
final double nineItemsHeight = await _getDefaultOptionsHeight(tester, 'a');
|
final double nineItemsHeight = await _getDefaultOptionsHeight(tester, 'a');
|
||||||
expect(nineItemsHeight, equals(maxOptionsHeight));
|
expect(nineItemsHeight, equals(maxOptionsHeight));
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ void main() {
|
|||||||
testWidgets('Theme shadowColor', (WidgetTester tester) async {
|
testWidgets('Theme shadowColor', (WidgetTester tester) async {
|
||||||
const ColorScheme colorScheme = ColorScheme.light();
|
const ColorScheme colorScheme = ColorScheme.light();
|
||||||
const Color shadowColor = Color(0xff000001);
|
const Color shadowColor = Color(0xff000001);
|
||||||
const Color overiddenColor = Color(0xff000002);
|
const Color overriddenColor = Color(0xff000002);
|
||||||
|
|
||||||
Widget buildFrame({ Color? overallShadowColor, Color? themeShadowColor, Color? shadowColor }) {
|
Widget buildFrame({ Color? overallShadowColor, Color? themeShadowColor, Color? shadowColor }) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
@ -243,12 +243,12 @@ void main() {
|
|||||||
material = tester.widget<Material>(buttonMaterialFinder);
|
material = tester.widget<Material>(buttonMaterialFinder);
|
||||||
expect(material.shadowColor, shadowColor);
|
expect(material.shadowColor, shadowColor);
|
||||||
|
|
||||||
await tester.pumpWidget(buildFrame(overallShadowColor: overiddenColor, themeShadowColor: shadowColor));
|
await tester.pumpWidget(buildFrame(overallShadowColor: overriddenColor, themeShadowColor: shadowColor));
|
||||||
await tester.pumpAndSettle(); // theme animation
|
await tester.pumpAndSettle(); // theme animation
|
||||||
material = tester.widget<Material>(buttonMaterialFinder);
|
material = tester.widget<Material>(buttonMaterialFinder);
|
||||||
expect(material.shadowColor, shadowColor);
|
expect(material.shadowColor, shadowColor);
|
||||||
|
|
||||||
await tester.pumpWidget(buildFrame(themeShadowColor: overiddenColor, shadowColor: shadowColor));
|
await tester.pumpWidget(buildFrame(themeShadowColor: overriddenColor, shadowColor: shadowColor));
|
||||||
await tester.pumpAndSettle(); // theme animation
|
await tester.pumpAndSettle(); // theme animation
|
||||||
material = tester.widget<Material>(buttonMaterialFinder);
|
material = tester.widget<Material>(buttonMaterialFinder);
|
||||||
expect(material.shadowColor, shadowColor);
|
expect(material.shadowColor, shadowColor);
|
||||||
|
@ -1048,7 +1048,7 @@ void main() {
|
|||||||
expect(feedback.hapticCount, 0);
|
expect(feedback.hapticCount, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('FloatingActionButton.enableFeedback is overriden by FloatingActionButtonThemeData.enableFeedback', (WidgetTester tester) async {
|
testWidgets('FloatingActionButton.enableFeedback is overridden by FloatingActionButtonThemeData.enableFeedback', (WidgetTester tester) async {
|
||||||
const bool enableFeedbackTheme = false;
|
const bool enableFeedbackTheme = false;
|
||||||
const bool enableFeedback = true;
|
const bool enableFeedback = true;
|
||||||
final ThemeData theme = ThemeData(
|
final ThemeData theme = ThemeData(
|
||||||
|
@ -190,7 +190,7 @@ void main() {
|
|||||||
testWidgets('Theme shadowColor', (WidgetTester tester) async {
|
testWidgets('Theme shadowColor', (WidgetTester tester) async {
|
||||||
const ColorScheme colorScheme = ColorScheme.light();
|
const ColorScheme colorScheme = ColorScheme.light();
|
||||||
const Color shadowColor = Color(0xff000001);
|
const Color shadowColor = Color(0xff000001);
|
||||||
const Color overiddenColor = Color(0xff000002);
|
const Color overriddenColor = Color(0xff000002);
|
||||||
|
|
||||||
Widget buildFrame({ Color? overallShadowColor, Color? themeShadowColor, Color? shadowColor }) {
|
Widget buildFrame({ Color? overallShadowColor, Color? themeShadowColor, Color? shadowColor }) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
@ -246,12 +246,12 @@ void main() {
|
|||||||
material = tester.widget<Material>(buttonMaterialFinder);
|
material = tester.widget<Material>(buttonMaterialFinder);
|
||||||
expect(material.shadowColor, shadowColor);
|
expect(material.shadowColor, shadowColor);
|
||||||
|
|
||||||
await tester.pumpWidget(buildFrame(overallShadowColor: overiddenColor, themeShadowColor: shadowColor));
|
await tester.pumpWidget(buildFrame(overallShadowColor: overriddenColor, themeShadowColor: shadowColor));
|
||||||
await tester.pumpAndSettle(); // theme animation
|
await tester.pumpAndSettle(); // theme animation
|
||||||
material = tester.widget<Material>(buttonMaterialFinder);
|
material = tester.widget<Material>(buttonMaterialFinder);
|
||||||
expect(material.shadowColor, shadowColor);
|
expect(material.shadowColor, shadowColor);
|
||||||
|
|
||||||
await tester.pumpWidget(buildFrame(themeShadowColor: overiddenColor, shadowColor: shadowColor));
|
await tester.pumpWidget(buildFrame(themeShadowColor: overriddenColor, shadowColor: shadowColor));
|
||||||
await tester.pumpAndSettle(); // theme animation
|
await tester.pumpAndSettle(); // theme animation
|
||||||
material = tester.widget<Material>(buttonMaterialFinder);
|
material = tester.widget<Material>(buttonMaterialFinder);
|
||||||
expect(material.shadowColor, shadowColor);
|
expect(material.shadowColor, shadowColor);
|
||||||
|
@ -322,7 +322,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Tap the first tiem
|
// Tap the first time
|
||||||
await tester.tap(find.text('Actions'));
|
await tester.tap(find.text('Actions'));
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
await tester.tap(find.text('First option'));
|
await tester.tap(find.text('First option'));
|
||||||
@ -343,7 +343,7 @@ void main() {
|
|||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
expect(menuItemTapCounters, <int>[2, 1]);
|
expect(menuItemTapCounters, <int>[2, 1]);
|
||||||
|
|
||||||
// Tap an iteem without onTap
|
// Tap an item without onTap
|
||||||
await tester.tap(find.text('Actions'));
|
await tester.tap(find.text('Actions'));
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
await tester.tap(find.text('Option without onTap'));
|
await tester.tap(find.text('Option without onTap'));
|
||||||
@ -413,7 +413,7 @@ void main() {
|
|||||||
expect(menuItemTapCounters, <int>[2, 1]);
|
expect(menuItemTapCounters, <int>[2, 1]);
|
||||||
expect(selected, 'second');
|
expect(selected, 'second');
|
||||||
|
|
||||||
// Tap an iteem without onTap
|
// Tap an item without onTap
|
||||||
await tester.tap(find.text('Actions'));
|
await tester.tap(find.text('Actions'));
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
await tester.tap(find.text('Option without onTap'));
|
await tester.tap(find.text('Option without onTap'));
|
||||||
@ -2275,7 +2275,7 @@ void main() {
|
|||||||
feedback.dispose();
|
feedback.dispose();
|
||||||
});
|
});
|
||||||
|
|
||||||
Widget buildFrame({ bool? widgetEnableFeedack, bool? themeEnableFeedback }) {
|
Widget buildFrame({ bool? widgetEnableFeedback, bool? themeEnableFeedback }) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
home: Scaffold(
|
home: Scaffold(
|
||||||
body: PopupMenuTheme(
|
body: PopupMenuTheme(
|
||||||
@ -2283,7 +2283,7 @@ void main() {
|
|||||||
enableFeedback: themeEnableFeedback,
|
enableFeedback: themeEnableFeedback,
|
||||||
),
|
),
|
||||||
child: PopupMenuButton<int>(
|
child: PopupMenuButton<int>(
|
||||||
enableFeedback: widgetEnableFeedack,
|
enableFeedback: widgetEnableFeedback,
|
||||||
child: const Text('Show Menu'),
|
child: const Text('Show Menu'),
|
||||||
itemBuilder: (BuildContext context) {
|
itemBuilder: (BuildContext context) {
|
||||||
return <PopupMenuItem<int>>[
|
return <PopupMenuItem<int>>[
|
||||||
@ -2304,7 +2304,7 @@ void main() {
|
|||||||
expect(feedback.hapticCount, 0);
|
expect(feedback.hapticCount, 0);
|
||||||
|
|
||||||
// PopupMenuButton with enabled feedback.
|
// PopupMenuButton with enabled feedback.
|
||||||
await tester.pumpWidget(buildFrame(widgetEnableFeedack: true));
|
await tester.pumpWidget(buildFrame(widgetEnableFeedback: true));
|
||||||
await tester.tap(find.text('Show Menu'));
|
await tester.tap(find.text('Show Menu'));
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
expect(feedback.clickSoundCount, 1);
|
expect(feedback.clickSoundCount, 1);
|
||||||
@ -2313,7 +2313,7 @@ void main() {
|
|||||||
await tester.pumpWidget(Container());
|
await tester.pumpWidget(Container());
|
||||||
|
|
||||||
// PopupMenuButton with disabled feedback.
|
// PopupMenuButton with disabled feedback.
|
||||||
await tester.pumpWidget(buildFrame(widgetEnableFeedack: false));
|
await tester.pumpWidget(buildFrame(widgetEnableFeedback: false));
|
||||||
await tester.tap(find.text('Show Menu'));
|
await tester.tap(find.text('Show Menu'));
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
expect(feedback.clickSoundCount, 1);
|
expect(feedback.clickSoundCount, 1);
|
||||||
@ -2340,7 +2340,7 @@ void main() {
|
|||||||
await tester.pumpWidget(Container());
|
await tester.pumpWidget(Container());
|
||||||
|
|
||||||
// PopupMenu enableFeedback property overrides PopupMenuButtonTheme.
|
// PopupMenu enableFeedback property overrides PopupMenuButtonTheme.
|
||||||
await tester.pumpWidget(buildFrame(widgetEnableFeedack: false,themeEnableFeedback: true));
|
await tester.pumpWidget(buildFrame(widgetEnableFeedback: false,themeEnableFeedback: true));
|
||||||
await tester.tap(find.text('Show Menu'));
|
await tester.tap(find.text('Show Menu'));
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
expect(feedback.clickSoundCount, 2);
|
expect(feedback.clickSoundCount, 2);
|
||||||
|
@ -185,7 +185,7 @@ void main() {
|
|||||||
testWidgets('Theme shadowColor', (WidgetTester tester) async {
|
testWidgets('Theme shadowColor', (WidgetTester tester) async {
|
||||||
const ColorScheme colorScheme = ColorScheme.light();
|
const ColorScheme colorScheme = ColorScheme.light();
|
||||||
const Color shadowColor = Color(0xff000001);
|
const Color shadowColor = Color(0xff000001);
|
||||||
const Color overiddenColor = Color(0xff000002);
|
const Color overriddenColor = Color(0xff000002);
|
||||||
|
|
||||||
Widget buildFrame({ Color? overallShadowColor, Color? themeShadowColor, Color? shadowColor }) {
|
Widget buildFrame({ Color? overallShadowColor, Color? themeShadowColor, Color? shadowColor }) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
@ -241,12 +241,12 @@ void main() {
|
|||||||
material = tester.widget<Material>(buttonMaterialFinder);
|
material = tester.widget<Material>(buttonMaterialFinder);
|
||||||
expect(material.shadowColor, shadowColor);
|
expect(material.shadowColor, shadowColor);
|
||||||
|
|
||||||
await tester.pumpWidget(buildFrame(overallShadowColor: overiddenColor, themeShadowColor: shadowColor));
|
await tester.pumpWidget(buildFrame(overallShadowColor: overriddenColor, themeShadowColor: shadowColor));
|
||||||
await tester.pumpAndSettle(); // theme animation
|
await tester.pumpAndSettle(); // theme animation
|
||||||
material = tester.widget<Material>(buttonMaterialFinder);
|
material = tester.widget<Material>(buttonMaterialFinder);
|
||||||
expect(material.shadowColor, shadowColor);
|
expect(material.shadowColor, shadowColor);
|
||||||
|
|
||||||
await tester.pumpWidget(buildFrame(themeShadowColor: overiddenColor, shadowColor: shadowColor));
|
await tester.pumpWidget(buildFrame(themeShadowColor: overriddenColor, shadowColor: shadowColor));
|
||||||
await tester.pumpAndSettle(); // theme animation
|
await tester.pumpAndSettle(); // theme animation
|
||||||
material = tester.widget<Material>(buttonMaterialFinder);
|
material = tester.widget<Material>(buttonMaterialFinder);
|
||||||
expect(material.shadowColor, shadowColor);
|
expect(material.shadowColor, shadowColor);
|
||||||
|
@ -2653,7 +2653,7 @@ void main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const String hintPlaceholder = 'Placeholder';
|
const String hintPlaceholder = 'Placeholder';
|
||||||
const String multipleLineText = "Here's a text, which is more than one line, to demostrate the multiple line hint text";
|
const String multipleLineText = "Here's a text, which is more than one line, to demonstrate the multiple line hint text";
|
||||||
await tester.pumpWidget(builder(null, hintPlaceholder));
|
await tester.pumpWidget(builder(null, hintPlaceholder));
|
||||||
|
|
||||||
RenderBox findHintText(String hint) => tester.renderObject(find.text(hint));
|
RenderBox findHintText(String hint) => tester.renderObject(find.text(hint));
|
||||||
|
@ -549,7 +549,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Regression test for https://github.com/flutter/flutter/issues/34847.
|
// Regression test for https://github.com/flutter/flutter/issues/34847.
|
||||||
testWidgets("reset resets the text field's value to empty when intialValue is null", (WidgetTester tester) async {
|
testWidgets("reset resets the text field's value to empty when initialValue is null", (WidgetTester tester) async {
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
home: Material(
|
home: Material(
|
||||||
|
@ -313,11 +313,11 @@ void main() {
|
|||||||
expect(parentData.offset.dx, isNot(equals(0.0)));
|
expect(parentData.offset.dx, isNot(equals(0.0)));
|
||||||
paddedBox.child = null;
|
paddedBox.child = null;
|
||||||
|
|
||||||
final RenderConstrainedBox constraintedBox = RenderConstrainedBox(
|
final RenderConstrainedBox constrainedBox = RenderConstrainedBox(
|
||||||
child: coloredBox,
|
child: coloredBox,
|
||||||
additionalConstraints: const BoxConstraints(),
|
additionalConstraints: const BoxConstraints(),
|
||||||
);
|
);
|
||||||
layout(constraintedBox);
|
layout(constrainedBox);
|
||||||
expect(coloredBox.parentData?.runtimeType, ParentData);
|
expect(coloredBox.parentData?.runtimeType, ParentData);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -379,7 +379,7 @@ void main() {
|
|||||||
expect(unconstrained.getMaxIntrinsicWidth(100.0), equals(200.0));
|
expect(unconstrained.getMaxIntrinsicWidth(100.0), equals(200.0));
|
||||||
});
|
});
|
||||||
|
|
||||||
group('ConstraintsTransfromBox', () {
|
group('ConstraintsTransformBox', () {
|
||||||
FlutterErrorDetails? firstErrorDetails;
|
FlutterErrorDetails? firstErrorDetails;
|
||||||
void exhaustErrors() {
|
void exhaustErrors() {
|
||||||
FlutterErrorDetails? next;
|
FlutterErrorDetails? next;
|
||||||
|
@ -93,10 +93,10 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('should be 5 when offset is 6 times greater than a specific item extent where the division will return more than 13 zero decimals', () {
|
test('should be 5 when offset is 6 times greater than a specific item extent where the division will return more than 13 zero decimals', () {
|
||||||
const double itemExtentSpecificForAProblematicSreenSize = 411.42857142857144;
|
const double itemExtentSpecificForAProblematicScreenSize = 411.42857142857144;
|
||||||
final int actual = testGetMaxChildIndexForScrollOffset(
|
final int actual = testGetMaxChildIndexForScrollOffset(
|
||||||
itemExtentSpecificForAProblematicSreenSize * 6 + extraValueToHaveRoundingIssues,
|
itemExtentSpecificForAProblematicScreenSize * 6 + extraValueToHaveRoundingIssues,
|
||||||
itemExtentSpecificForAProblematicSreenSize,
|
itemExtentSpecificForAProblematicScreenSize,
|
||||||
);
|
);
|
||||||
expect(actual, 5);
|
expect(actual, 5);
|
||||||
});
|
});
|
||||||
|
@ -119,7 +119,7 @@ void main() {
|
|||||||
expect(manager.updateScheduled, isFalse);
|
expect(manager.updateScheduled, isFalse);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('claim child with exisiting data', () {
|
test('claim child with existing data', () {
|
||||||
final MockRestorationManager manager = MockRestorationManager();
|
final MockRestorationManager manager = MockRestorationManager();
|
||||||
final Map<String, dynamic> rawData = _createRawDataSet();
|
final Map<String, dynamic> rawData = _createRawDataSet();
|
||||||
final RestorationBucket bucket = RestorationBucket.root(manager: manager, rawData: rawData);
|
final RestorationBucket bucket = RestorationBucket.root(manager: manager, rawData: rawData);
|
||||||
@ -139,7 +139,7 @@ void main() {
|
|||||||
expect(manager.updateScheduled, isFalse);
|
expect(manager.updateScheduled, isFalse);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('claim child with no exisiting data', () {
|
test('claim child with no existing data', () {
|
||||||
final MockRestorationManager manager = MockRestorationManager();
|
final MockRestorationManager manager = MockRestorationManager();
|
||||||
final Map<String, dynamic> rawData = _createRawDataSet();
|
final Map<String, dynamic> rawData = _createRawDataSet();
|
||||||
final RestorationBucket bucket = RestorationBucket.root(manager: manager, rawData: rawData);
|
final RestorationBucket bucket = RestorationBucket.root(manager: manager, rawData: rawData);
|
||||||
|
@ -35,7 +35,7 @@ void main() {
|
|||||||
'koala',
|
'koala',
|
||||||
'lemur',
|
'lemur',
|
||||||
'mouse',
|
'mouse',
|
||||||
'northern white rhinocerous',
|
'northern white rhinoceros',
|
||||||
];
|
];
|
||||||
|
|
||||||
const List<User> kOptionsUsers = <User>[
|
const List<User> kOptionsUsers = <User>[
|
||||||
@ -125,7 +125,7 @@ void main() {
|
|||||||
expect(lastOptions.elementAt(2), 'goose');
|
expect(lastOptions.elementAt(2), 'goose');
|
||||||
expect(lastOptions.elementAt(3), 'lemur');
|
expect(lastOptions.elementAt(3), 'lemur');
|
||||||
expect(lastOptions.elementAt(4), 'mouse');
|
expect(lastOptions.elementAt(4), 'mouse');
|
||||||
expect(lastOptions.elementAt(5), 'northern white rhinocerous');
|
expect(lastOptions.elementAt(5), 'northern white rhinoceros');
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('can filter and select a list of custom User options', (WidgetTester tester) async {
|
testWidgets('can filter and select a list of custom User options', (WidgetTester tester) async {
|
||||||
|
@ -387,7 +387,7 @@ void main() {
|
|||||||
expect(mockCanvas.rects, isEmpty);
|
expect(mockCanvas.rects, isEmpty);
|
||||||
expect(mockCanvas.paints, isEmpty);
|
expect(mockCanvas.paints, isEmpty);
|
||||||
expect(mockContext.children, isEmpty);
|
expect(mockContext.children, isEmpty);
|
||||||
expect(mockContext.offets, isEmpty);
|
expect(mockContext.offsets, isEmpty);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('ColoredBox - no size, child', (WidgetTester tester) async {
|
testWidgets('ColoredBox - no size, child', (WidgetTester tester) async {
|
||||||
@ -411,7 +411,7 @@ void main() {
|
|||||||
expect(mockCanvas.rects, isEmpty);
|
expect(mockCanvas.rects, isEmpty);
|
||||||
expect(mockCanvas.paints, isEmpty);
|
expect(mockCanvas.paints, isEmpty);
|
||||||
expect(mockContext.children.single, renderSizedBox);
|
expect(mockContext.children.single, renderSizedBox);
|
||||||
expect(mockContext.offets.single, Offset.zero);
|
expect(mockContext.offsets.single, Offset.zero);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('ColoredBox - size, no child', (WidgetTester tester) async {
|
testWidgets('ColoredBox - size, no child', (WidgetTester tester) async {
|
||||||
@ -424,7 +424,7 @@ void main() {
|
|||||||
expect(mockCanvas.rects.single, const Rect.fromLTWH(0, 0, 800, 600));
|
expect(mockCanvas.rects.single, const Rect.fromLTWH(0, 0, 800, 600));
|
||||||
expect(mockCanvas.paints.single.color, colorToPaint);
|
expect(mockCanvas.paints.single.color, colorToPaint);
|
||||||
expect(mockContext.children, isEmpty);
|
expect(mockContext.children, isEmpty);
|
||||||
expect(mockContext.offets, isEmpty);
|
expect(mockContext.offsets, isEmpty);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('ColoredBox - size, child', (WidgetTester tester) async {
|
testWidgets('ColoredBox - size, child', (WidgetTester tester) async {
|
||||||
@ -440,7 +440,7 @@ void main() {
|
|||||||
expect(mockCanvas.rects.single, const Rect.fromLTWH(0, 0, 800, 600));
|
expect(mockCanvas.rects.single, const Rect.fromLTWH(0, 0, 800, 600));
|
||||||
expect(mockCanvas.paints.single.color, colorToPaint);
|
expect(mockCanvas.paints.single.color, colorToPaint);
|
||||||
expect(mockContext.children.single, renderSizedBox);
|
expect(mockContext.children.single, renderSizedBox);
|
||||||
expect(mockContext.offets.single, Offset.zero);
|
expect(mockContext.offsets.single, Offset.zero);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('ColoredBox - properties', (WidgetTester tester) async {
|
testWidgets('ColoredBox - properties', (WidgetTester tester) async {
|
||||||
@ -666,7 +666,7 @@ class DoesNotHitRenderBox extends Matcher {
|
|||||||
|
|
||||||
class _MockPaintingContext extends Fake implements PaintingContext {
|
class _MockPaintingContext extends Fake implements PaintingContext {
|
||||||
final List<RenderObject> children = <RenderObject>[];
|
final List<RenderObject> children = <RenderObject>[];
|
||||||
final List<Offset> offets = <Offset>[];
|
final List<Offset> offsets = <Offset>[];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final _MockCanvas canvas = _MockCanvas();
|
final _MockCanvas canvas = _MockCanvas();
|
||||||
@ -674,7 +674,7 @@ class _MockPaintingContext extends Fake implements PaintingContext {
|
|||||||
@override
|
@override
|
||||||
void paintChild(RenderObject child, Offset offset) {
|
void paintChild(RenderObject child, Offset offset) {
|
||||||
children.add(child);
|
children.add(child);
|
||||||
offets.add(offset);
|
offsets.add(offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3817,7 +3817,7 @@ void main() {
|
|||||||
await tester.pump();
|
await tester.pump();
|
||||||
|
|
||||||
expect(renderEditable.text!.children, isNull);
|
expect(renderEditable.text!.children, isNull);
|
||||||
// Everything's just formated the same way now.
|
// Everything's just formatted the same way now.
|
||||||
expect(renderEditable.text!.text, 'text composing text');
|
expect(renderEditable.text!.text, 'text composing text');
|
||||||
expect(renderEditable.text!.style!.decoration, isNull);
|
expect(renderEditable.text!.style!.decoration, isNull);
|
||||||
});
|
});
|
||||||
|
@ -2974,7 +2974,7 @@ Future<void> main() async {
|
|||||||
navigatorKey.currentState?.pop();
|
navigatorKey.currentState?.pop();
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
controller.jumpTo(1000);
|
controller.jumpTo(1000);
|
||||||
// Starts Hero animation and scroll animation almost simutaneously.
|
// Starts Hero animation and scroll animation almost simultaneously.
|
||||||
// Scroll to make the Hero invisible.
|
// Scroll to make the Hero invisible.
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
expect(findRenderOpacity()?.opacity, anyOf(isNull, 1.0));
|
expect(findRenderOpacity()?.opacity, anyOf(isNull, 1.0));
|
||||||
|
@ -2649,7 +2649,7 @@ void main() {
|
|||||||
expect(logs, isEmpty);
|
expect(logs, isEmpty);
|
||||||
expect(controller.dispatchedPointerEvents, isEmpty);
|
expect(controller.dispatchedPointerEvents, isEmpty);
|
||||||
|
|
||||||
// Test: Transluscent
|
// Test: Translucent
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
scaffold(PlatformViewSurface(
|
scaffold(PlatformViewSurface(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
|
@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('Router state restoration without RouteInfomrationProvider', (WidgetTester tester) async {
|
testWidgets('Router state restoration without RouteInformationProvider', (WidgetTester tester) async {
|
||||||
final UniqueKey router = UniqueKey();
|
final UniqueKey router = UniqueKey();
|
||||||
_TestRouterDelegate delegate() => tester.widget<Router<Object?>>(find.byKey(router)).routerDelegate as _TestRouterDelegate;
|
_TestRouterDelegate delegate() => tester.widget<Router<Object?>>(find.byKey(router)).routerDelegate as _TestRouterDelegate;
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ void main() {
|
|||||||
expect(delegate().restoredRoutePaths, <String>['/foo', '/foo']);
|
expect(delegate().restoredRoutePaths, <String>['/foo', '/foo']);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Router state restoration with RouteInfomrationProvider', (WidgetTester tester) async {
|
testWidgets('Router state restoration with RouteInformationProvider', (WidgetTester tester) async {
|
||||||
final UniqueKey router = UniqueKey();
|
final UniqueKey router = UniqueKey();
|
||||||
_TestRouterDelegate delegate() => tester.widget<Router<Object?>>(find.byKey(router)).routerDelegate as _TestRouterDelegate;
|
_TestRouterDelegate delegate() => tester.widget<Router<Object?>>(find.byKey(router)).routerDelegate as _TestRouterDelegate;
|
||||||
_TestRouteInformationProvider provider() => tester.widget<Router<Object?>>(find.byKey(router)).routeInformationProvider! as _TestRouteInformationProvider;
|
_TestRouteInformationProvider provider() => tester.widget<Router<Object?>>(find.byKey(router)).routeInformationProvider! as _TestRouteInformationProvider;
|
||||||
|
@ -263,7 +263,7 @@ void main() {
|
|||||||
},
|
},
|
||||||
onPopRoute: () {
|
onPopRoute: () {
|
||||||
provider.value = const RouteInformation(
|
provider.value = const RouteInformation(
|
||||||
location: 'popped outter',
|
location: 'popped outer',
|
||||||
);
|
);
|
||||||
return SynchronousFuture<bool>(true);
|
return SynchronousFuture<bool>(true);
|
||||||
},
|
},
|
||||||
@ -332,7 +332,7 @@ void main() {
|
|||||||
},
|
},
|
||||||
onPopRoute: () {
|
onPopRoute: () {
|
||||||
provider.value = const RouteInformation(
|
provider.value = const RouteInformation(
|
||||||
location: 'popped outter',
|
location: 'popped outer',
|
||||||
);
|
);
|
||||||
return SynchronousFuture<bool>(true);
|
return SynchronousFuture<bool>(true);
|
||||||
},
|
},
|
||||||
@ -347,7 +347,7 @@ void main() {
|
|||||||
result = await outerDispatcher.invokeCallback(SynchronousFuture<bool>(false));
|
result = await outerDispatcher.invokeCallback(SynchronousFuture<bool>(false));
|
||||||
expect(result, isTrue);
|
expect(result, isTrue);
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
expect(find.text('popped outter'), findsOneWidget);
|
expect(find.text('popped outer'), findsOneWidget);
|
||||||
|
|
||||||
innerDispatcher1.takePriority();
|
innerDispatcher1.takePriority();
|
||||||
result = false;
|
result = false;
|
||||||
@ -466,7 +466,7 @@ testWidgets('ChildBackButtonDispatcher take priority recursively', (WidgetTester
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
// This should work without calling the takePrioirty on the innerDispatcher2
|
// This should work without calling the takePriority on the innerDispatcher2
|
||||||
// and the innerDispatcher1.
|
// and the innerDispatcher1.
|
||||||
innerDispatcher3.takePriority();
|
innerDispatcher3.takePriority();
|
||||||
bool result = false;
|
bool result = false;
|
||||||
@ -757,7 +757,7 @@ testWidgets('ChildBackButtonDispatcher take priority recursively', (WidgetTester
|
|||||||
},
|
},
|
||||||
onPopRoute: () {
|
onPopRoute: () {
|
||||||
provider.value = const RouteInformation(
|
provider.value = const RouteInformation(
|
||||||
location: 'popped outter',
|
location: 'popped outer',
|
||||||
);
|
);
|
||||||
return SynchronousFuture<bool>(true);
|
return SynchronousFuture<bool>(true);
|
||||||
},
|
},
|
||||||
@ -799,7 +799,7 @@ testWidgets('ChildBackButtonDispatcher take priority recursively', (WidgetTester
|
|||||||
}
|
}
|
||||||
..onPopRoute = () {
|
..onPopRoute = () {
|
||||||
provider.value = const RouteInformation(
|
provider.value = const RouteInformation(
|
||||||
location: 'popped outter',
|
location: 'popped outer',
|
||||||
);
|
);
|
||||||
return SynchronousFuture<bool>(true);
|
return SynchronousFuture<bool>(true);
|
||||||
};
|
};
|
||||||
@ -833,7 +833,7 @@ testWidgets('ChildBackButtonDispatcher take priority recursively', (WidgetTester
|
|||||||
}
|
}
|
||||||
..onPopRoute = () {
|
..onPopRoute = () {
|
||||||
provider.value = const RouteInformation(
|
provider.value = const RouteInformation(
|
||||||
location: 'popped outter',
|
location: 'popped outer',
|
||||||
);
|
);
|
||||||
return SynchronousFuture<bool>(true);
|
return SynchronousFuture<bool>(true);
|
||||||
};
|
};
|
||||||
@ -878,7 +878,7 @@ testWidgets('ChildBackButtonDispatcher take priority recursively', (WidgetTester
|
|||||||
}
|
}
|
||||||
..onPopRoute = () {
|
..onPopRoute = () {
|
||||||
provider.value = const RouteInformation(
|
provider.value = const RouteInformation(
|
||||||
location: 'popped outter',
|
location: 'popped outer',
|
||||||
);
|
);
|
||||||
return SynchronousFuture<bool>(true);
|
return SynchronousFuture<bool>(true);
|
||||||
};
|
};
|
||||||
@ -903,7 +903,7 @@ testWidgets('ChildBackButtonDispatcher take priority recursively', (WidgetTester
|
|||||||
}
|
}
|
||||||
..onPopRoute = () {
|
..onPopRoute = () {
|
||||||
provider.value = const RouteInformation(
|
provider.value = const RouteInformation(
|
||||||
location: 'popped outter',
|
location: 'popped outer',
|
||||||
);
|
);
|
||||||
return SynchronousFuture<bool>(true);
|
return SynchronousFuture<bool>(true);
|
||||||
};
|
};
|
||||||
@ -919,7 +919,7 @@ testWidgets('ChildBackButtonDispatcher take priority recursively', (WidgetTester
|
|||||||
await tester.pump();
|
await tester.pump();
|
||||||
await outerDispatcher.invokeCallback(SynchronousFuture<bool>(false));
|
await outerDispatcher.invokeCallback(SynchronousFuture<bool>(false));
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
expect(find.text('popped outter'), findsOneWidget);
|
expect(find.text('popped outer'), findsOneWidget);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Nested backButtonListener should take priority', (WidgetTester tester) async {
|
testWidgets('Nested backButtonListener should take priority', (WidgetTester tester) async {
|
||||||
@ -961,7 +961,7 @@ testWidgets('ChildBackButtonDispatcher take priority recursively', (WidgetTester
|
|||||||
},
|
},
|
||||||
onPopRoute: () {
|
onPopRoute: () {
|
||||||
provider.value = const RouteInformation(
|
provider.value = const RouteInformation(
|
||||||
location: 'popped outter',
|
location: 'popped outer',
|
||||||
);
|
);
|
||||||
return SynchronousFuture<bool>(true);
|
return SynchronousFuture<bool>(true);
|
||||||
},
|
},
|
||||||
@ -1016,7 +1016,7 @@ testWidgets('ChildBackButtonDispatcher take priority recursively', (WidgetTester
|
|||||||
},
|
},
|
||||||
onPopRoute: () {
|
onPopRoute: () {
|
||||||
provider.value = const RouteInformation(
|
provider.value = const RouteInformation(
|
||||||
location: 'popped outter',
|
location: 'popped outer',
|
||||||
);
|
);
|
||||||
return SynchronousFuture<bool>(true);
|
return SynchronousFuture<bool>(true);
|
||||||
},
|
},
|
||||||
@ -1065,7 +1065,7 @@ testWidgets('ChildBackButtonDispatcher take priority recursively', (WidgetTester
|
|||||||
}
|
}
|
||||||
..onPopRoute = () {
|
..onPopRoute = () {
|
||||||
provider.value = const RouteInformation(
|
provider.value = const RouteInformation(
|
||||||
location: 'popped outter',
|
location: 'popped outer',
|
||||||
);
|
);
|
||||||
return SynchronousFuture<bool>(true);
|
return SynchronousFuture<bool>(true);
|
||||||
};
|
};
|
||||||
|
@ -979,7 +979,7 @@ void main() {
|
|||||||
expect(find.byType(ModalBarrier), findsNWidgets(1));
|
expect(find.byType(ModalBarrier), findsNWidgets(1));
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('showGeneralDialog adds non-dismissable barrier when barrierDismissable is false', (WidgetTester tester) async {
|
testWidgets('showGeneralDialog adds non-dismissible barrier when barrierDismissible is false', (WidgetTester tester) async {
|
||||||
await tester.pumpWidget(MaterialApp(
|
await tester.pumpWidget(MaterialApp(
|
||||||
home: Builder(
|
home: Builder(
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
|
@ -74,7 +74,7 @@ void main() {
|
|||||||
expect(find.text('Hendricks'), findsOneWidget);
|
expect(find.text('Hendricks'), findsOneWidget);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Stops listening to old listenable after chainging listenable', (WidgetTester tester) async {
|
testWidgets('Stops listening to old listenable after changing listenable', (WidgetTester tester) async {
|
||||||
await tester.pumpWidget(textBuilderUnderTest);
|
await tester.pumpWidget(textBuilderUnderTest);
|
||||||
|
|
||||||
valueListenable.value = 'Gilfoyle';
|
valueListenable.value = 'Gilfoyle';
|
||||||
|
@ -114,7 +114,7 @@ class CyclicDiagnostic extends DiagnosticableTree {
|
|||||||
final String name;
|
final String name;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toStringShort() => '${objectRuntimeType(this, 'CyclicDiagnistic')}-$name';
|
String toStringShort() => '${objectRuntimeType(this, 'CyclicDiagnostic')}-$name';
|
||||||
|
|
||||||
// We have to override toString to avoid the toString call itself triggering a
|
// We have to override toString to avoid the toString call itself triggering a
|
||||||
// stack overflow.
|
// stack overflow.
|
||||||
@ -1659,6 +1659,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||||||
expect(alternateChildJson['valueId'], equals(childJson['valueId']));
|
expect(alternateChildJson['valueId'], equals(childJson['valueId']));
|
||||||
alternateChildrenJson = (await service.testExtension('getChildrenSummaryTree', <String, String>{'arg': childJson['objectId']! as String, 'objectGroup': group}))! as List<Object?>;
|
alternateChildrenJson = (await service.testExtension('getChildrenSummaryTree', <String, String>{'arg': childJson['objectId']! as String, 'objectGroup': group}))! as List<Object?>;
|
||||||
expect(alternateChildrenJson.length , equals(0));
|
expect(alternateChildrenJson.length , equals(0));
|
||||||
|
// Tests are failing when this typo is fixed.
|
||||||
expect(childJson['chidlren'], isNull);
|
expect(childJson['chidlren'], isNull);
|
||||||
}, skip: !WidgetInspectorService.instance.isWidgetCreationTracked()); // Test requires --track-widget-creation flag.
|
}, skip: !WidgetInspectorService.instance.isWidgetCreationTracked()); // Test requires --track-widget-creation flag.
|
||||||
|
|
||||||
|
@ -83,9 +83,9 @@ class WaitForAbsent extends CommandWithTarget {
|
|||||||
/// A Flutter Driver command that waits until [finder] can be tapped.
|
/// A Flutter Driver command that waits until [finder] can be tapped.
|
||||||
class WaitForTappable extends CommandWithTarget {
|
class WaitForTappable extends CommandWithTarget {
|
||||||
/// Creates a command that waits for the widget identified by [finder] to
|
/// Creates a command that waits for the widget identified by [finder] to
|
||||||
/// be tappable within the [timeout] amiount of time.
|
/// be tappable within the [timeout] amount of time.
|
||||||
///
|
///
|
||||||
/// If [timeout] is not specified, the command defuts to no timeout.
|
/// If [timeout] is not specified, the command defaults to no timeout.
|
||||||
WaitForTappable(SerializableFinder finder, {Duration? timeout})
|
WaitForTappable(SerializableFinder finder, {Duration? timeout})
|
||||||
: super(finder, timeout: timeout);
|
: super(finder, timeout: timeout);
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ class VMServiceFlutterDriver extends FlutterDriver {
|
|||||||
future: _waitForRootIsolate(),
|
future: _waitForRootIsolate(),
|
||||||
timeout: kUnusuallyLongTimeout,
|
timeout: kUnusuallyLongTimeout,
|
||||||
message: isolateNumber == null
|
message: isolateNumber == null
|
||||||
? 'The root isolate is taking an unuusally long time to start.'
|
? 'The root isolate is taking an unusually long time to start.'
|
||||||
: 'Isolate $isolateNumber is taking an unusually long time to start.',
|
: 'Isolate $isolateNumber is taking an unusually long time to start.',
|
||||||
))!;
|
))!;
|
||||||
_log('Isolate found with number: ${isolateRef.number}');
|
_log('Isolate found with number: ${isolateRef.number}');
|
||||||
|
@ -258,7 +258,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
testWidgets(
|
testWidgets(
|
||||||
"waiting for NoPendingPlatformMessages returns immediately when there're no platform messages", (WidgetTester tester) async {
|
'waiting for NoPendingPlatformMessages returns immediately when there are no platform messages', (WidgetTester tester) async {
|
||||||
driverExtension
|
driverExtension
|
||||||
.call(const WaitForCondition(NoPendingPlatformMessages()).serialize())
|
.call(const WaitForCondition(NoPendingPlatformMessages()).serialize())
|
||||||
.then<void>(expectAsync1((Map<String, dynamic> r) {
|
.then<void>(expectAsync1((Map<String, dynamic> r) {
|
||||||
|
@ -154,7 +154,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
expect(log, <String>[
|
expect(log, <String>[
|
||||||
'VMServiceFlutterDriver: Connecting to Flutter application at ',
|
'VMServiceFlutterDriver: Connecting to Flutter application at ',
|
||||||
'VMServiceFlutterDriver: The root isolate is taking an unuusally long time to start.',
|
'VMServiceFlutterDriver: The root isolate is taking an unusually long time to start.',
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ void loadDateIntlDataIfNotLoaded() {
|
|||||||
// TODO(garyq): Add support for scriptCodes. Do not strip scriptCode from string.
|
// TODO(garyq): Add support for scriptCodes. Do not strip scriptCode from string.
|
||||||
|
|
||||||
// Keeps track of initialized locales. This can only happen if a locale
|
// Keeps track of initialized locales. This can only happen if a locale
|
||||||
// with a stripped scriptCode has already been initialzed. The set of
|
// with a stripped scriptCode has already been initialized. The set of
|
||||||
// initialized locales should be removed when scriptCode stripping is
|
// initialized locales should be removed when scriptCode stripping is
|
||||||
// removed.
|
// removed.
|
||||||
final Set<String> initializedLocales = <String>{};
|
final Set<String> initializedLocales = <String>{};
|
||||||
|
@ -48,7 +48,7 @@ void main() {
|
|||||||
await tester.pumpWidget(Container());
|
await tester.pumpWidget(Container());
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Locale without coutryCode', (WidgetTester tester) async {
|
testWidgets('Locale without countryCode', (WidgetTester tester) async {
|
||||||
// Regression test for https://github.com/flutter/flutter/pull/16782
|
// Regression test for https://github.com/flutter/flutter/pull/16782
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
|
@ -25,7 +25,7 @@ Iterable<Element> collectAllElementsFrom(
|
|||||||
|
|
||||||
/// Provides a recursive, efficient, depth first search of an element tree.
|
/// Provides a recursive, efficient, depth first search of an element tree.
|
||||||
///
|
///
|
||||||
/// [Element.visitChildren] does not guarnatee order, but does guarnatee stable
|
/// [Element.visitChildren] does not guarantee order, but does guarantee stable
|
||||||
/// order. This iterator also guarantees stable order, and iterates in a left
|
/// order. This iterator also guarantees stable order, and iterates in a left
|
||||||
/// to right order:
|
/// to right order:
|
||||||
///
|
///
|
||||||
|
@ -204,7 +204,7 @@ abstract class WebGoldenComparator {
|
|||||||
/// When using `flutter test --platform=chrome`, a comparator implemented by
|
/// When using `flutter test --platform=chrome`, a comparator implemented by
|
||||||
/// [DefaultWebGoldenComparator] is used if no other comparator is specified. It
|
/// [DefaultWebGoldenComparator] is used if no other comparator is specified. It
|
||||||
/// will send a request to the test server, which uses [goldenFileComparator]
|
/// will send a request to the test server, which uses [goldenFileComparator]
|
||||||
/// for golden file compatison.
|
/// for golden file comparison.
|
||||||
///
|
///
|
||||||
/// When using `flutter test --update-goldens`, the [DefaultWebGoldenComparator]
|
/// When using `flutter test --update-goldens`, the [DefaultWebGoldenComparator]
|
||||||
/// updates the files on disk to match the rendering.
|
/// updates the files on disk to match the rendering.
|
||||||
|
@ -45,7 +45,7 @@ class _AsyncScope {
|
|||||||
/// });
|
/// });
|
||||||
/// ```
|
/// ```
|
||||||
class TestAsyncUtils {
|
class TestAsyncUtils {
|
||||||
// This class is not meant to be instatiated or extended; this constructor
|
// This class is not meant to be instantiated or extended; this constructor
|
||||||
// prevents instantiation and extension.
|
// prevents instantiation and extension.
|
||||||
TestAsyncUtils._();
|
TestAsyncUtils._();
|
||||||
static const String _className = 'TestAsyncUtils';
|
static const String _className = 'TestAsyncUtils';
|
||||||
|
@ -160,7 +160,7 @@ def flutter_install_ios_engine_pod(ios_application_path = nil)
|
|||||||
|
|
||||||
# Generate a fake podspec to represent the Flutter framework.
|
# Generate a fake podspec to represent the Flutter framework.
|
||||||
# This is only necessary because plugin podspecs contain `s.dependency 'Flutter'`, and if this Podfile
|
# This is only necessary because plugin podspecs contain `s.dependency 'Flutter'`, and if this Podfile
|
||||||
# does not add a `pod 'Flutter'` CocoaPods will try to download it from the CoocaPods trunk.
|
# does not add a `pod 'Flutter'` CocoaPods will try to download it from the CocoaPods trunk.
|
||||||
File.open(copied_podspec_path, 'w') { |podspec|
|
File.open(copied_podspec_path, 'w') { |podspec|
|
||||||
podspec.write <<~EOF
|
podspec.write <<~EOF
|
||||||
#
|
#
|
||||||
@ -198,7 +198,7 @@ def flutter_install_macos_engine_pod(mac_application_path = nil)
|
|||||||
|
|
||||||
# Generate a fake podspec to represent the FlutterMacOS framework.
|
# Generate a fake podspec to represent the FlutterMacOS framework.
|
||||||
# This is only necessary because plugin podspecs contain `s.dependency 'FlutterMacOS'`, and if this Podfile
|
# This is only necessary because plugin podspecs contain `s.dependency 'FlutterMacOS'`, and if this Podfile
|
||||||
# does not add a `pod 'FlutterMacOS'` CocoaPods will try to download it from the CoocaPods trunk.
|
# does not add a `pod 'FlutterMacOS'` CocoaPods will try to download it from the CocoaPods trunk.
|
||||||
File.open(copied_podspec_path, 'w') { |podspec|
|
File.open(copied_podspec_path, 'w') { |podspec|
|
||||||
podspec.write <<~EOF
|
podspec.write <<~EOF
|
||||||
#
|
#
|
||||||
|
@ -183,7 +183,7 @@ class DeferredComponentsGenSnapshotValidator extends DeferredComponentsValidator
|
|||||||
/// considered new.
|
/// considered new.
|
||||||
bool checkAgainstLoadingUnitsCache(
|
bool checkAgainstLoadingUnitsCache(
|
||||||
List<LoadingUnit> generatedLoadingUnits) {
|
List<LoadingUnit> generatedLoadingUnits) {
|
||||||
final List<LoadingUnit> cachedLoadingUnits = _parseLodingUnitsCache(projectDir.childFile(DeferredComponentsValidator.kLoadingUnitsCacheFileName));
|
final List<LoadingUnit> cachedLoadingUnits = _parseLoadingUnitsCache(projectDir.childFile(DeferredComponentsValidator.kLoadingUnitsCacheFileName));
|
||||||
loadingUnitComparisonResults = <String, Object>{};
|
loadingUnitComparisonResults = <String, Object>{};
|
||||||
final Set<LoadingUnit> unmatchedLoadingUnits = <LoadingUnit>{};
|
final Set<LoadingUnit> unmatchedLoadingUnits = <LoadingUnit>{};
|
||||||
final List<LoadingUnit> newLoadingUnits = <LoadingUnit>[];
|
final List<LoadingUnit> newLoadingUnits = <LoadingUnit>[];
|
||||||
@ -215,7 +215,7 @@ class DeferredComponentsGenSnapshotValidator extends DeferredComponentsValidator
|
|||||||
return loadingUnitComparisonResults!['match']! as bool;
|
return loadingUnitComparisonResults!['match']! as bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<LoadingUnit> _parseLodingUnitsCache(File cacheFile) {
|
List<LoadingUnit> _parseLoadingUnitsCache(File cacheFile) {
|
||||||
final List<LoadingUnit> loadingUnits = <LoadingUnit>[];
|
final List<LoadingUnit> loadingUnits = <LoadingUnit>[];
|
||||||
inputs.add(cacheFile);
|
inputs.add(cacheFile);
|
||||||
if (!cacheFile.existsSync()) {
|
if (!cacheFile.existsSync()) {
|
||||||
|
@ -68,7 +68,7 @@ enum HostArtifact {
|
|||||||
dart2jsSnapshot,
|
dart2jsSnapshot,
|
||||||
/// The dart snapshot of the dartdev compiler.
|
/// The dart snapshot of the dartdev compiler.
|
||||||
dartdevcSnapshot,
|
dartdevcSnapshot,
|
||||||
/// The dart snpashot of the kernel worker compiler.
|
/// The dart snapshot of the kernel worker compiler.
|
||||||
kernelWorkerSnapshot,
|
kernelWorkerSnapshot,
|
||||||
/// The root of the web implementation of the dart SDK.
|
/// The root of the web implementation of the dart SDK.
|
||||||
flutterWebSdk,
|
flutterWebSdk,
|
||||||
|
@ -111,7 +111,7 @@ class LoadingUnit {
|
|||||||
/// Constructs a [LoadingUnit].
|
/// Constructs a [LoadingUnit].
|
||||||
///
|
///
|
||||||
/// Loading units must include an [id] and [libraries]. The [path] is only present when
|
/// Loading units must include an [id] and [libraries]. The [path] is only present when
|
||||||
/// parsing the loading unit from a laoding unit manifest produced by gen_snapshot.
|
/// parsing the loading unit from a loading unit manifest produced by gen_snapshot.
|
||||||
LoadingUnit({
|
LoadingUnit({
|
||||||
required this.id,
|
required this.id,
|
||||||
required this.libraries,
|
required this.libraries,
|
||||||
|
@ -363,7 +363,7 @@ class Stdio {
|
|||||||
/// Adds [stream] to [stdout].
|
/// Adds [stream] to [stdout].
|
||||||
Future<void> addStdoutStream(Stream<List<int>> stream) => stdout.addStream(stream);
|
Future<void> addStdoutStream(Stream<List<int>> stream) => stdout.addStream(stream);
|
||||||
|
|
||||||
/// Adds [srtream] to [stderr].
|
/// Adds [stream] to [stderr].
|
||||||
Future<void> addStderrStream(Stream<List<int>> stream) => stderr.addStream(stream);
|
Future<void> addStderrStream(Stream<List<int>> stream) => stderr.addStream(stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class BuildBundleCommand extends BuildSubCommand {
|
|||||||
)
|
)
|
||||||
..addOption('asset-dir',
|
..addOption('asset-dir',
|
||||||
defaultsTo: getAssetBuildDirectory(),
|
defaultsTo: getAssetBuildDirectory(),
|
||||||
help: 'The output directory for the kernel_blob.bin file, the native snapshet, the assets, etc. '
|
help: 'The output directory for the kernel_blob.bin file, the native snapshot, the assets, etc. '
|
||||||
'Can be used to redirect the output when driving the Flutter toolchain from another build system.',
|
'Can be used to redirect the output when driving the Flutter toolchain from another build system.',
|
||||||
)
|
)
|
||||||
..addFlag(
|
..addFlag(
|
||||||
|
@ -28,7 +28,7 @@ import 'custom_device_config.dart';
|
|||||||
import 'custom_device_workflow.dart';
|
import 'custom_device_workflow.dart';
|
||||||
import 'custom_devices_config.dart';
|
import 'custom_devices_config.dart';
|
||||||
|
|
||||||
/// Replace all ocurrences of `${someName}` with the value found for that
|
/// Replace all occurrences of `${someName}` with the value found for that
|
||||||
/// name inside replacementValues or additionalReplacementValues.
|
/// name inside replacementValues or additionalReplacementValues.
|
||||||
///
|
///
|
||||||
/// The replacement value is first looked for in [replacementValues] and then
|
/// The replacement value is first looked for in [replacementValues] and then
|
||||||
@ -80,7 +80,7 @@ class CustomDeviceLogReader extends DeviceLogReader {
|
|||||||
/// Add all lines emitted by [lines] to this [CustomDeviceLogReader]s [logLines]
|
/// Add all lines emitted by [lines] to this [CustomDeviceLogReader]s [logLines]
|
||||||
/// stream.
|
/// stream.
|
||||||
///
|
///
|
||||||
/// Similiar to [listenToProcessOutput], [logLines] will not be marked as done
|
/// Similar to [listenToProcessOutput], [logLines] will not be marked as done
|
||||||
/// when the argument stream is done.
|
/// when the argument stream is done.
|
||||||
///
|
///
|
||||||
/// Useful when you want to combine the contents of multiple log readers.
|
/// Useful when you want to combine the contents of multiple log readers.
|
||||||
@ -215,7 +215,7 @@ class CustomDevicePortForwarder extends DevicePortForwarder {
|
|||||||
assert(_forwardedPorts.contains(forwardedPort));
|
assert(_forwardedPorts.contains(forwardedPort));
|
||||||
|
|
||||||
// since a forwarded port represents a running process launched with
|
// since a forwarded port represents a running process launched with
|
||||||
// the forwardPortCommand, unforwarding is as easy as killing the proces
|
// the forwardPortCommand, unforwarding is as easy as killing the process
|
||||||
_processManager.killPid(forwardedPort.context.pid);
|
_processManager.killPid(forwardedPort.context.pid);
|
||||||
_forwardedPorts.remove(forwardedPort);
|
_forwardedPorts.remove(forwardedPort);
|
||||||
}
|
}
|
||||||
|
@ -293,7 +293,7 @@ const Feature experimentalInvalidationStrategy = Feature(
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
/// The feature for enabling the Windows UWP embeding.
|
/// The feature for enabling the Windows UWP embedding.
|
||||||
const Feature windowsUwpEmbedding = Feature(
|
const Feature windowsUwpEmbedding = Feature(
|
||||||
name: 'Flutter for Windows UWP',
|
name: 'Flutter for Windows UWP',
|
||||||
configSetting: 'enable-windows-uwp-desktop',
|
configSetting: 'enable-windows-uwp-desktop',
|
||||||
|
@ -185,7 +185,7 @@ class FuchsiaPackageServer {
|
|||||||
|
|
||||||
int get port => _port;
|
int get port => _port;
|
||||||
|
|
||||||
/// Uses [FuchiaPM.newrepo] and [FuchsiaPM.serve] to spin up a new Fuchsia
|
/// Uses [FuchsiaPM.newrepo] and [FuchsiaPM.serve] to spin up a new Fuchsia
|
||||||
/// package server.
|
/// package server.
|
||||||
///
|
///
|
||||||
/// Returns false if the repo could not be created or the server could not
|
/// Returns false if the repo could not be created or the server could not
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user