some whitespace cleanup (#14443)

This commit is contained in:
Alexandre Ardhuin 2018-02-02 23:27:29 +01:00 committed by GitHub
parent 688a571c71
commit c02b6a8bcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
158 changed files with 340 additions and 340 deletions

View File

@ -64,7 +64,7 @@ class TileScrollLayout extends StatelessWidget {
itemCount: 200,
itemBuilder: (BuildContext context, int index) {
return new Padding(
padding:const EdgeInsets.all(5.0),
padding: const EdgeInsets.all(5.0),
child: new Material(
elevation: (index % 5 + 1).toDouble(),
color: Colors.white,

View File

@ -32,7 +32,7 @@ class ProcessFailedException extends Error {
/// Creates a pre-populated Flutter archive from a git repo.
class ArchiveCreator {
/// [_tempDir] is the directory to use for creating the archive. The script
/// [_tempDir] is the directory to use for creating the archive. The script
/// will place several GiB of data there, so it should have available space.
///
/// The processManager argument is used to inject a mock of [ProcessManager] for
@ -151,7 +151,7 @@ class ArchiveCreator {
///
/// May only be run on Windows (since 7Zip is not available on other platforms).
Future<String> _unzipArchive(File archive, {Directory currentDirectory}) {
assert(Platform.isWindows); // 7Zip is only available on Windows.
assert(Platform.isWindows); // 7Zip is only available on Windows.
currentDirectory ??= new Directory(path.dirname(archive.absolute.path));
final List<String> commandLine = <String>['7za', 'x', archive.absolute.path];
return _runProcess(commandLine, workingDirectory: currentDirectory);
@ -161,7 +161,7 @@ class ArchiveCreator {
///
/// May only be run on Windows (since 7Zip is not available on other platforms).
Future<String> _createZipArchive(File output, Directory source) {
assert(Platform.isWindows); // 7Zip is only available on Windows.
assert(Platform.isWindows); // 7Zip is only available on Windows.
final List<String> commandLine = <String>[
'7za',
'a',

View File

@ -131,7 +131,7 @@ Future<Map<String, double>> _readJsonResults(Process process) {
if (line.contains(jsonEnd)) {
jsonStarted = false;
processWasKilledIntentionally = true;
process.kill(ProcessSignal.SIGINT); // flutter run doesn't quit automatically
process.kill(ProcessSignal.SIGINT); // flutter run doesn't quit automatically
completer.complete(JSON.decode(jsonBuf.toString()));
return;
}

View File

@ -295,12 +295,12 @@ class CardCollectionState extends State<CardCollection> {
}
// TODO(abarth): This icon is wrong in RTL.
Widget leftArrowIcon = const Icon(Icons.arrow_back, size: 36.0);
Widget leftArrowIcon = const Icon(Icons.arrow_back, size: 36.0);
if (_dismissDirection == DismissDirection.startToEnd)
leftArrowIcon = new Opacity(opacity: 0.1, child: leftArrowIcon);
// TODO(abarth): This icon is wrong in RTL.
Widget rightArrowIcon = const Icon(Icons.arrow_forward, size: 36.0);
Widget rightArrowIcon = const Icon(Icons.arrow_forward, size: 36.0);
if (_dismissDirection == DismissDirection.endToStart)
rightArrowIcon = new Opacity(opacity: 0.1, child: rightArrowIcon);

View File

@ -27,17 +27,17 @@ class _DragHandler extends Drag {
final GestureDragEndCallback onEnd;
@override
void update(DragUpdateDetails details) {
void update(DragUpdateDetails details) {
onUpdate(details);
}
@override
void cancel() {
void cancel() {
onCancel();
}
@override
void end(DragEndDetails details) {
void end(DragEndDetails details) {
onEnd(details);
}
}
@ -152,7 +152,7 @@ class _PointDemoState extends State<_PointDemo> {
return new _DragHandler(_handleDragUpdate, _handleDragCancel, _handleDragEnd);
}
void _handleDragUpdate(DragUpdateDetails details) {
void _handleDragUpdate(DragUpdateDetails details) {
switch (_dragTarget) {
case _DragTarget.start:
setState(() {
@ -167,12 +167,12 @@ class _PointDemoState extends State<_PointDemo> {
}
}
void _handleDragCancel() {
void _handleDragCancel() {
_dragTarget = null;
widget.controller.value = 0.0;
}
void _handleDragEnd(DragEndDetails details) {
void _handleDragEnd(DragEndDetails details) {
_dragTarget = null;
}
@ -319,7 +319,7 @@ class _RectangleDemoState extends State<_RectangleDemo> {
return new _DragHandler(_handleDragUpdate, _handleDragCancel, _handleDragEnd);
}
void _handleDragUpdate(DragUpdateDetails details) {
void _handleDragUpdate(DragUpdateDetails details) {
switch (_dragTarget) {
case _DragTarget.start:
setState(() {
@ -334,12 +334,12 @@ class _RectangleDemoState extends State<_RectangleDemo> {
}
}
void _handleDragCancel() {
void _handleDragCancel() {
_dragTarget = null;
widget.controller.value = 0.0;
}
void _handleDragEnd(DragEndDetails details) {
void _handleDragEnd(DragEndDetails details) {
_dragTarget = null;
}

View File

@ -43,7 +43,7 @@ class _HardwareKeyDemoState extends State<RawKeyboardDemo> {
}
@override
Widget build(BuildContext context) {
Widget build(BuildContext context) {
final TextTheme textTheme = Theme.of(context).textTheme;
return new RawKeyboardListener(
focusNode: _focusNode,

View File

@ -75,7 +75,7 @@ Future<Null> main(List<String> rawArgs) async {
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file has been automatically generated. Please do not edit it manually.
// This file has been automatically generated. Please do not edit it manually.
// To regenerate run (omit -w to print to console instead of the file):
// dart --enable-asserts dev/tools/gen_date_localizations.dart --overwrite

View File

@ -27,7 +27,7 @@ class FakeProcessManager extends Mock implements ProcessManager {
final StringReceivedCallback stdinResults;
/// The list of results that will be sent back, organized by the command line
/// that will produce them. Each command line has a list of returned stdout
/// that will produce them. Each command line has a list of returned stdout
/// output that will be returned on each successive call.
Map<String, List<ProcessResult>> fakeResults = <String, List<ProcessResult>>{};

View File

@ -267,7 +267,7 @@ class FrameData {
final List<SvgPath> paths;
@override
bool operator ==(Object other){
bool operator ==(Object other) {
if (runtimeType != other.runtimeType)
return false;
final FrameData typedOther = other;
@ -464,7 +464,7 @@ const String _transformCommandAtom = ' *([^(]+)\\(([^)]*)\\)';
final RegExp _transformValidator = new RegExp('^($_transformCommandAtom)*\$');
final RegExp _transformCommand = new RegExp(_transformCommandAtom);
Matrix3 _parseSvgTransform(String transform){
Matrix3 _parseSvgTransform(String transform) {
if (!_transformValidator.hasMatch(transform))
throw new Exception('illegal or unsupported transform: $transform');
final Iterable<Match> matches =_transformCommand.allMatches(transform).toList().reversed;

View File

@ -18,7 +18,7 @@ class SampleError extends Error {
// Sample apps are .dart files in the lib directory which contain a block
// comment that begins with a '/* Sample Catalog' line, and ends with a line
// that just contains '*/'. The following keywords may appear at the
// that just contains '*/'. The following keywords may appear at the
// beginning of lines within the comment. A keyword's value is all of
// the following text up to the next keyword or the end of the comment,
// sans leading and trailing whitespace.

View File

@ -42,7 +42,7 @@ class _AnimatedListSampleState extends State<AnimatedListSample> {
}
// Used to build an item after it has been removed from the list. This method is
// needed because a removed item remains visible until its animation has
// needed because a removed item remains visible until its animation has
// completed (even though it's gone as far this ListModel is concerned).
// The widget will be used by the [AnimatedListState.removeItem] method's
// [AnimatedListRemovedItemBuilder] parameter.

View File

@ -375,7 +375,7 @@ class _SnappingScrollPhysics extends ClampingScrollPhysics {
@override
_SnappingScrollPhysics applyTo(ScrollPhysics ancestor) {
return new _SnappingScrollPhysics(parent: buildParent(ancestor), midScrollOffset: midScrollOffset);
return new _SnappingScrollPhysics(parent: buildParent(ancestor), midScrollOffset: midScrollOffset);
}
Simulation _toMidScrollOffsetSimulation(double offset, double dragVelocity) {
@ -411,7 +411,7 @@ class _SnappingScrollPhysics extends ClampingScrollPhysics {
// snap to midScrollOffset if they're more than halfway there,
// otherwise snap to zero.
final double snapThreshold = midScrollOffset / 2.0;
if (offset >= snapThreshold && offset < midScrollOffset)
if (offset >= snapThreshold && offset < midScrollOffset)
return _toMidScrollOffsetSimulation(offset, dragVelocity);
if (offset > 0.0 && offset < snapThreshold)
return _toZeroScrollOffsetSimulation(offset, dragVelocity);

View File

@ -97,7 +97,7 @@ class PaletteTabView extends StatelessWidget {
final TextTheme textTheme = Theme.of(context).textTheme;
final TextStyle whiteTextStyle = textTheme.body1.copyWith(color: Colors.white);
final TextStyle blackTextStyle = textTheme.body1.copyWith(color: Colors.black);
final List<Widget> colorItems = primaryKeys.map((int index) {
final List<Widget> colorItems = primaryKeys.map((int index) {
return new DefaultTextStyle(
style: index > colors.threshold ? whiteTextStyle : blackTextStyle,
child: new ColorItem(index: index, color: colors.primary[index]),

View File

@ -30,10 +30,10 @@ const List<String> coolColorNames = const <String>[
class CupertinoNavigationDemo extends StatelessWidget {
CupertinoNavigationDemo()
: colorItems = new List<Color>.generate(50, (int index){
: colorItems = new List<Color>.generate(50, (int index) {
return coolColors[new math.Random().nextInt(coolColors.length)];
}) ,
colorNameItems = new List<String>.generate(50, (int index){
colorNameItems = new List<String>.generate(50, (int index) {
return coolColorNames[new math.Random().nextInt(coolColorNames.length)];
});

View File

@ -23,7 +23,7 @@ class _CupertinoSwitchDemoState extends State<CupertinoSwitchDemo> {
title: const Text('Cupertino Switch'),
),
body: new Center(
child: new CupertinoSwitch(
child: new CupertinoSwitch(
value: _switchValue,
onChanged: (bool value) {
setState(() {

View File

@ -100,7 +100,7 @@ class _DrawerDemoState extends State<DrawerDemo> with TickerProviderStateMixin {
package: _kGalleryAssetsPackage,
),
),
otherAccountsPictures: <Widget>[
otherAccountsPictures: <Widget>[
new GestureDetector(
onTap: () {
_onOtherAccountsTap(context);

View File

@ -53,7 +53,7 @@ class _PersistentBottomSheetDemoState extends State<PersistentBottomSheetDemo> {
});
}
void _showMessage() {
void _showMessage() {
showDialog<Null>(
context: context,
child: new AlertDialog(

View File

@ -111,7 +111,7 @@ class ScrollableTabsDemoState extends State<ScrollableTabsDemo> with SingleTicke
child: new Container(
key: new ObjectKey(page.icon),
padding: const EdgeInsets.all(12.0),
child:new Card(
child: new Card(
child: new Center(
child: new Icon(
page.icon,

View File

@ -42,7 +42,7 @@ class TextFormFieldDemoState extends State<TextFormFieldDemo> {
void _handleSubmitted() {
final FormState form = _formKey.currentState;
if (!form.validate()) {
_autovalidate = true; // Start validating on every change.
_autovalidate = true; // Start validating on every change.
showInSnackBar('Please fix the errors in red before submitting.');
} else {
form.save();

View File

@ -18,7 +18,7 @@ class PestoDemo extends StatelessWidget {
const String _kSmallLogoImage = 'pesto/logo_small.png';
const String _kGalleryAssetsPackage = 'flutter_gallery_assets';
const double _kAppBarHeight = 128.0;
const double _kFabHalfSize = 28.0; // TODO(mpcomplete): needs to adapt to screen size
const double _kFabHalfSize = 28.0; // TODO(mpcomplete): needs to adapt to screen size
const double _kRecipePageMaxWidth = 500.0;
final Set<Recipe> _favoriteRecipes = new Set<Recipe>();
@ -667,7 +667,7 @@ const List<Recipe> kPestoRecipes = const <Recipe>[
author: 'Ali Connors',
ingredientsImagePath: 'pesto/healthy.png',
ingredientsImagePackage: _kGalleryAssetsPackage,
description: 'This dish is a terrific pairing to almost any main. Bonus- its quick, easy to make, and turns even the simplest of dishes into a delicacy. Sweet coconut cream will leave your mouth watering, with yummy caramelized flecks of rice adding an extra bit of taste. Fluff with fork before serving for best results.',
description: 'This dish is a terrific pairing to almost any main. Bonus- its quick, easy to make, and turns even the simplest of dishes into a delicacy. Sweet coconut cream will leave your mouth watering, with yummy caramelized flecks of rice adding an extra bit of taste. Fluff with fork before serving for best results.',
imagePath: 'pesto/image6.jpg',
imagePackage: _kGalleryAssetsPackage,
ingredients: const<RecipeIngredient>[
@ -732,7 +732,7 @@ const List<Recipe> kPestoRecipes = const <Recipe>[
imagePackage: _kGalleryAssetsPackage,
ingredients: const<RecipeIngredient>[
const RecipeIngredient(amount: '1', description: 'Small garlic clove, peeled'),
const RecipeIngredient(amount: '2', description: 'Whole artichokes'),
const RecipeIngredient(amount: '2', description: 'Whole artichokes'),
const RecipeIngredient(amount: '4 tbsp', description: 'Fresh lemon juice'),
const RecipeIngredient(amount: '4 tbsp', description: 'Unsalted butter'),
const RecipeIngredient(amount: '2 tbsp', description: 'Extra-virgin olive oil'),
@ -748,7 +748,7 @@ const List<Recipe> kPestoRecipes = const <Recipe>[
author: 'Trevor Hansen',
ingredientsImagePath: 'pesto/veggie.png',
ingredientsImagePackage: _kGalleryAssetsPackage,
description: 'Life is good when you add amazingly warm bread, fresh pesto sauce, and roasted tomatoes to the table. This a classic starter to break out in a pinch. Its easy to make and extra tasty.',
description: 'Life is good when you add amazingly warm bread, fresh pesto sauce, and roasted tomatoes to the table. This a classic starter to break out in a pinch. Its easy to make and extra tasty.',
imagePath: 'pesto/image10.jpg',
imagePackage: _kGalleryAssetsPackage,
ingredients: const<RecipeIngredient>[
@ -771,7 +771,7 @@ const List<Recipe> kPestoRecipes = const <Recipe>[
author: 'Sandra Adams',
ingredientsImagePath: 'pesto/spicy.png',
ingredientsImagePackage: _kGalleryAssetsPackage,
description: 'Great stir-fried bok choy starts at the market. For me, nothing says tasty like garlic and baby bok choy. Choose fresh, crisp greens. Once home, wash, chop, and then ready for the wok. No family style spread is complete without these greens.',
description: 'Great stir-fried bok choy starts at the market. For me, nothing says tasty like garlic and baby bok choy. Choose fresh, crisp greens. Once home, wash, chop, and then ready for the wok. No family style spread is complete without these greens.',
imagePath: 'pesto/image11.jpg',
imagePackage: _kGalleryAssetsPackage,
ingredients: const<RecipeIngredient>[

View File

@ -30,7 +30,7 @@ const Vendor _trevor = const Vendor(
avatarAsset: 'shrine/vendors/zach.jpg',
avatarAssetPackage: _kGalleryAssetsPackage,
description:
'Trevor makes great stuff for awesome people like you. Super cool and extra '
'Trevor makes great stuff for awesome people like you. Super cool and extra '
'awesome all of his shops goods are handmade with love. Custom orders are '
'available upon request if you need something extra special.'
);
@ -40,7 +40,7 @@ const Vendor _peter = const Vendor(
avatarAsset: 'shrine/vendors/peter-carlsson.png',
avatarAssetPackage: _kGalleryAssetsPackage,
description:
'Peter makes great stuff for awesome people like you. Super cool and extra '
'Peter makes great stuff for awesome people like you. Super cool and extra '
'awesome all of his shops goods are handmade with love. Custom orders are '
'available upon request if you need something extra special.'
);

View File

@ -109,7 +109,7 @@ class DartSyntaxHighlighter extends SyntaxHighlighter {
return new TextSpan(style: _style.baseStyle, children: formattedText);
} else {
// Parsing failed, return with only basic formatting
return new TextSpan(style:_style.baseStyle, text: src);
return new TextSpan(style: _style.baseStyle, text: src);
}
}

View File

@ -13,7 +13,7 @@ void main() {
// We press the "1" and the "2" buttons and check that the display
// reads "12".
testWidgets('Flutter calculator app smoke test', (WidgetTester tester) async {
testWidgets('Flutter calculator app smoke test', (WidgetTester tester) async {
await tester.pumpWidget(new MaterialApp(home: const CalculatorDemo()));
final Finder oneButton = find.widgetWithText(InkResponse, '1');

View File

@ -7,7 +7,7 @@ import 'package:flutter_gallery/demo/material/drawer_demo.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('Drawer header does not scroll', (WidgetTester tester) async {
testWidgets('Drawer header does not scroll', (WidgetTester tester) async {
await tester.pumpWidget(new MaterialApp(
theme: new ThemeData(platform: TargetPlatform.iOS),
home: new DrawerDemo(),

View File

@ -7,7 +7,7 @@ import 'package:flutter_gallery/demo/material/text_form_field_demo.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('validates name field correctly', (WidgetTester tester) async {
testWidgets('validates name field correctly', (WidgetTester tester) async {
await tester.pumpWidget(new MaterialApp(home: const TextFormFieldDemo()));
final Finder submitButton = find.widgetWithText(RaisedButton, 'SUBMIT');

View File

@ -1,4 +1,4 @@
// Copyright 2017, the Flutter project authors. Please see the AUTHORS file
// Copyright 2017, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

View File

@ -227,7 +227,7 @@ class AnimationController extends Animation<double>
notifyListeners();
_checkStatusChanged();
}
/// Sets the controller's value to [lowerBound], stopping the animation (if
/// in progress), and resetting to its beginning point, or dismissed state.
///

View File

@ -287,7 +287,7 @@ class _CupertinoTextSelectionControls extends TextSelectionControls {
),
child: handle
);
case TextSelectionHandleType.collapsed: // iOS doesn't draw anything for collapsed selections.
case TextSelectionHandleType.collapsed: // iOS doesn't draw anything for collapsed selections.
return new Container();
}
assert(type != null);

View File

@ -1173,7 +1173,7 @@ abstract class _NumProperty<T extends num> extends DiagnosticsProperty<T> {
if (value == null)
return value.toString();
return unit != null ? '${numberToString()}$unit' : numberToString();
return unit != null ? '${numberToString()}$unit' : numberToString();
}
}
/// Property describing a [double] [value] with an optional [unit] of measurement.
@ -1297,7 +1297,7 @@ class PercentProperty extends DoubleProperty {
String valueToString({ TextTreeConfiguration parentConfiguration }) {
if (value == null)
return value.toString();
return unit != null ? '${numberToString()} $unit' : numberToString();
return unit != null ? '${numberToString()} $unit' : numberToString();
}
@override
@ -1345,7 +1345,7 @@ class PercentProperty extends DoubleProperty {
/// * [ObjectFlagProperty], which provides similar behavior describing whether
/// a [value] is null.
class FlagProperty extends DiagnosticsProperty<bool> {
/// Constructs a FlagProperty with the given descriptions with the specified descriptions.
/// Constructs a FlagProperty with the given descriptions with the specified descriptions.
///
/// [showName] defaults to false as typically [ifTrue] and [ifFalse] should
/// be descriptions that make the property name redundant.
@ -2214,7 +2214,7 @@ abstract class Diagnosticable {
/// common [DiagnosticsProperty] parameters.
///
/// ```dart
/// class ExampleObject extends ExampleSuperclass {
/// class ExampleObject extends ExampleSuperclass {
///
/// // ...various members and properties...
///

View File

@ -13,7 +13,7 @@ enum GestureDisposition {
/// This gesture was accepted as the interpretation of the user's input.
accepted,
/// This gesture was rejected as the interpretation of the user's input.
/// This gesture was rejected as the interpretation of the user's input.
rejected,
}
@ -119,7 +119,7 @@ class GestureArenaManager {
void close(int pointer) {
final _GestureArena state = _arenas[pointer];
if (state == null)
return; // This arena either never existed or has been resolved.
return; // This arena either never existed or has been resolved.
state.isOpen = false;
assert(_debugLogDiagnostic(pointer, 'Closing', state));
_tryToResolveArena(pointer, state);
@ -141,12 +141,12 @@ class GestureArenaManager {
void sweep(int pointer) {
final _GestureArena state = _arenas[pointer];
if (state == null)
return; // This arena either never existed or has been resolved.
return; // This arena either never existed or has been resolved.
assert(!state.isOpen);
if (state.isHeld) {
state.hasPendingSweep = true;
assert(_debugLogDiagnostic(pointer, 'Delaying sweep', state));
return; // This arena is being held for a long-lived member.
return; // This arena is being held for a long-lived member.
}
assert(_debugLogDiagnostic(pointer, 'Sweeping', state));
_arenas.remove(pointer);
@ -175,7 +175,7 @@ class GestureArenaManager {
void hold(int pointer) {
final _GestureArena state = _arenas[pointer];
if (state == null)
return; // This arena either never existed or has been resolved.
return; // This arena either never existed or has been resolved.
state.isHeld = true;
assert(_debugLogDiagnostic(pointer, 'Holding', state));
}
@ -192,7 +192,7 @@ class GestureArenaManager {
void release(int pointer) {
final _GestureArena state = _arenas[pointer];
if (state == null)
return; // This arena either never existed or has been resolved.
return; // This arena either never existed or has been resolved.
state.isHeld = false;
assert(_debugLogDiagnostic(pointer, 'Releasing', state));
if (state.hasPendingSweep)
@ -205,7 +205,7 @@ class GestureArenaManager {
void _resolve(int pointer, GestureArenaMember member, GestureDisposition disposition) {
final _GestureArena state = _arenas[pointer];
if (state == null)
return; // This arena has already resolved.
return; // This arena has already resolved.
assert(_debugLogDiagnostic(pointer, '${ disposition == GestureDisposition.accepted ? "Accepting" : "Rejecting" }: $member'));
assert(state.members.contains(member));
if (disposition == GestureDisposition.rejected) {
@ -240,7 +240,7 @@ class GestureArenaManager {
void _resolveByDefault(int pointer, _GestureArena state) {
if (!_arenas.containsKey(pointer))
return; // Already resolved earlier.
return; // Already resolved earlier.
assert(_arenas[pointer] == state);
assert(!state.isOpen);
final List<GestureArenaMember> members = state.members;

View File

@ -95,7 +95,7 @@ abstract class GestureBinding extends BindingBase with HitTestable, HitTestDispa
} else if (event.down) {
result = _hitTests[event.pointer];
} else {
return; // We currently ignore add, remove, and hover move events.
return; // We currently ignore add, remove, and hover move events.
}
if (result != null)
dispatchEvent(event, result);

View File

@ -19,7 +19,7 @@ const Duration kHoverTapTimeout = const Duration(milliseconds: 150);
/// honored by the [TapGestureRecognizer]; [PrimaryPointerGestureRecognizer],
/// which TapGestureRecognizer inherits from, uses [kTouchSlop].)
// TODO(ianh): Remove this or implement it correctly.
const double kHoverTapSlop = 20.0; // Logical pixels
const double kHoverTapSlop = 20.0; // Logical pixels
/// The time before a long press gesture attempts to win.
const Duration kLongPressTimeout = const Duration(milliseconds: 500);
@ -39,12 +39,12 @@ const Duration kDoubleTapMinTime = const Duration(milliseconds: 40);
/// The maximum distance that the first touch in a double-tap gesture can travel
/// before deciding that it is not part of a double-tap gesture.
/// DoubleTapGestureRecognizer also restricts the second touch to this distance.
const double kDoubleTapTouchSlop = kTouchSlop; // Logical pixels
const double kDoubleTapTouchSlop = kTouchSlop; // Logical pixels
/// Distance between the initial position of the first touch and the start
/// position of a potential second touch for the second touch to be considered
/// the second touch of a double-tap gesture.
const double kDoubleTapSlop = 100.0; // Logical pixels
const double kDoubleTapSlop = 100.0; // Logical pixels
/// The time for which zoom controls (e.g. in a map interface) are to be
/// displayed on the screen, from the moment they were last requested.
@ -56,37 +56,37 @@ const Duration kZoomControlsTimeout = const Duration(milliseconds: 3000);
/// tap.
// This value was empirically derived. We started at 8.0 and increased it to
// 18.0 after getting complaints that it was too difficult to hit targets.
const double kTouchSlop = 18.0; // Logical pixels
const double kTouchSlop = 18.0; // Logical pixels
/// The distance a touch has to travel for the framework to be confident that
/// the gesture is a paging gesture. (Currently not used, because paging uses a
/// regular drag gesture, which uses kTouchSlop.)
// TODO(ianh): Create variants of HorizontalDragGestureRecognizer et al for
// paging, which use this constant.
const double kPagingTouchSlop = kTouchSlop * 2.0; // Logical pixels
const double kPagingTouchSlop = kTouchSlop * 2.0; // Logical pixels
/// The distance a touch has to travel for the framework to be confident that
/// the gesture is a panning gesture.
const double kPanSlop = kTouchSlop * 2.0; // Logical pixels
const double kPanSlop = kTouchSlop * 2.0; // Logical pixels
/// The distance a touch has to travel for the framework to be confident that
/// the gesture is a scale gesture.
const double kScaleSlop = kTouchSlop; // Logical pixels
const double kScaleSlop = kTouchSlop; // Logical pixels
/// The margin around a dialog, popup menu, or other window-like widget inside
/// which we do not consider a tap to dismiss the widget. (Not currently used.)
// TODO(ianh): Make ModalBarrier support this.
const double kWindowTouchSlop = 16.0; // Logical pixels
const double kWindowTouchSlop = 16.0; // Logical pixels
/// The minimum velocity for a touch to consider that touch to trigger a fling
/// gesture.
// TODO(ianh): Make sure nobody has their own version of this.
const double kMinFlingVelocity = 50.0; // Logical pixels / second
const double kMinFlingVelocity = 50.0; // Logical pixels / second
// const Velocity kMinFlingVelocity = const Velocity(pixelsPerSecond: 50.0);
/// Drag gesture fling velocities are clipped to this value.
// TODO(ianh): Make sure nobody has their own version of this.
const double kMaxFlingVelocity = 8000.0; // Logical pixels / second
const double kMaxFlingVelocity = 8000.0; // Logical pixels / second
/// The maximum time from the start of the first tap to the start of the second
/// tap in a jump-tap gesture.

View File

@ -135,7 +135,7 @@ class LeastSquaresSolver {
r.set(j, i, i < j ? 0.0 : q.getRow(j) * a.getRow(i));
}
// Solve R B = Qt W Y to find B. This is easy because R is upper triangular.
// Solve R B = Qt W Y to find B. This is easy because R is upper triangular.
// We just work from bottom-right to top-left calculating B's coefficients.
final _Vector wy = new _Vector(m);
for (int h = 0; h < m; h += 1)

View File

@ -74,7 +74,7 @@ class DoubleTapGestureRecognizer extends GestureRecognizer {
// Implementation notes:
// The double tap recognizer can be in one of four states. There's no
// explicit enum for the states, because they are already captured by
// the state of existing fields. Specifically:
// the state of existing fields. Specifically:
// Waiting on first tap: In this state, the _trackers list is empty, and
// _firstTap is null.
// First tap in progress: In this state, the _trackers list contains all
@ -84,7 +84,7 @@ class DoubleTapGestureRecognizer extends GestureRecognizer {
// completed successfully. The _trackers list is again empty, and
// _firstTap records the successful tap.
// Second tap in progress: Much like the "first tap in progress" state, but
// _firstTap is non-null. If a tap completes successfully while in this
// _firstTap is non-null. If a tap completes successfully while in this
// state, the callback is called and the state is reset.
// There are various other scenarios that cause the state to reset:
// - All in-progress taps are rejected (by time, distance, pointercancel, etc)
@ -151,7 +151,7 @@ class DoubleTapGestureRecognizer extends GestureRecognizer {
tracker.entry.resolve(GestureDisposition.rejected);
_freezeTracker(tracker);
// If the first tap is in progress, and we've run out of taps to track,
// reset won't have any work to do. But if we're in the second tap, we need
// reset won't have any work to do. But if we're in the second tap, we need
// to clear intermediate state.
if (_firstTap != null &&
(_trackers.isEmpty || tracker == _firstTap))

View File

@ -259,12 +259,12 @@ class ScaleGestureRecognizer extends OneSequenceGestureRecognizer {
resolve(GestureDisposition.rejected);
break;
case _ScaleState.ready:
assert(false); // We should have not seen a pointer yet
assert(false); // We should have not seen a pointer yet
break;
case _ScaleState.accepted:
break;
case _ScaleState.started:
assert(false); // We should be in the accepted state when user is done
assert(false); // We should be in the accepted state when user is done
break;
}
_state = _ScaleState.ready;

View File

@ -206,8 +206,8 @@ class _PathFrames {
}
/// Paths are being built by a set of commands e.g moveTo, lineTo, etc...
///
/// _PathCommand instances represents such a command, and can apply it to
///
/// _PathCommand instances represents such a command, and can apply it to
/// a given Path.
abstract class _PathCommand {
const _PathCommand();
@ -275,10 +275,10 @@ class _PathClose extends _PathCommand {
// Interpolates a value given a set of values equally spaced in time.
//
// [interpolator] is the interpolation function used to interpolate between 2
// [interpolator] is the interpolation function used to interpolate between 2
// points of type T.
//
// This is currently done with linear interpolation between every 2 consecutive
// This is currently done with linear interpolation between every 2 consecutive
// points. Linear interpolation was smooth enough with the limited set of
// animations we have tested, so we use it for simplicity. If we find this to
// not be smooth enough we can try applying spline instead.

View File

@ -69,7 +69,7 @@ abstract class AnimatedIconData {
/// Abstract const constructor. This constructor enables subclasses to provide
/// const constructors so that they can be used in const expressions.
const AnimatedIconData();
/// Whether this icon should be mirrored horizontally when text direction is
/// right-to-left.
///

View File

@ -403,7 +403,7 @@ class _AppBarState extends State<AppBar> {
icon: const Icon(Icons.menu),
onPressed: _handleDrawerButtonEnd,
tooltip: MaterialLocalizations.of(context).openAppDrawerTooltip,
);
);
}
final Widget toolbar = new Padding(

View File

@ -207,7 +207,7 @@ class _BottomNavigationTile extends StatelessWidget {
}
Widget _buildShiftingLabel() {
return new Align(
return new Align(
alignment: Alignment.bottomCenter,
heightFactor: 1.0,
child: new Container(

View File

@ -199,7 +199,7 @@ class Colors {
/// are variants on this color but with different opacities.
/// * [white], a solid white color.
/// * [transparent], a fully-transparent color.
static const Color black = const Color(0xFF000000);
static const Color black = const Color(0xFF000000);
/// Black with 87% opacity.
///
@ -299,7 +299,7 @@ class Colors {
/// but with different opacities.
/// * [black], a solid black color.
/// * [transparent], a fully-transparent color.
static const Color white = const Color(0xFFFFFFFF);
static const Color white = const Color(0xFFFFFFFF);
/// White with 70% opacity.
///

View File

@ -565,7 +565,7 @@ class _MonthPickerState extends State<MonthPicker> {
_todayDate = new DateTime.now();
final DateTime tomorrow = new DateTime(_todayDate.year, _todayDate.month, _todayDate.day + 1);
Duration timeUntilTomorrow = tomorrow.difference(_todayDate);
timeUntilTomorrow += const Duration(seconds: 1); // so we don't miss it by rounding
timeUntilTomorrow += const Duration(seconds: 1); // so we don't miss it by rounding
_timer?.cancel();
_timer = new Timer(timeUntilTomorrow, () {
setState(() {

View File

@ -24,7 +24,7 @@ enum ListTileStyle {
drawer,
}
/// An inherited widget that defines color and style parameters for [ListTile]s
/// An inherited widget that defines color and style parameters for [ListTile]s
/// in this widget's subtree.
///
/// Values specified here are used for [ListTile] properties that are not given

View File

@ -303,7 +303,7 @@ class _MaterialState extends State<Material> with TickerProviderStateMixin {
// https://github.com/flutter/flutter/issues/14403
if (shape.runtimeType == CircleBorder || shape.runtimeType == RoundedRectangleBorder)
return _physicalModelInterior(contents, shape, backgroundColor);
return new _MaterialInterior(
curve: Curves.fastOutSlowIn,
duration: kThemeChangeDuration,

View File

@ -257,7 +257,7 @@ double _indexChangeProgress(TabController controller) {
// The controller's offset is changing because the user is dragging the
// TabBarView's PageView to the left or right.
if (!controller.indexIsChanging)
return (currentIndex - controllerValue).abs().clamp(0.0, 1.0);
return (currentIndex - controllerValue).abs().clamp(0.0, 1.0);
// The TabController animation's value is changing from previousIndex to currentIndex.
return (controllerValue - currentIndex).abs() / (currentIndex - previousIndex).abs();
@ -834,7 +834,7 @@ class _TabBarState extends State<TabBar> {
unselectedLabelStyle: widget.unselectedLabelStyle,
child: new _TabLabelBar(
onPerformLayout: _saveTabOffsets,
children: wrappedTabs,
children: wrappedTabs,
),
),
);

View File

@ -223,7 +223,7 @@ class TextField extends StatefulWidget {
/// For instance, the character "ö" can be represented as '\u{006F}\u{0308}',
/// which is the letter "o" followed by a composed diaeresis "¨", or it can
/// be represented as '\u{00F6}', which is the Unicode scalar value "LATIN
/// SMALL LETTER O WITH DIAERESIS". In the first case, the text field will
/// SMALL LETTER O WITH DIAERESIS". In the first case, the text field will
/// count two characters, and the second case will be counted as one
/// character, even though the user can see no difference in the input.
///

View File

@ -167,14 +167,14 @@ class _MaterialTextSelectionControls extends TextSelectionControls {
// circle (an onion pointing to 10:30). We rotate [handle] to point
// straight up or up-right depending on the handle type.
switch (type) {
case TextSelectionHandleType.left: // points up-right
case TextSelectionHandleType.left: // points up-right
return new Transform(
transform: new Matrix4.rotationZ(math.PI / 2.0),
child: handle
);
case TextSelectionHandleType.right: // points up-left
case TextSelectionHandleType.right: // points up-left
return handle;
case TextSelectionHandleType.collapsed: // points up
case TextSelectionHandleType.collapsed: // points up
return new Transform(
transform: new Matrix4.rotationZ(math.PI / 4.0),
child: handle

View File

@ -248,7 +248,7 @@ class _DayPeriodControl extends StatelessWidget {
child: new Text(materialLocalizations.anteMeridiemAbbreviation, style: amStyle),
),
),
const SizedBox(width: 0.0, height: 4.0), // Vertical spacer
const SizedBox(width: 0.0, height: 4.0), // Vertical spacer
new GestureDetector(
excludeFromSemantics: true,
onTap: Feedback.wrapForTap(() {

View File

@ -297,6 +297,6 @@ abstract class RenderToggleable extends RenderConstrainedBox {
void debugFillProperties(DiagnosticPropertiesBuilder description) {
super.debugFillProperties(description);
description.add(new FlagProperty('value', value: value, ifTrue: 'checked', ifFalse: 'unchecked', showName: true));
description.add(new FlagProperty('isInteractive', value: isInteractive, ifTrue: 'enabled', ifFalse: 'disabled', defaultValue: true));
description.add(new FlagProperty('isInteractive', value: isInteractive, ifTrue: 'enabled', ifFalse: 'disabled', defaultValue: true));
}
}

View File

@ -445,7 +445,7 @@ abstract class ShapeBorder {
/// to this object the path returned from [getInnerPath] (using
/// [Path.addPath]).
///
/// The `textDirection` argument must be provided non-null if the border
/// The `textDirection` argument must be provided non-null if the border
/// has a text direction dependency (for example if it is expressed in terms
/// of "start" and "end" instead of "left" and "right"). It may be null if
/// the border will not need the text direction to paint itself.

View File

@ -468,7 +468,7 @@ class RenderCustomPaint extends RenderProxyBox {
///
/// The compositor contains a raster cache that holds bitmaps of layers in
/// order to avoid the cost of repeatedly rendering those layers on each
/// frame. If this flag is not set, then the compositor will apply its own
/// frame. If this flag is not set, then the compositor will apply its own
/// heuristics to decide whether the this layer is complex enough to benefit
/// from caching.
bool isComplex;

View File

@ -40,7 +40,7 @@ class _OverflowRegionData {
/// container.
///
/// This is used by some RenderObjects that are containers to show where, and by
/// how much, their children overflow their containers. These indicators are
/// how much, their children overflow their containers. These indicators are
/// typically only shown in a debug build (where the call to
/// [paintOverflowIndicator] is surrounded by an assert).
///
@ -57,10 +57,10 @@ class _OverflowRegionData {
/// TextDirection textDirection,
/// RenderBox child,
/// }) : super.mixin(alignment, textDirection, child);
///
///
/// Rect _containerRect;
/// Rect _childRect;
///
///
/// @override
/// void performLayout() {
/// // ...
@ -68,12 +68,12 @@ class _OverflowRegionData {
/// _containerRect = Offset.zero & size;
/// _childRect = childParentData.offset & child.size;
/// }
///
///
/// @override
/// void paint(PaintingContext context, Offset offset) {
/// // Do normal painting here...
/// // ...
///
///
/// assert(() {
/// paintOverflowIndicator(context, offset, _containerRect, _childRect);
/// return true;
@ -118,7 +118,7 @@ abstract class DebugOverflowIndicatorMixin extends RenderObject {
);
// Set to true to trigger a debug message in the console upon
// the next paint call. Will be reset after each paint.
// the next paint call. Will be reset after each paint.
bool _overflowReportNeeded = true;
String _formatPixels(double value) {

View File

@ -940,7 +940,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
context.pushClipRect(needsCompositing, offset, Offset.zero & size, defaultPaint);
assert(() {
// Only set this if it's null to save work. It gets reset to null if the
// Only set this if it's null to save work. It gets reset to null if the
// _direction changes.
final String debugOverflowHints =
'The overflowing $runtimeType has an orientation of $_direction.\n'

View File

@ -66,7 +66,7 @@ class PaintingContext {
final ContainerLayer _containerLayer;
/// An estimate of the bounds within which the painting context's [canvas]
/// will record painting commands. This can be useful for debugging.
/// will record painting commands. This can be useful for debugging.
///
/// The canvas will allow painting outside these bounds.
///
@ -277,7 +277,7 @@ class PaintingContext {
/// Appends the given layer to the recording, and calls the `painter` callback
/// with that layer, providing the `childPaintBounds` as the estimated paint
/// bounds of the child. The `childPaintBounds` can be used for debugging but
/// bounds of the child. The `childPaintBounds` can be used for debugging but
/// have no effect on painting.
///
/// The given layer must be an unattached orphan. (Providing a newly created

View File

@ -52,7 +52,7 @@ class RenderProxyBox extends RenderBox with RenderObjectWithChildMixin<RenderBox
/// of [RenderProxyBox] is desired but inheriting from [RenderProxyBox] is
/// impractical (e.g. because you want to mix in other classes as well).
/// TODO(ianh): Remove this class once https://github.com/dart-lang/sdk/issues/15101 is fixed
@optionalTypeArgs
@optionalTypeArgs
abstract class RenderProxyBoxMixin<T extends RenderBox> extends RenderBox with RenderObjectWithChildMixin<T> {
// This class is intended to be used as a mixin, and should not be
// extended directly.
@ -2108,7 +2108,7 @@ class RenderFittedBox extends RenderProxyBox {
/// How to align the child within its parent's bounds.
///
/// An alignment of (0.0, 0.0) aligns the child to the top-left corner of its
/// parent's bounds. An alignment of (1.0, 0.5) aligns the child to the middle
/// parent's bounds. An alignment of (1.0, 0.5) aligns the child to the middle
/// of the right edge of its parent's bounds.
///
/// If this is set to an [AlignmentDirectional] object, then

View File

@ -586,7 +586,7 @@ class RenderConstrainedOverflowBox extends RenderAligningShiftedBox {
/// This allows a child to render at the size it would render if it were alone
/// on an infinite canvas with no constraints. This box will then expand
/// as much as it can within its own constraints and align the child based on
/// [alignment]. If the box cannot expand enough to accommodate the entire
/// [alignment]. If the box cannot expand enough to accommodate the entire
/// child, the child will be clipped.
///
/// In debug mode, if the child overflows the box, a warning will be printed on
@ -620,7 +620,7 @@ class RenderUnconstrainedBox extends RenderAligningShiftedBox with DebugOverflow
/// The axis to retain constraints on, if any.
///
/// If not set, or set to null (the default), neither axis will retain its
/// constraints. If set to [Axis.vertical], then vertical constraints will
/// constraints. If set to [Axis.vertical], then vertical constraints will
/// be retained, and if set to [Axis.horizontal], then horizontal constraints
/// will be retained.
Axis get constrainedAxis => _constrainedAxis;
@ -632,7 +632,7 @@ class RenderUnconstrainedBox extends RenderAligningShiftedBox with DebugOverflow
_constrainedAxis = value;
markNeedsLayout();
}
Rect _overflowContainerRect = Rect.zero;
Rect _overflowChildRect = Rect.zero;
bool _isOverflowing = false;
@ -815,7 +815,7 @@ class RenderFractionallySizedOverflowBox extends RenderAligningShiftedBox {
/// If non-null, the factor of the incoming width to use.
///
/// If non-null, the child is given a tight width constraint that is the max
/// incoming width constraint multiplied by this factor. If null, the child is
/// incoming width constraint multiplied by this factor. If null, the child is
/// given the incoming width constraints.
double get widthFactor => _widthFactor;
double _widthFactor;
@ -830,7 +830,7 @@ class RenderFractionallySizedOverflowBox extends RenderAligningShiftedBox {
/// If non-null, the factor of the incoming height to use.
///
/// If non-null, the child is given a tight height constraint that is the max
/// incoming width constraint multiplied by this factor. If null, the child is
/// incoming width constraint multiplied by this factor. If null, the child is
/// given the incoming width constraints.
double get heightFactor => _heightFactor;
double _heightFactor;

View File

@ -418,7 +418,7 @@ class SemanticsProperties extends DiagnosticableTree {
///
/// VoiceOver users on iOS can trigger this action by swiping right with three
/// fingers. TalkBack users on Android can trigger this action by swiping
/// left and then right in one motion path. On Android, [onScrollDown] and
/// left and then right in one motion path. On Android, [onScrollDown] and
/// [onScrollRight] share the same gesture. Therefore, only on of them should
/// be provided.
final VoidCallback onScrollRight;
@ -1564,7 +1564,7 @@ class SemanticsConfiguration {
///
/// VoiceOver users on iOS can trigger this action by swiping right with three
/// fingers. TalkBack users on Android can trigger this action by swiping
/// left and then right in one motion path. On Android, [onScrollDown] and
/// left and then right in one motion path. On Android, [onScrollDown] and
/// [onScrollRight] share the same gesture. Therefore, only on of them should
/// be provided.
VoidCallback get onScrollRight => _onScrollRight;

View File

@ -203,7 +203,7 @@ class TextSelection extends TextRange {
/// Creates a new [TextSelection] based on the current selection, with the
/// provided parameters overridden.
TextSelection copyWith({
int baseOffset,
int baseOffset,
int extentOffset,
TextAffinity affinity,
bool isDirectional,

View File

@ -155,7 +155,7 @@ class LengthLimitingTextInputFormatter extends TextInputFormatter {
/// For instance, the character "ö" can be represented as '\u{006F}\u{0308}',
/// which is the letter "o" followed by a composed diaeresis "¨", or it can
/// be represented as '\u{00F6}', which is the Unicode scalar value "LATIN
/// SMALL LETTER O WITH DIAERESIS". In the first case, the text field will
/// SMALL LETTER O WITH DIAERESIS". In the first case, the text field will
/// count two characters, and the second case will be counted as one
/// character, even though the user can see no difference in the input.
///

View File

@ -78,7 +78,7 @@ enum TextInputAction {
class TextInputConfiguration {
/// Creates configuration information for a text input control.
///
/// All arguments have default values, except [actionLabel]. Only
/// All arguments have default values, except [actionLabel]. Only
/// [actionLabel] may be null.
const TextInputConfiguration({
this.inputType: TextInputType.text,
@ -337,7 +337,7 @@ class _TextInputClientHandler {
return;
_hidePending = true;
// Schedule a deferred task that hides the text input. If someone else
// Schedule a deferred task that hides the text input. If someone else
// shows the keyboard during this update cycle, then the task will do
// nothing.
scheduleMicrotask(() {

View File

@ -190,7 +190,7 @@ class AnimatedList extends StatefulWidget {
/// is needed.
///
/// When an item is removed with [removeItem] its animation is reversed.
/// The removed item's animation is passed to the [removeItem] builder
/// The removed item's animation is passed to the [removeItem] builder
/// parameter.
///
/// An app that needs to insert or remove items in response to an event

View File

@ -311,7 +311,7 @@ class BackdropFilter extends SingleChildRenderObjectWidget {
///
/// Custom painters normally size themselves to their child. If they do not have
/// a child, they attempt to size themselves to the [size], which defaults to
/// [Size.zero]. [size] must not be null.
/// [Size.zero]. [size] must not be null.
///
/// [isComplex] and [willChange] are hints to the compositor's raster cache
/// and must not be null.
@ -376,7 +376,7 @@ class CustomPaint extends SingleChildRenderObjectWidget {
///
/// The compositor contains a raster cache that holds bitmaps of layers in
/// order to avoid the cost of repeatedly rendering those layers on each
/// frame. If this flag is not set, then the compositor will apply its own
/// frame. If this flag is not set, then the compositor will apply its own
/// heuristics to decide whether the this layer is complex enough to benefit
/// from caching.
final bool isComplex;
@ -1070,7 +1070,7 @@ class FittedBox extends SingleChildRenderObjectWidget {
/// How to align the child within its parent's bounds.
///
/// An alignment of (-1.0, -1.0) aligns the child to the top-left corner of its
/// parent's bounds. An alignment of (1.0, 0.0) aligns the child to the middle
/// parent's bounds. An alignment of (1.0, 0.0) aligns the child to the middle
/// of the right edge of its parent's bounds.
///
/// Defaults to [Alignment.center].
@ -1702,7 +1702,7 @@ class ConstrainedBox extends SingleChildRenderObjectWidget {
/// This allows a child to render at the size it would render if it were alone
/// on an infinite canvas with no constraints. This container will then expand
/// as much as it can within its own constraints and align the child based on
/// [alignment]. If the container cannot expand enough to accommodate the
/// [alignment]. If the container cannot expand enough to accommodate the
/// entire child, the child will be clipped.
///
/// In debug mode, if the child overflows the container, a warning will be
@ -1748,7 +1748,7 @@ class UnconstrainedBox extends SingleChildRenderObjectWidget {
/// The axis to retain constraints on, if any.
///
/// If not set, or set to null (the default), neither axis will retain its
/// constraints. If set to [Axis.vertical], then vertical constraints will
/// constraints. If set to [Axis.vertical], then vertical constraints will
/// be retained, and if set to [Axis.horizontal], then horizontal constraints
/// will be retained.
final Axis constrainedAxis;

View File

@ -390,7 +390,7 @@ class DragTarget<T> extends StatefulWidget {
/// Called to determine whether this widget is interested in receiving a given
/// piece of data being dragged over this drag target.
///
/// Called when a piece of data enters the target. This will be followed by
/// Called when a piece of data enters the target. This will be followed by
/// either [onAccept], if the data is dropped, or [onLeave], if the drag
/// leaves the target.
final DragTargetWillAccept<T> onWillAccept;

View File

@ -426,9 +426,9 @@ class EditableTextState extends State<EditableText> with AutomaticKeepAliveClien
final double caretEnd = _isMultiline ? caretRect.bottom : caretRect.right;
double scrollOffset = _scrollController.offset;
final double viewportExtent = _scrollController.position.viewportDimension;
if (caretStart < 0.0) // cursor before start of bounds
if (caretStart < 0.0) // cursor before start of bounds
scrollOffset += caretStart;
else if (caretEnd >= viewportExtent) // cursor after end of bounds
else if (caretEnd >= viewportExtent) // cursor after end of bounds
scrollOffset += caretEnd - viewportExtent;
return scrollOffset;
}

View File

@ -1210,13 +1210,13 @@ abstract class State<T extends StatefulWidget> extends Diagnosticable {
///
/// For example, [AnimatedWidget] is a subclass of [StatefulWidget] that
/// introduces an abstract `Widget build(BuildContext context)` method for its
/// subclasses to implement. If [StatefulWidget] already had a [build] method
/// subclasses to implement. If [StatefulWidget] already had a [build] method
/// that took a [State] argument, [AnimatedWidget] would be forced to provide
/// its [State] object to subclasses even though its [State] object is an
/// internal implementation detail of [AnimatedWidget].
///
/// Conceptually, [StatelessWidget] could also be implemented as a subclass of
/// [StatefulWidget] in a similar manner. If the [build] method were on
/// [StatefulWidget] in a similar manner. If the [build] method were on
/// [StatefulWidget] rather than [State], that would not be possible anymore.
///
/// Putting the [build] function on [State] rather than [StatefulWidget] also
@ -1239,8 +1239,8 @@ abstract class State<T extends StatefulWidget> extends Diagnosticable {
/// ```
///
/// For example, suppose the parent builds `MyButton` with `color` being blue,
/// the `$color` in the print function refers to blue, as expected. Now,
/// suppose the parent rebuilds `MyButton` with green. The closure created by
/// the `$color` in the print function refers to blue, as expected. Now,
/// suppose the parent rebuilds `MyButton` with green. The closure created by
/// the first build still implicitly refers to the original widget and the
/// `$color` still prints blue even through the widget has been updated to
/// green.

View File

@ -566,7 +566,7 @@ class RawGestureDetectorState extends State<RawGestureDetector> {
}());
if (!widget.excludeFromSemantics) {
final RenderSemanticsGestureHandler semanticsGestureHandler = context.findRenderObject();
semanticsGestureHandler.validActions = actions; // will call _markNeedsSemanticsUpdate(), if required.
semanticsGestureHandler.validActions = actions; // will call _markNeedsSemanticsUpdate(), if required.
}
}

View File

@ -288,7 +288,7 @@ class _HeroFlight {
right: offsets.right,
bottom: offsets.bottom,
left: offsets.left,
child: new IgnorePointer(
child: new IgnorePointer(
child: new RepaintBoundary(
child: new Opacity(
key: manifest.toHero._key,

View File

@ -58,8 +58,8 @@ ImageConfiguration createLocalImageConfiguration(BuildContext context, { Size si
/// [ImageProvider] is available.
///
/// If the image is later used by an [Image] or [BoxDecoration] or [FadeInImage],
/// it will probably be loaded faster. The consumer of the image does not need
/// to use the same [ImageProvider] instance. The [ImageCache] will find the image
/// it will probably be loaded faster. The consumer of the image does not need
/// to use the same [ImageProvider] instance. The [ImageCache] will find the image
/// as long as both images share the same key.
///
/// The [BuildContext] and [Size] are used to select an image configuration

View File

@ -966,7 +966,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin {
if (index + 1 < _history.length) {
newRoute.didChangeNext(_history[index + 1]);
_history[index + 1].didChangePrevious(newRoute);
} else {
} else {
newRoute.didChangeNext(null);
}
if (index > 0)

View File

@ -565,7 +565,7 @@ class _RenderTheatre extends RenderBox
if (child != null)
children.add(child.toDiagnosticsNode(name: 'onstage'));
if (firstChild != null) {
if (firstChild != null) {
RenderBox child = firstChild;
int count = 1;

View File

@ -652,7 +652,7 @@ abstract class ModalRoute<T> extends TransitionRoute<T> with LocalHistoryRoute<T
/// is popped, the secondaryAnimation can be used to define how the route
/// below it reappears on the screen. When the Navigator pushes a new route
/// on the top of its stack, the old topmost route's secondaryAnimation
/// runs from 0.0 to 1.0. When the Navigator pops the topmost route, the
/// runs from 0.0 to 1.0. When the Navigator pops the topmost route, the
/// secondaryAnimation for the route below it runs from 1.0 to 0.0.
///
/// The example below adds a transition that's driven by the
@ -694,7 +694,7 @@ abstract class ModalRoute<T> extends TransitionRoute<T> with LocalHistoryRoute<T
/// pops the topmost route this animation runs from 1.0 to 0.0.
/// * [secondaryAnimation]: When the Navigator pushes a new route
/// on the top of its stack, the old topmost route's [secondaryAnimation]
/// runs from 0.0 to 1.0. When the [Navigator] pops the topmost route, the
/// runs from 0.0 to 1.0. When the [Navigator] pops the topmost route, the
/// [secondaryAnimation] for the route below it runs from 1.0 to 0.0.
/// * `child`, the page contents.
///

View File

@ -287,7 +287,7 @@ class UserScrollNotification extends ScrollNotification {
/// listen to notifications from their children.
typedef bool ScrollNotificationPredicate(ScrollNotification notification);
/// A [ScrollNotificationPredicate] that checks whether
/// A [ScrollNotificationPredicate] that checks whether
/// `notification.depth == 0`, which means that the notification did not bubble
/// through any intervening scrolling widgets.
bool defaultScrollNotificationPredicate(ScrollNotification notification) {

View File

@ -452,7 +452,7 @@ abstract class ScrollPosition extends ViewportOffset with ScrollMetrics {
void applyNewDimensions() {
assert(pixels != null);
activity.applyNewDimensions();
_updateSemanticActions(); // will potentially request a semantics update.
_updateSemanticActions(); // will potentially request a semantics update.
}
/// Animates the position such that the given object is as visible as possible
@ -631,7 +631,7 @@ abstract class ScrollPosition extends ViewportOffset with ScrollMetrics {
@override
void notifyListeners() {
_updateSemanticActions(); // will potentially request a semantics update.
_updateSemanticActions(); // will potentially request a semantics update.
super.notifyListeners();
}

View File

@ -102,7 +102,7 @@ class BouncingScrollSimulation extends Simulation {
Simulation _simulation(double time) {
Simulation simulation;
if (time > _springTime) {
if (time > _springTime) {
_timeOffset = _springTime.isFinite ? _springTime : 0.0;
simulation = _springSimulation;
} else {

View File

@ -505,7 +505,7 @@ class ScrollableState extends State<Scrollable> with TickerProviderStateMixin
Widget build(BuildContext context) {
assert(position != null);
// TODO(ianh): Having all these global keys is sad.
Widget result = new RawGestureDetector(
Widget result = new RawGestureDetector(
key: _gestureDetectorKey,
gestures: _gestureRecognizers,
behavior: HitTestBehavior.opaque,

View File

@ -253,7 +253,7 @@ class Text extends StatelessWidget {
/// For example, if the text scale factor is 1.5, text will be 50% larger than
/// the specified font size.
///
/// The value given to the constructor as textScaleFactor. If null, will
/// The value given to the constructor as textScaleFactor. If null, will
/// use the [MediaQueryData.textScaleFactor] obtained from the ambient
/// [MediaQuery], or 1.0 if there is no [MediaQuery] in scope.
final double textScaleFactor;

View File

@ -193,7 +193,7 @@ abstract class TextSelectionControls {
/// implemented.
// TODO(ianh): https://github.com/flutter/flutter/issues/11427
Future<Null> handlePaste(TextSelectionDelegate delegate) async {
final TextEditingValue value = delegate.textEditingValue; // Snapshot the input before using `await`.
final TextEditingValue value = delegate.textEditingValue; // Snapshot the input before using `await`.
final ClipboardData data = await Clipboard.getData(Clipboard.kTextPlain);
if (data != null) {
delegate.textEditingValue = new TextEditingValue(
@ -381,7 +381,7 @@ class TextSelectionOverlay {
Widget _buildHandle(BuildContext context, _TextSelectionHandlePosition position) {
if ((_selection.isCollapsed && position == _TextSelectionHandlePosition.end) ||
selectionControls == null)
return new Container(); // hide the second handle when collapsed
return new Container(); // hide the second handle when collapsed
return new FadeTransition(
opacity: _handleOpacity,

View File

@ -28,7 +28,7 @@ class Title extends StatelessWidget {
/// Must not be null.
final String title;
/// A color that the window manager should use to identify this app. Must be
/// A color that the window manager should use to identify this app. Must be
/// an opaque color (i.e. color.alpha must be 255 (0xFF)), and must not be
/// null.
final Color color;

View File

@ -190,7 +190,7 @@ class WidgetInspectorService {
id = 'inspector-$_nextId';
_nextId += 1;
_objectToId[object] = id;
referenceData = new _InspectorReferenceData(object);
referenceData = new _InspectorReferenceData(object);
_idToReferenceData[id] = referenceData;
group.add(referenceData);
} else {
@ -656,7 +656,7 @@ class _WidgetInspectorState extends State<WidgetInspector>
children.add(new Positioned(
left: _kInspectButtonMargin,
bottom: _kInspectButtonMargin,
child: widget.selectButtonBuilder(context, _handleEnableSelect)
child: widget.selectButtonBuilder(context, _handleEnableSelect)
));
}
children.add(new _InspectorOverlay(selection: selection));
@ -905,7 +905,7 @@ class _InspectorOverlayLayer extends Layer {
final _InspectorOverlayRenderState state = new _InspectorOverlayRenderState(
overlayRect: overlayRect,
selected: new _TransformedRect(selected),
tooltip: selection.currentElement.toStringShort(),
tooltip: selection.currentElement.toStringShort(),
textDirection: TextDirection.ltr,
candidates: candidates,
);

View File

@ -396,7 +396,7 @@ void main() {
expect(controller.value, 1.0);
});
test('resetting animation works at all phases', (){
test('resetting animation works at all phases', () {
final List<AnimationStatus> statusLog = <AnimationStatus>[];
final AnimationController controller = new AnimationController(
duration: const Duration(milliseconds: 100),

View File

@ -147,7 +147,7 @@ void main() {
scrollController.jumpTo(100.0);
expect(scrollController.offset, 100.0);
// Find the actual dialog box. The first decorated box is the popup barrier.
// Find the actual dialog box. The first decorated box is the popup barrier.
expect(tester.getSize(find.byType(DecoratedBox).at(1)), equals(const Size(270.0, 560.0)));
// Check sizes/locations of the text.

View File

@ -219,19 +219,19 @@ void main() {
listenableUnderTest = new Listenable.merge(<Listenable>[source1]);
expect(
listenableUnderTest.toString(),
listenableUnderTest.toString(),
"Listenable.merge([Instance of 'TestNotifier'])",
);
listenableUnderTest = new Listenable.merge(<Listenable>[source1, source2]);
expect(
listenableUnderTest.toString(),
listenableUnderTest.toString(),
"Listenable.merge([Instance of 'TestNotifier', Instance of 'TestNotifier'])",
);
listenableUnderTest = new Listenable.merge(<Listenable>[null, source2]);
expect(
listenableUnderTest.toString(),
listenableUnderTest.toString(),
"Listenable.merge([null, Instance of 'TestNotifier'])",
);
});

View File

@ -3,7 +3,7 @@
// found in the LICENSE file.
// This is the test for the private implementation of animated icons.
// To make the private API accessible from the test we do not import the
// To make the private API accessible from the test we do not import the
// material material_animated_icons library, but instead, this test file is an
// implementation of that library, using some of the parts of the real
// material_animated_icons, this give the test access to the private APIs.
@ -101,7 +101,7 @@ void main () {
shouldMirror: false,
uiPathFactory: pathFactory
);
painter.paint(mockCanvas, size);
painter.paint(mockCanvas, size);
expect(generatedPaths.length, 1);
verifyInOrder(<dynamic>[
@ -123,7 +123,7 @@ void main () {
shouldMirror: false,
uiPathFactory: pathFactory
);
painter.paint(mockCanvas, size);
painter.paint(mockCanvas, size);
expect(generatedPaths.length, 1);
verifyInOrder(<dynamic>[
@ -145,7 +145,7 @@ void main () {
shouldMirror: false,
uiPathFactory: pathFactory
);
painter.paint(mockCanvas, size);
painter.paint(mockCanvas, size);
expect(generatedPaths.length, 1);
verifyInOrder(<dynamic>[
@ -167,7 +167,7 @@ void main () {
shouldMirror: false,
uiPathFactory: pathFactory
);
painter.paint(mockCanvas, size);
painter.paint(mockCanvas, size);
verify(mockCanvas.scale(0.5, 0.5));
});
@ -180,7 +180,7 @@ void main () {
shouldMirror: true,
uiPathFactory: pathFactory
);
painter.paint(mockCanvas, size);
painter.paint(mockCanvas, size);
verifyInOrder(<dynamic>[
mockCanvas.rotate(math.pi),
mockCanvas.translate(-48.0, -48.0)
@ -196,7 +196,7 @@ void main () {
shouldMirror: false,
uiPathFactory: pathFactory
);
painter.paint(mockCanvas, size);
painter.paint(mockCanvas, size);
expect(generatedPaths.length, 1);
verifyInOrder(<dynamic>[
@ -218,7 +218,7 @@ void main () {
shouldMirror: false,
uiPathFactory: pathFactory
);
painter.paint(mockCanvas, size);
painter.paint(mockCanvas, size);
expect(generatedPaths.length, 1);
verifyInOrder(<dynamic>[
@ -238,7 +238,7 @@ void main () {
shouldMirror: false,
uiPathFactory: pathFactory
);
painter.paint(mockCanvas, size);
painter.paint(mockCanvas, size);
expect(generatedPaths.length, 1);
verifyInOrder(<dynamic>[

View File

@ -41,7 +41,7 @@ void main() {
child: const IconTheme(
data: const IconThemeData(
color: const Color(0xFF666666),
opacity: 0.5,
opacity: 0.5,
),
child: const AnimatedIcon(
progress: const AlwaysStoppedAnimation<double>(0.0),

View File

@ -6,8 +6,8 @@ import 'package:test/test.dart';
import 'package:flutter/material.dart';
const List<int> primaryKeys = const <int>[50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
const List<int> accentKeys = const <int>[100, 200, 400, 700];
const List<int> primaryKeys = const <int>[50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
const List<int> accentKeys = const <int>[100, 200, 400, 700];
void main() {
test('MaterialColor basic functionality', () {

View File

@ -240,7 +240,7 @@ void main() {
DefaultWidgetsLocalizations.delegate,
DefaultMaterialLocalizations.delegate,
],
child: new MediaQuery(
child: new MediaQuery(
data: const MediaQueryData(
padding: const EdgeInsets.all(50.0),
),

View File

@ -365,7 +365,7 @@ void main() {
for (RenderBox itemBox in itemBoxes) {
assert(itemBox.attached);
final Offset buttonBoxCenter = buttonBox.size.center(buttonBox.localToGlobal(Offset.zero));
final Offset itemBoxCenter = itemBox.size.center(itemBox.localToGlobal(Offset.zero));
final Offset itemBoxCenter = itemBox.size.center(itemBox.localToGlobal(Offset.zero));
expect(buttonBoxCenter.dy, equals(itemBoxCenter.dy));
}

View File

@ -101,7 +101,7 @@ void main() {
}));
// The ripple fades in for 75ms. During that time its alpha is eased from
// 0 to the splashColor's alpha value and its center moves towards the
// 0 to the splashColor's alpha value and its center moves towards the
// center of the ink well.
await tester.pump(const Duration(milliseconds: 50));
expect(box, paints..something((Symbol method, List<dynamic> arguments) {

View File

@ -63,7 +63,7 @@ double getBorderWeight(WidgetTester tester) {
return 0.0;
final CustomPaint customPaint = tester.widget(findBorderPainter());
final dynamic/* _InputBorderPainter */ inputBorderPainter = customPaint.foregroundPainter;
final dynamic/*_InputBorderTween */ inputBorderTween = inputBorderPainter.border;
final dynamic/*_InputBorderTween */ inputBorderTween = inputBorderPainter.border;
final Animation<double> animation = inputBorderPainter.borderAnimation;
final dynamic/*_InputBorder */ border = inputBorderTween.evaluate(animation);
return border.borderSide.width;

View File

@ -311,7 +311,7 @@ void main() {
// If the item is disabled it's rendered with the theme's disabled color.
await(tester.pumpWidget(buildFrame(enabled: false)));
await(tester.pump(const Duration(milliseconds: 300))); // DefaultTextStyle changes animate
await(tester.pump(const Duration(milliseconds: 300))); // DefaultTextStyle changes animate
expect(iconColor(leadingKey), theme.disabledColor);
expect(iconColor(trailingKey), theme.disabledColor);
expect(textColor(titleKey), theme.disabledColor);
@ -320,7 +320,7 @@ void main() {
// If the item is disabled it's rendered with the theme's disabled color.
// Even if it's selected.
await(tester.pumpWidget(buildFrame(enabled: false, selected: true)));
await(tester.pump(const Duration(milliseconds: 300))); // DefaultTextStyle changes animate
await(tester.pump(const Duration(milliseconds: 300))); // DefaultTextStyle changes animate
expect(iconColor(leadingKey), theme.disabledColor);
expect(iconColor(trailingKey), theme.disabledColor);
expect(textColor(titleKey), theme.disabledColor);

View File

@ -58,7 +58,7 @@ void main() {
scrollDirection: Axis.horizontal,
child: new Container(
width: 600.0,
child:new ListView(
child: new ListView(
physics: const AlwaysScrollableScrollPhysics(),
children: <String>['A', 'B', 'C', 'D', 'E', 'F'].map((String item) {
return new SizedBox(

View File

@ -505,7 +505,7 @@ void main() {
persistentFooterButtons: const <Widget>[const Text(persistentFooterButtonLabel)],
bottomNavigationBar: const Text(bottomNavigationBarLabel),
floatingActionButton: const Text(floatingActionButtonLabel),
drawer: const Drawer(child:const Text(drawerLabel)),
drawer: const Drawer(child: const Text(drawerLabel)),
)));
expect(semantics, includesNodeWith(label: bodyLabel));
@ -719,8 +719,8 @@ void main() {
final SemanticsTester semantics = new SemanticsTester(tester);
await tester.pumpWidget(new MaterialApp(home: const Scaffold(
body: const Text(bodyLabel),
drawer: const Drawer(child:const Text(drawerLabel)),
endDrawer: const Drawer(child:const Text(endDrawerLabel)),
drawer: const Drawer(child: const Text(drawerLabel)),
endDrawer: const Drawer(child: const Text(endDrawerLabel)),
)));
expect(semantics, includesNodeWith(label: bodyLabel));

View File

@ -444,7 +444,7 @@ void main() {
await tester.tap(find.text('ACTION'));
expect(actionPressed, isTrue);
// Closed reason is only set when the animation is complete.
await tester.pump(const Duration(milliseconds:250));
await tester.pump(const Duration(milliseconds: 250));
expect(closedReason, isNull);
// Wait for animation to complete.
await tester.pumpAndSettle(const Duration(seconds: 1));

View File

@ -1084,7 +1084,7 @@ void main() {
),
);
// Not focused. The prefix and suffix should not appear, but the label should.
// Not focused. The prefix and suffix should not appear, but the label should.
expect(getOpacity(tester, find.text('Prefix')), 0.0);
expect(getOpacity(tester, find.text('Suffix')), 0.0);
expect(find.text('Label'), findsOneWidget);

View File

@ -388,7 +388,7 @@ void _tests() {
dynamic dialPaint = tester.widget(findDialPaint);
expect('${dialPaint.painter.activeRing}', '_DialRing.inner');
await tester.pumpWidget(new Container()); // make sure previous state isn't reused
await tester.pumpWidget(new Container()); // make sure previous state isn't reused
await mediaQueryBoilerplate(tester, true, initialTime: const TimeOfDay(hour: 0, minute: 0));
dialPaint = tester.widget(findDialPaint);
@ -433,7 +433,7 @@ void _tests() {
action: SemanticsAction.decrease,
finalValue: '12',
);
await tester.pumpWidget(new Container()); // clear old boilerplate
await tester.pumpWidget(new Container()); // clear old boilerplate
// 24-hour format
await mediaQueryBoilerplate(tester, true, initialTime: const TimeOfDay(hour: 23, minute: 0));

View File

@ -113,7 +113,7 @@ void main() {
await tester.pump(const Duration(seconds: 1));
expect(find.text('Sample Page'), findsOneWidget);
// Use didPopRoute() to simulate the system back button. Check that
// Use didPopRoute() to simulate the system back button. Check that
// didPopRoute() indicates that the notification was handled.
final dynamic widgetsAppState = tester.state(find.byType(WidgetsApp));
expect(await widgetsAppState.didPopRoute(), isTrue);

View File

@ -38,7 +38,7 @@ void main() {
void _testZeroAndNegativeSizes(BoxFit fit) {
FittedSizes result;
result = applyBoxFit(fit, const Size(-400.0, 2000.0), const Size(100.0, 1000.0));
expect(result.source, equals(Size.zero));
expect(result.destination, equals(Size.zero));

View File

@ -28,7 +28,7 @@ class FakeCodec extends ui.Codec {
final ui.Codec codec = await ui.instantiateImageCodec(data);
final int frameCount = codec.frameCount;
final List<ui.FrameInfo> frameInfos = new List<ui.FrameInfo>(frameCount);
for (int i = 0; i < frameCount; i += 1)
for (int i = 0; i < frameCount; i += 1)
frameInfos[i] = await codec.getNextFrame();
return new FakeCodec._(frameCount, codec.repetitionCount, frameInfos);
}

View File

@ -13,13 +13,13 @@ const List<int> kTransparentImage = const <int>[
/// An animated GIF image with 3 1x1 pixel frames (a red, green, and blue
/// frames). The gif animates forever, and each frame has a 100ms delay.
const List<int> kAnimatedGif = const <int> [
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, 0xa1, 0x03, 0x00,
0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0xff, 0x21,
0xff, 0x0b, 0x4e, 0x45, 0x54, 0x53, 0x43, 0x41, 0x50, 0x45, 0x32, 0x2e, 0x30,
0x03, 0x01, 0x00, 0x00, 0x00, 0x21, 0xf9, 0x04, 0x00, 0x0a, 0x00, 0xff, 0x00,
0x2c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x4c,
0x01, 0x00, 0x21, 0xf9, 0x04, 0x00, 0x0a, 0x00, 0xff, 0x00, 0x2c, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x54, 0x01, 0x00, 0x21,
0xf9, 0x04, 0x00, 0x0a, 0x00, 0xff, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x44, 0x01, 0x00, 0x3b,
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, 0xa1, 0x03, 0x00,
0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0xff, 0x21,
0xff, 0x0b, 0x4e, 0x45, 0x54, 0x53, 0x43, 0x41, 0x50, 0x45, 0x32, 0x2e, 0x30,
0x03, 0x01, 0x00, 0x00, 0x00, 0x21, 0xf9, 0x04, 0x00, 0x0a, 0x00, 0xff, 0x00,
0x2c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x4c,
0x01, 0x00, 0x21, 0xf9, 0x04, 0x00, 0x0a, 0x00, 0xff, 0x00, 0x2c, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x54, 0x01, 0x00, 0x21,
0xf9, 0x04, 0x00, 0x0a, 0x00, 0xff, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x44, 0x01, 0x00, 0x3b,
];

View File

@ -14,7 +14,7 @@ class FakeFrameInfo extends FrameInfo {
final Image _image;
FakeFrameInfo(int width, int height, this._duration) :
_image = new FakeImage(width, height);
_image = new FakeImage(width, height);
@override
Duration get duration => _duration;

View File

@ -148,7 +148,7 @@ void main() {
expect(semanticsUpdateCount, 0);
// Lay out, composite, paint, and update semantics again
layout(testTree.root, phase: EnginePhase.flushSemantics);
expect(semanticsUpdateCount, 0); // no semantics have changed.
expect(semanticsUpdateCount, 0); // no semantics have changed.
semanticsHandle.dispose();
});
test('objects can be detached and re-attached: semantics (with change)', () {
@ -172,7 +172,7 @@ void main() {
expect(semanticsUpdateCount, 0);
// Lay out, composite, paint, and update semantics again
layout(testTree.root, phase: EnginePhase.flushSemantics);
expect(semanticsUpdateCount, 1); // semantics have changed.
expect(semanticsUpdateCount, 1); // semantics have changed.
semanticsHandle.dispose();
});
}

Some files were not shown because too many files have changed in this diff Show More