diff --git a/dev/benchmarks/complex_layout/lib/main.dart b/dev/benchmarks/complex_layout/lib/main.dart index 592593f649..9d2e9173cb 100644 --- a/dev/benchmarks/complex_layout/lib/main.dart +++ b/dev/benchmarks/complex_layout/lib/main.dart @@ -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, diff --git a/dev/bots/prepare_package.dart b/dev/bots/prepare_package.dart index 023d00d5e7..72b73e09f0 100644 --- a/dev/bots/prepare_package.dart +++ b/dev/bots/prepare_package.dart @@ -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 _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 commandLine = ['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 _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 commandLine = [ '7za', 'a', diff --git a/dev/devicelab/lib/tasks/microbenchmarks.dart b/dev/devicelab/lib/tasks/microbenchmarks.dart index 41f0c553a6..2962a5ca60 100644 --- a/dev/devicelab/lib/tasks/microbenchmarks.dart +++ b/dev/devicelab/lib/tasks/microbenchmarks.dart @@ -131,7 +131,7 @@ Future> _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; } diff --git a/dev/manual_tests/lib/card_collection.dart b/dev/manual_tests/lib/card_collection.dart index 7cb366270e..b8ff1cd910 100644 --- a/dev/manual_tests/lib/card_collection.dart +++ b/dev/manual_tests/lib/card_collection.dart @@ -295,12 +295,12 @@ class CardCollectionState extends State { } // 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); diff --git a/dev/manual_tests/lib/material_arc.dart b/dev/manual_tests/lib/material_arc.dart index 3e1d13063b..d8aa5026f1 100644 --- a/dev/manual_tests/lib/material_arc.dart +++ b/dev/manual_tests/lib/material_arc.dart @@ -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; } diff --git a/dev/manual_tests/lib/raw_keyboard.dart b/dev/manual_tests/lib/raw_keyboard.dart index 1cf154a298..bacdbb4cfd 100644 --- a/dev/manual_tests/lib/raw_keyboard.dart +++ b/dev/manual_tests/lib/raw_keyboard.dart @@ -43,7 +43,7 @@ class _HardwareKeyDemoState extends State { } @override - Widget build(BuildContext context) { + Widget build(BuildContext context) { final TextTheme textTheme = Theme.of(context).textTheme; return new RawKeyboardListener( focusNode: _focusNode, diff --git a/dev/tools/gen_date_localizations.dart b/dev/tools/gen_date_localizations.dart index d48271c8dc..ad4615618b 100644 --- a/dev/tools/gen_date_localizations.dart +++ b/dev/tools/gen_date_localizations.dart @@ -75,7 +75,7 @@ Future main(List 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 diff --git a/dev/tools/test/fake_process_manager.dart b/dev/tools/test/fake_process_manager.dart index 1a5afab23e..7c4c456b4f 100644 --- a/dev/tools/test/fake_process_manager.dart +++ b/dev/tools/test/fake_process_manager.dart @@ -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> fakeResults = >{}; diff --git a/dev/tools/vitool/lib/vitool.dart b/dev/tools/vitool/lib/vitool.dart index 22bb562c64..b2e52d89e2 100644 --- a/dev/tools/vitool/lib/vitool.dart +++ b/dev/tools/vitool/lib/vitool.dart @@ -267,7 +267,7 @@ class FrameData { final List 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 matches =_transformCommand.allMatches(transform).toList().reversed; diff --git a/examples/catalog/bin/sample_page.dart b/examples/catalog/bin/sample_page.dart index 29a5b0932a..8bd7025469 100644 --- a/examples/catalog/bin/sample_page.dart +++ b/examples/catalog/bin/sample_page.dart @@ -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. diff --git a/examples/catalog/lib/animated_list.dart b/examples/catalog/lib/animated_list.dart index cb841d18a0..55f6fe41cb 100644 --- a/examples/catalog/lib/animated_list.dart +++ b/examples/catalog/lib/animated_list.dart @@ -42,7 +42,7 @@ class _AnimatedListSampleState extends State { } // 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. diff --git a/examples/flutter_gallery/lib/demo/animation/home.dart b/examples/flutter_gallery/lib/demo/animation/home.dart index a2fe95d5ee..f8e81709b0 100644 --- a/examples/flutter_gallery/lib/demo/animation/home.dart +++ b/examples/flutter_gallery/lib/demo/animation/home.dart @@ -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); diff --git a/examples/flutter_gallery/lib/demo/colors_demo.dart b/examples/flutter_gallery/lib/demo/colors_demo.dart index 4693a60dcc..b3e9e9979c 100644 --- a/examples/flutter_gallery/lib/demo/colors_demo.dart +++ b/examples/flutter_gallery/lib/demo/colors_demo.dart @@ -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 colorItems = primaryKeys.map((int index) { + final List colorItems = primaryKeys.map((int index) { return new DefaultTextStyle( style: index > colors.threshold ? whiteTextStyle : blackTextStyle, child: new ColorItem(index: index, color: colors.primary[index]), diff --git a/examples/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart b/examples/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart index 9990dc7ce1..b4523717d8 100644 --- a/examples/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart +++ b/examples/flutter_gallery/lib/demo/cupertino/cupertino_navigation_demo.dart @@ -30,10 +30,10 @@ const List coolColorNames = const [ class CupertinoNavigationDemo extends StatelessWidget { CupertinoNavigationDemo() - : colorItems = new List.generate(50, (int index){ + : colorItems = new List.generate(50, (int index) { return coolColors[new math.Random().nextInt(coolColors.length)]; }) , - colorNameItems = new List.generate(50, (int index){ + colorNameItems = new List.generate(50, (int index) { return coolColorNames[new math.Random().nextInt(coolColorNames.length)]; }); diff --git a/examples/flutter_gallery/lib/demo/cupertino/cupertino_switch_demo.dart b/examples/flutter_gallery/lib/demo/cupertino/cupertino_switch_demo.dart index c6661563a2..8c62569aaa 100644 --- a/examples/flutter_gallery/lib/demo/cupertino/cupertino_switch_demo.dart +++ b/examples/flutter_gallery/lib/demo/cupertino/cupertino_switch_demo.dart @@ -23,7 +23,7 @@ class _CupertinoSwitchDemoState extends State { title: const Text('Cupertino Switch'), ), body: new Center( - child: new CupertinoSwitch( + child: new CupertinoSwitch( value: _switchValue, onChanged: (bool value) { setState(() { diff --git a/examples/flutter_gallery/lib/demo/material/drawer_demo.dart b/examples/flutter_gallery/lib/demo/material/drawer_demo.dart index 8d96bd51fc..54f6f35af7 100644 --- a/examples/flutter_gallery/lib/demo/material/drawer_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/drawer_demo.dart @@ -100,7 +100,7 @@ class _DrawerDemoState extends State with TickerProviderStateMixin { package: _kGalleryAssetsPackage, ), ), - otherAccountsPictures: [ + otherAccountsPictures: [ new GestureDetector( onTap: () { _onOtherAccountsTap(context); diff --git a/examples/flutter_gallery/lib/demo/material/persistent_bottom_sheet_demo.dart b/examples/flutter_gallery/lib/demo/material/persistent_bottom_sheet_demo.dart index 2fb695a45e..53d3ae99b8 100644 --- a/examples/flutter_gallery/lib/demo/material/persistent_bottom_sheet_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/persistent_bottom_sheet_demo.dart @@ -53,7 +53,7 @@ class _PersistentBottomSheetDemoState extends State { }); } - void _showMessage() { + void _showMessage() { showDialog( context: context, child: new AlertDialog( diff --git a/examples/flutter_gallery/lib/demo/material/scrollable_tabs_demo.dart b/examples/flutter_gallery/lib/demo/material/scrollable_tabs_demo.dart index 49f9958a2a..6569b57144 100644 --- a/examples/flutter_gallery/lib/demo/material/scrollable_tabs_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/scrollable_tabs_demo.dart @@ -111,7 +111,7 @@ class ScrollableTabsDemoState extends State 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, diff --git a/examples/flutter_gallery/lib/demo/material/text_form_field_demo.dart b/examples/flutter_gallery/lib/demo/material/text_form_field_demo.dart index 8a4421faec..b133f7d95a 100644 --- a/examples/flutter_gallery/lib/demo/material/text_form_field_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/text_form_field_demo.dart @@ -42,7 +42,7 @@ class TextFormFieldDemoState extends State { 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(); diff --git a/examples/flutter_gallery/lib/demo/pesto_demo.dart b/examples/flutter_gallery/lib/demo/pesto_demo.dart index 1175f06ada..5dce4d03d3 100644 --- a/examples/flutter_gallery/lib/demo/pesto_demo.dart +++ b/examples/flutter_gallery/lib/demo/pesto_demo.dart @@ -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 _favoriteRecipes = new Set(); @@ -667,7 +667,7 @@ const List kPestoRecipes = const [ author: 'Ali Connors', ingredientsImagePath: 'pesto/healthy.png', ingredientsImagePackage: _kGalleryAssetsPackage, - description: 'This dish is a terrific pairing to almost any main. Bonus- it’s 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- it’s 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[ @@ -732,7 +732,7 @@ const List kPestoRecipes = const [ imagePackage: _kGalleryAssetsPackage, ingredients: const[ 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 kPestoRecipes = const [ 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. It’s 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. It’s easy to make and extra tasty.', imagePath: 'pesto/image10.jpg', imagePackage: _kGalleryAssetsPackage, ingredients: const[ @@ -771,7 +771,7 @@ const List kPestoRecipes = const [ 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[ diff --git a/examples/flutter_gallery/lib/demo/shrine/shrine_data.dart b/examples/flutter_gallery/lib/demo/shrine/shrine_data.dart index 1d1e0c99c0..46e2758d1f 100644 --- a/examples/flutter_gallery/lib/demo/shrine/shrine_data.dart +++ b/examples/flutter_gallery/lib/demo/shrine/shrine_data.dart @@ -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 shop’s 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 shop’s goods are handmade with love. Custom orders are ' 'available upon request if you need something extra special.' ); diff --git a/examples/flutter_gallery/lib/gallery/syntax_highlighter.dart b/examples/flutter_gallery/lib/gallery/syntax_highlighter.dart index 51b1215fa1..63be2e7b82 100644 --- a/examples/flutter_gallery/lib/gallery/syntax_highlighter.dart +++ b/examples/flutter_gallery/lib/gallery/syntax_highlighter.dart @@ -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); } } diff --git a/examples/flutter_gallery/test/calculator/smoke_test.dart b/examples/flutter_gallery/test/calculator/smoke_test.dart index 0195c7c9ac..d13b98616b 100644 --- a/examples/flutter_gallery/test/calculator/smoke_test.dart +++ b/examples/flutter_gallery/test/calculator/smoke_test.dart @@ -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'); diff --git a/examples/flutter_gallery/test/demo/material/drawer_demo_test.dart b/examples/flutter_gallery/test/demo/material/drawer_demo_test.dart index eb3545bf1d..0f99a6e01b 100644 --- a/examples/flutter_gallery/test/demo/material/drawer_demo_test.dart +++ b/examples/flutter_gallery/test/demo/material/drawer_demo_test.dart @@ -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(), diff --git a/examples/flutter_gallery/test/demo/material/text_form_field_demo_test.dart b/examples/flutter_gallery/test/demo/material/text_form_field_demo_test.dart index 9be810c634..90b2892ab0 100644 --- a/examples/flutter_gallery/test/demo/material/text_form_field_demo_test.dart +++ b/examples/flutter_gallery/test/demo/material/text_form_field_demo_test.dart @@ -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'); diff --git a/examples/platform_view/lib/main.dart b/examples/platform_view/lib/main.dart index 5e758dfbe6..e1a8a6ce8e 100644 --- a/examples/platform_view/lib/main.dart +++ b/examples/platform_view/lib/main.dart @@ -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. diff --git a/packages/flutter/lib/src/animation/animation_controller.dart b/packages/flutter/lib/src/animation/animation_controller.dart index 537efffd19..3ad51d2d5d 100644 --- a/packages/flutter/lib/src/animation/animation_controller.dart +++ b/packages/flutter/lib/src/animation/animation_controller.dart @@ -227,7 +227,7 @@ class AnimationController extends Animation notifyListeners(); _checkStatusChanged(); } - + /// Sets the controller's value to [lowerBound], stopping the animation (if /// in progress), and resetting to its beginning point, or dismissed state. /// diff --git a/packages/flutter/lib/src/cupertino/text_selection.dart b/packages/flutter/lib/src/cupertino/text_selection.dart index c9c89a9d34..1e6587d39f 100644 --- a/packages/flutter/lib/src/cupertino/text_selection.dart +++ b/packages/flutter/lib/src/cupertino/text_selection.dart @@ -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); diff --git a/packages/flutter/lib/src/foundation/diagnostics.dart b/packages/flutter/lib/src/foundation/diagnostics.dart index bb2f22d426..f78abc2aee 100644 --- a/packages/flutter/lib/src/foundation/diagnostics.dart +++ b/packages/flutter/lib/src/foundation/diagnostics.dart @@ -1173,7 +1173,7 @@ abstract class _NumProperty extends DiagnosticsProperty { 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 { - /// 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... /// diff --git a/packages/flutter/lib/src/gestures/arena.dart b/packages/flutter/lib/src/gestures/arena.dart index a83337a3e5..215313d7d7 100644 --- a/packages/flutter/lib/src/gestures/arena.dart +++ b/packages/flutter/lib/src/gestures/arena.dart @@ -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 members = state.members; diff --git a/packages/flutter/lib/src/gestures/binding.dart b/packages/flutter/lib/src/gestures/binding.dart index b0c4def945..07d6133397 100644 --- a/packages/flutter/lib/src/gestures/binding.dart +++ b/packages/flutter/lib/src/gestures/binding.dart @@ -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); diff --git a/packages/flutter/lib/src/gestures/constants.dart b/packages/flutter/lib/src/gestures/constants.dart index a907693cb5..13fdddc29b 100644 --- a/packages/flutter/lib/src/gestures/constants.dart +++ b/packages/flutter/lib/src/gestures/constants.dart @@ -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. diff --git a/packages/flutter/lib/src/gestures/lsq_solver.dart b/packages/flutter/lib/src/gestures/lsq_solver.dart index 904263b439..1c77166894 100644 --- a/packages/flutter/lib/src/gestures/lsq_solver.dart +++ b/packages/flutter/lib/src/gestures/lsq_solver.dart @@ -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) diff --git a/packages/flutter/lib/src/gestures/multitap.dart b/packages/flutter/lib/src/gestures/multitap.dart index dbf120a437..6b6e7c5e55 100644 --- a/packages/flutter/lib/src/gestures/multitap.dart +++ b/packages/flutter/lib/src/gestures/multitap.dart @@ -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)) diff --git a/packages/flutter/lib/src/gestures/scale.dart b/packages/flutter/lib/src/gestures/scale.dart index 27fc50147c..4b10debb21 100644 --- a/packages/flutter/lib/src/gestures/scale.dart +++ b/packages/flutter/lib/src/gestures/scale.dart @@ -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; diff --git a/packages/flutter/lib/src/material/animated_icons/animated_icons.dart b/packages/flutter/lib/src/material/animated_icons/animated_icons.dart index 7e3bd5fb1f..786b8eff77 100644 --- a/packages/flutter/lib/src/material/animated_icons/animated_icons.dart +++ b/packages/flutter/lib/src/material/animated_icons/animated_icons.dart @@ -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. diff --git a/packages/flutter/lib/src/material/animated_icons/animated_icons_data.dart b/packages/flutter/lib/src/material/animated_icons/animated_icons_data.dart index 52702421c8..f6399652ae 100644 --- a/packages/flutter/lib/src/material/animated_icons/animated_icons_data.dart +++ b/packages/flutter/lib/src/material/animated_icons/animated_icons_data.dart @@ -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. /// diff --git a/packages/flutter/lib/src/material/app_bar.dart b/packages/flutter/lib/src/material/app_bar.dart index 6879efacb0..2fbd6386ed 100644 --- a/packages/flutter/lib/src/material/app_bar.dart +++ b/packages/flutter/lib/src/material/app_bar.dart @@ -403,7 +403,7 @@ class _AppBarState extends State { icon: const Icon(Icons.menu), onPressed: _handleDrawerButtonEnd, tooltip: MaterialLocalizations.of(context).openAppDrawerTooltip, - ); + ); } final Widget toolbar = new Padding( diff --git a/packages/flutter/lib/src/material/bottom_navigation_bar.dart b/packages/flutter/lib/src/material/bottom_navigation_bar.dart index 5486c7ee9c..30ec443a77 100644 --- a/packages/flutter/lib/src/material/bottom_navigation_bar.dart +++ b/packages/flutter/lib/src/material/bottom_navigation_bar.dart @@ -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( diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index f11c210791..fde3e5a23e 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -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. /// diff --git a/packages/flutter/lib/src/material/date_picker.dart b/packages/flutter/lib/src/material/date_picker.dart index 633b6d08e8..21609b4e32 100644 --- a/packages/flutter/lib/src/material/date_picker.dart +++ b/packages/flutter/lib/src/material/date_picker.dart @@ -565,7 +565,7 @@ class _MonthPickerState extends State { _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(() { diff --git a/packages/flutter/lib/src/material/list_tile.dart b/packages/flutter/lib/src/material/list_tile.dart index a78b5911ce..74cacaba56 100644 --- a/packages/flutter/lib/src/material/list_tile.dart +++ b/packages/flutter/lib/src/material/list_tile.dart @@ -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 diff --git a/packages/flutter/lib/src/material/material.dart b/packages/flutter/lib/src/material/material.dart index 8ad66cc53a..251cd000f8 100644 --- a/packages/flutter/lib/src/material/material.dart +++ b/packages/flutter/lib/src/material/material.dart @@ -303,7 +303,7 @@ class _MaterialState extends State 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, diff --git a/packages/flutter/lib/src/material/tabs.dart b/packages/flutter/lib/src/material/tabs.dart index 7f2ba7130d..2e70eda640 100644 --- a/packages/flutter/lib/src/material/tabs.dart +++ b/packages/flutter/lib/src/material/tabs.dart @@ -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 { unselectedLabelStyle: widget.unselectedLabelStyle, child: new _TabLabelBar( onPerformLayout: _saveTabOffsets, - children: wrappedTabs, + children: wrappedTabs, ), ), ); diff --git a/packages/flutter/lib/src/material/text_field.dart b/packages/flutter/lib/src/material/text_field.dart index 57ec295af0..e9e012d5cf 100644 --- a/packages/flutter/lib/src/material/text_field.dart +++ b/packages/flutter/lib/src/material/text_field.dart @@ -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. /// diff --git a/packages/flutter/lib/src/material/text_selection.dart b/packages/flutter/lib/src/material/text_selection.dart index 1a551ca5d9..a2acf9e9dc 100644 --- a/packages/flutter/lib/src/material/text_selection.dart +++ b/packages/flutter/lib/src/material/text_selection.dart @@ -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 diff --git a/packages/flutter/lib/src/material/time_picker.dart b/packages/flutter/lib/src/material/time_picker.dart index 7db5cef19f..f1c800f9e8 100644 --- a/packages/flutter/lib/src/material/time_picker.dart +++ b/packages/flutter/lib/src/material/time_picker.dart @@ -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(() { diff --git a/packages/flutter/lib/src/material/toggleable.dart b/packages/flutter/lib/src/material/toggleable.dart index 94970f141f..79de2cf737 100644 --- a/packages/flutter/lib/src/material/toggleable.dart +++ b/packages/flutter/lib/src/material/toggleable.dart @@ -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)); } } diff --git a/packages/flutter/lib/src/painting/borders.dart b/packages/flutter/lib/src/painting/borders.dart index 6f6c8e6f5d..3ce7a2fb3e 100644 --- a/packages/flutter/lib/src/painting/borders.dart +++ b/packages/flutter/lib/src/painting/borders.dart @@ -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. diff --git a/packages/flutter/lib/src/rendering/custom_paint.dart b/packages/flutter/lib/src/rendering/custom_paint.dart index b66659c06f..947e6a6b2b 100644 --- a/packages/flutter/lib/src/rendering/custom_paint.dart +++ b/packages/flutter/lib/src/rendering/custom_paint.dart @@ -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; diff --git a/packages/flutter/lib/src/rendering/debug_overflow_indicator.dart b/packages/flutter/lib/src/rendering/debug_overflow_indicator.dart index 8a6c6bb730..8aa086d83a 100644 --- a/packages/flutter/lib/src/rendering/debug_overflow_indicator.dart +++ b/packages/flutter/lib/src/rendering/debug_overflow_indicator.dart @@ -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) { diff --git a/packages/flutter/lib/src/rendering/flex.dart b/packages/flutter/lib/src/rendering/flex.dart index 629aecb7af..2abe6554b6 100644 --- a/packages/flutter/lib/src/rendering/flex.dart +++ b/packages/flutter/lib/src/rendering/flex.dart @@ -940,7 +940,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin extends RenderBox with RenderObjectWithChildMixin { // 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 diff --git a/packages/flutter/lib/src/rendering/shifted_box.dart b/packages/flutter/lib/src/rendering/shifted_box.dart index a7cd273cd1..2a12f40973 100644 --- a/packages/flutter/lib/src/rendering/shifted_box.dart +++ b/packages/flutter/lib/src/rendering/shifted_box.dart @@ -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; diff --git a/packages/flutter/lib/src/semantics/semantics.dart b/packages/flutter/lib/src/semantics/semantics.dart index 31c5d26049..20ad7ee848 100644 --- a/packages/flutter/lib/src/semantics/semantics.dart +++ b/packages/flutter/lib/src/semantics/semantics.dart @@ -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; diff --git a/packages/flutter/lib/src/services/text_editing.dart b/packages/flutter/lib/src/services/text_editing.dart index f84cce677c..c044cf578c 100644 --- a/packages/flutter/lib/src/services/text_editing.dart +++ b/packages/flutter/lib/src/services/text_editing.dart @@ -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, diff --git a/packages/flutter/lib/src/services/text_formatter.dart b/packages/flutter/lib/src/services/text_formatter.dart index d1b8b9e7f5..f9dd70a729 100644 --- a/packages/flutter/lib/src/services/text_formatter.dart +++ b/packages/flutter/lib/src/services/text_formatter.dart @@ -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. /// diff --git a/packages/flutter/lib/src/services/text_input.dart b/packages/flutter/lib/src/services/text_input.dart index c90ef16756..ab70858b6a 100644 --- a/packages/flutter/lib/src/services/text_input.dart +++ b/packages/flutter/lib/src/services/text_input.dart @@ -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(() { diff --git a/packages/flutter/lib/src/widgets/animated_list.dart b/packages/flutter/lib/src/widgets/animated_list.dart index 25ae7609fc..6957b84208 100644 --- a/packages/flutter/lib/src/widgets/animated_list.dart +++ b/packages/flutter/lib/src/widgets/animated_list.dart @@ -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 diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart index 9d12cb29bd..d3ed374a33 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart @@ -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; diff --git a/packages/flutter/lib/src/widgets/drag_target.dart b/packages/flutter/lib/src/widgets/drag_target.dart index 6fe4b02517..e94e60e7b6 100644 --- a/packages/flutter/lib/src/widgets/drag_target.dart +++ b/packages/flutter/lib/src/widgets/drag_target.dart @@ -390,7 +390,7 @@ class DragTarget 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 onWillAccept; diff --git a/packages/flutter/lib/src/widgets/editable_text.dart b/packages/flutter/lib/src/widgets/editable_text.dart index d476a8810a..fd820f35a3 100644 --- a/packages/flutter/lib/src/widgets/editable_text.dart +++ b/packages/flutter/lib/src/widgets/editable_text.dart @@ -426,9 +426,9 @@ class EditableTextState extends State 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; } diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index 1a4996be94..49f026f0fe 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart @@ -1210,13 +1210,13 @@ abstract class State 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 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. diff --git a/packages/flutter/lib/src/widgets/gesture_detector.dart b/packages/flutter/lib/src/widgets/gesture_detector.dart index ab2f518b7e..65c3609945 100644 --- a/packages/flutter/lib/src/widgets/gesture_detector.dart +++ b/packages/flutter/lib/src/widgets/gesture_detector.dart @@ -566,7 +566,7 @@ class RawGestureDetectorState extends State { }()); if (!widget.excludeFromSemantics) { final RenderSemanticsGestureHandler semanticsGestureHandler = context.findRenderObject(); - semanticsGestureHandler.validActions = actions; // will call _markNeedsSemanticsUpdate(), if required. + semanticsGestureHandler.validActions = actions; // will call _markNeedsSemanticsUpdate(), if required. } } diff --git a/packages/flutter/lib/src/widgets/heroes.dart b/packages/flutter/lib/src/widgets/heroes.dart index 782a6d9189..fcd5b34781 100644 --- a/packages/flutter/lib/src/widgets/heroes.dart +++ b/packages/flutter/lib/src/widgets/heroes.dart @@ -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, diff --git a/packages/flutter/lib/src/widgets/image.dart b/packages/flutter/lib/src/widgets/image.dart index e661887dee..3c4dcab9aa 100644 --- a/packages/flutter/lib/src/widgets/image.dart +++ b/packages/flutter/lib/src/widgets/image.dart @@ -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 diff --git a/packages/flutter/lib/src/widgets/navigator.dart b/packages/flutter/lib/src/widgets/navigator.dart index 37655c1bad..0354bfe508 100644 --- a/packages/flutter/lib/src/widgets/navigator.dart +++ b/packages/flutter/lib/src/widgets/navigator.dart @@ -966,7 +966,7 @@ class NavigatorState extends State 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) diff --git a/packages/flutter/lib/src/widgets/overlay.dart b/packages/flutter/lib/src/widgets/overlay.dart index 3e5ffebde0..8fe0c01252 100644 --- a/packages/flutter/lib/src/widgets/overlay.dart +++ b/packages/flutter/lib/src/widgets/overlay.dart @@ -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; diff --git a/packages/flutter/lib/src/widgets/routes.dart b/packages/flutter/lib/src/widgets/routes.dart index e2aff6c2d8..5d621c52e6 100644 --- a/packages/flutter/lib/src/widgets/routes.dart +++ b/packages/flutter/lib/src/widgets/routes.dart @@ -652,7 +652,7 @@ abstract class ModalRoute extends TransitionRoute with LocalHistoryRoute extends TransitionRoute with LocalHistoryRoute _springTime) { + if (time > _springTime) { _timeOffset = _springTime.isFinite ? _springTime : 0.0; simulation = _springSimulation; } else { diff --git a/packages/flutter/lib/src/widgets/scrollable.dart b/packages/flutter/lib/src/widgets/scrollable.dart index e7047d3a8d..1b8f32bdc6 100644 --- a/packages/flutter/lib/src/widgets/scrollable.dart +++ b/packages/flutter/lib/src/widgets/scrollable.dart @@ -505,7 +505,7 @@ class ScrollableState extends State 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, diff --git a/packages/flutter/lib/src/widgets/text.dart b/packages/flutter/lib/src/widgets/text.dart index d63f438de3..b163638951 100644 --- a/packages/flutter/lib/src/widgets/text.dart +++ b/packages/flutter/lib/src/widgets/text.dart @@ -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; diff --git a/packages/flutter/lib/src/widgets/text_selection.dart b/packages/flutter/lib/src/widgets/text_selection.dart index 17f46b1069..3167529696 100644 --- a/packages/flutter/lib/src/widgets/text_selection.dart +++ b/packages/flutter/lib/src/widgets/text_selection.dart @@ -193,7 +193,7 @@ abstract class TextSelectionControls { /// implemented. // TODO(ianh): https://github.com/flutter/flutter/issues/11427 Future 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, diff --git a/packages/flutter/lib/src/widgets/title.dart b/packages/flutter/lib/src/widgets/title.dart index c149e1d325..897b9993e5 100644 --- a/packages/flutter/lib/src/widgets/title.dart +++ b/packages/flutter/lib/src/widgets/title.dart @@ -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; diff --git a/packages/flutter/lib/src/widgets/widget_inspector.dart b/packages/flutter/lib/src/widgets/widget_inspector.dart index 2b138823ac..45dff3ae81 100644 --- a/packages/flutter/lib/src/widgets/widget_inspector.dart +++ b/packages/flutter/lib/src/widgets/widget_inspector.dart @@ -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 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, ); diff --git a/packages/flutter/test/animation/animation_controller_test.dart b/packages/flutter/test/animation/animation_controller_test.dart index fe9db2c701..bc520ebaa6 100644 --- a/packages/flutter/test/animation/animation_controller_test.dart +++ b/packages/flutter/test/animation/animation_controller_test.dart @@ -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 statusLog = []; final AnimationController controller = new AnimationController( duration: const Duration(milliseconds: 100), diff --git a/packages/flutter/test/cupertino/dialog_test.dart b/packages/flutter/test/cupertino/dialog_test.dart index 7d12e42344..368ba56ed8 100644 --- a/packages/flutter/test/cupertino/dialog_test.dart +++ b/packages/flutter/test/cupertino/dialog_test.dart @@ -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. diff --git a/packages/flutter/test/foundation/change_notifier_test.dart b/packages/flutter/test/foundation/change_notifier_test.dart index 759516a137..af5186dbbb 100644 --- a/packages/flutter/test/foundation/change_notifier_test.dart +++ b/packages/flutter/test/foundation/change_notifier_test.dart @@ -219,19 +219,19 @@ void main() { listenableUnderTest = new Listenable.merge([source1]); expect( - listenableUnderTest.toString(), + listenableUnderTest.toString(), "Listenable.merge([Instance of 'TestNotifier'])", ); listenableUnderTest = new Listenable.merge([source1, source2]); expect( - listenableUnderTest.toString(), + listenableUnderTest.toString(), "Listenable.merge([Instance of 'TestNotifier', Instance of 'TestNotifier'])", ); listenableUnderTest = new Listenable.merge([null, source2]); expect( - listenableUnderTest.toString(), + listenableUnderTest.toString(), "Listenable.merge([null, Instance of 'TestNotifier'])", ); }); diff --git a/packages/flutter/test/material/animated_icons_private_test.dart b/packages/flutter/test/material/animated_icons_private_test.dart index d92284cb80..99c5607469 100644 --- a/packages/flutter/test/material/animated_icons_private_test.dart +++ b/packages/flutter/test/material/animated_icons_private_test.dart @@ -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([ @@ -123,7 +123,7 @@ void main () { shouldMirror: false, uiPathFactory: pathFactory ); - painter.paint(mockCanvas, size); + painter.paint(mockCanvas, size); expect(generatedPaths.length, 1); verifyInOrder([ @@ -145,7 +145,7 @@ void main () { shouldMirror: false, uiPathFactory: pathFactory ); - painter.paint(mockCanvas, size); + painter.paint(mockCanvas, size); expect(generatedPaths.length, 1); verifyInOrder([ @@ -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([ 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([ @@ -218,7 +218,7 @@ void main () { shouldMirror: false, uiPathFactory: pathFactory ); - painter.paint(mockCanvas, size); + painter.paint(mockCanvas, size); expect(generatedPaths.length, 1); verifyInOrder([ @@ -238,7 +238,7 @@ void main () { shouldMirror: false, uiPathFactory: pathFactory ); - painter.paint(mockCanvas, size); + painter.paint(mockCanvas, size); expect(generatedPaths.length, 1); verifyInOrder([ diff --git a/packages/flutter/test/material/animated_icons_test.dart b/packages/flutter/test/material/animated_icons_test.dart index c7d03fb04b..20a15ff99e 100644 --- a/packages/flutter/test/material/animated_icons_test.dart +++ b/packages/flutter/test/material/animated_icons_test.dart @@ -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(0.0), diff --git a/packages/flutter/test/material/colors_test.dart b/packages/flutter/test/material/colors_test.dart index e9ccadfba3..ce986b6a0e 100644 --- a/packages/flutter/test/material/colors_test.dart +++ b/packages/flutter/test/material/colors_test.dart @@ -6,8 +6,8 @@ import 'package:test/test.dart'; import 'package:flutter/material.dart'; -const List primaryKeys = const [50, 100, 200, 300, 400, 500, 600, 700, 800, 900]; -const List accentKeys = const [100, 200, 400, 700]; +const List primaryKeys = const [50, 100, 200, 300, 400, 500, 600, 700, 800, 900]; +const List accentKeys = const [100, 200, 400, 700]; void main() { test('MaterialColor basic functionality', () { diff --git a/packages/flutter/test/material/dialog_test.dart b/packages/flutter/test/material/dialog_test.dart index 6883981aeb..0c1f0f6a2c 100644 --- a/packages/flutter/test/material/dialog_test.dart +++ b/packages/flutter/test/material/dialog_test.dart @@ -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), ), diff --git a/packages/flutter/test/material/dropdown_test.dart b/packages/flutter/test/material/dropdown_test.dart index c00a95ba4f..b644bc632c 100644 --- a/packages/flutter/test/material/dropdown_test.dart +++ b/packages/flutter/test/material/dropdown_test.dart @@ -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)); } diff --git a/packages/flutter/test/material/ink_paint_test.dart b/packages/flutter/test/material/ink_paint_test.dart index 5bec97828c..198a1b8023 100644 --- a/packages/flutter/test/material/ink_paint_test.dart +++ b/packages/flutter/test/material/ink_paint_test.dart @@ -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 arguments) { diff --git a/packages/flutter/test/material/input_decorator_test.dart b/packages/flutter/test/material/input_decorator_test.dart index 74eaff8637..cbc5d5c747 100644 --- a/packages/flutter/test/material/input_decorator_test.dart +++ b/packages/flutter/test/material/input_decorator_test.dart @@ -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 animation = inputBorderPainter.borderAnimation; final dynamic/*_InputBorder */ border = inputBorderTween.evaluate(animation); return border.borderSide.width; diff --git a/packages/flutter/test/material/list_tile_test.dart b/packages/flutter/test/material/list_tile_test.dart index 789d04f853..f3e1773a23 100644 --- a/packages/flutter/test/material/list_tile_test.dart +++ b/packages/flutter/test/material/list_tile_test.dart @@ -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); diff --git a/packages/flutter/test/material/refresh_indicator_test.dart b/packages/flutter/test/material/refresh_indicator_test.dart index 8b45a35ec3..689c7d121f 100644 --- a/packages/flutter/test/material/refresh_indicator_test.dart +++ b/packages/flutter/test/material/refresh_indicator_test.dart @@ -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: ['A', 'B', 'C', 'D', 'E', 'F'].map((String item) { return new SizedBox( diff --git a/packages/flutter/test/material/scaffold_test.dart b/packages/flutter/test/material/scaffold_test.dart index 43291a5eb1..7338464cc0 100644 --- a/packages/flutter/test/material/scaffold_test.dart +++ b/packages/flutter/test/material/scaffold_test.dart @@ -505,7 +505,7 @@ void main() { persistentFooterButtons: const [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)); diff --git a/packages/flutter/test/material/snack_bar_test.dart b/packages/flutter/test/material/snack_bar_test.dart index a8529c0851..b3fbe0cd3c 100644 --- a/packages/flutter/test/material/snack_bar_test.dart +++ b/packages/flutter/test/material/snack_bar_test.dart @@ -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)); diff --git a/packages/flutter/test/material/text_field_test.dart b/packages/flutter/test/material/text_field_test.dart index 745564dbd6..f4cb1bb1c9 100644 --- a/packages/flutter/test/material/text_field_test.dart +++ b/packages/flutter/test/material/text_field_test.dart @@ -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); diff --git a/packages/flutter/test/material/time_picker_test.dart b/packages/flutter/test/material/time_picker_test.dart index a4c3fd5b80..bd7cd2dd5a 100644 --- a/packages/flutter/test/material/time_picker_test.dart +++ b/packages/flutter/test/material/time_picker_test.dart @@ -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)); diff --git a/packages/flutter/test/material/will_pop_test.dart b/packages/flutter/test/material/will_pop_test.dart index ea7c7c4670..d10283bfd1 100644 --- a/packages/flutter/test/material/will_pop_test.dart +++ b/packages/flutter/test/material/will_pop_test.dart @@ -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); diff --git a/packages/flutter/test/painting/box_fit_test.dart b/packages/flutter/test/painting/box_fit_test.dart index 3830d00051..9f4e33262a 100644 --- a/packages/flutter/test/painting/box_fit_test.dart +++ b/packages/flutter/test/painting/box_fit_test.dart @@ -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)); diff --git a/packages/flutter/test/painting/fake_codec.dart b/packages/flutter/test/painting/fake_codec.dart index 6d2b5fcde0..cf00ba66e7 100644 --- a/packages/flutter/test/painting/fake_codec.dart +++ b/packages/flutter/test/painting/fake_codec.dart @@ -28,7 +28,7 @@ class FakeCodec extends ui.Codec { final ui.Codec codec = await ui.instantiateImageCodec(data); final int frameCount = codec.frameCount; final List frameInfos = new List(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); } diff --git a/packages/flutter/test/painting/image_data.dart b/packages/flutter/test/painting/image_data.dart index 6e8b30cd69..20e5d12982 100644 --- a/packages/flutter/test/painting/image_data.dart +++ b/packages/flutter/test/painting/image_data.dart @@ -13,13 +13,13 @@ const List kTransparentImage = const [ /// 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 kAnimatedGif = const [ - 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, ]; diff --git a/packages/flutter/test/painting/image_stream_test.dart b/packages/flutter/test/painting/image_stream_test.dart index 46bdd9afc1..d4bde72feb 100644 --- a/packages/flutter/test/painting/image_stream_test.dart +++ b/packages/flutter/test/painting/image_stream_test.dart @@ -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; diff --git a/packages/flutter/test/rendering/reattach_test.dart b/packages/flutter/test/rendering/reattach_test.dart index 802085638b..2ed3754dde 100644 --- a/packages/flutter/test/rendering/reattach_test.dart +++ b/packages/flutter/test/rendering/reattach_test.dart @@ -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(); }); } diff --git a/packages/flutter/test/widgets/animated_size_test.dart b/packages/flutter/test/widgets/animated_size_test.dart index fd669a2a3c..3e38716775 100644 --- a/packages/flutter/test/widgets/animated_size_test.dart +++ b/packages/flutter/test/widgets/animated_size_test.dart @@ -188,7 +188,7 @@ void main() { // Make sure animation proceeds at child's pace, with AnimatedSize // tightly tracking the child's size. verify(state: RenderAnimatedSizeState.stable); - await pumpMillis(1); // register change + await pumpMillis(1); // register change verify(state: RenderAnimatedSizeState.changed); await pumpMillis(49); verify(size: 150.0, state: RenderAnimatedSizeState.unstable); @@ -215,7 +215,7 @@ void main() { ); verify(size: 200.0, state: RenderAnimatedSizeState.stable); - await pumpMillis(1); // register change + await pumpMillis(1); // register change verify(state: RenderAnimatedSizeState.changed); await pumpMillis(100); verify(size: 150.0, state: RenderAnimatedSizeState.stable); diff --git a/packages/flutter/test/widgets/column_test.dart b/packages/flutter/test/widgets/column_test.dart index a10bcf3e85..ae3a231a9f 100644 --- a/packages/flutter/test/widgets/column_test.dart +++ b/packages/flutter/test/widgets/column_test.dart @@ -371,7 +371,7 @@ void main() { child: new Container( width: 0.0, height: 0.0, - child: new Column( + child: new Column( mainAxisSize: MainAxisSize.min, children: [ new Container( @@ -763,7 +763,7 @@ void main() { child: new Container( width: 0.0, height: 0.0, - child: new Column( + child: new Column( mainAxisSize: MainAxisSize.min, verticalDirection: VerticalDirection.up, children: [ diff --git a/packages/flutter/test/widgets/custom_painter_test.dart b/packages/flutter/test/widgets/custom_painter_test.dart index bf2c346302..1d66c3fb07 100644 --- a/packages/flutter/test/widgets/custom_painter_test.dart +++ b/packages/flutter/test/widgets/custom_painter_test.dart @@ -274,7 +274,7 @@ void _defineTests() { semanticsTester.dispose(); }); - testWidgets('Can toggle semantics on, off, on without crash', (WidgetTester tester) async { + testWidgets('Can toggle semantics on, off, on without crash', (WidgetTester tester) async { await tester.pumpWidget(new CustomPaint( painter: new _PainterWithSemantics( semantics: new CustomPainterSemantics( diff --git a/packages/flutter/test/widgets/dismissible_test.dart b/packages/flutter/test/widgets/dismissible_test.dart index eb8070ea8b..d9deb15f36 100644 --- a/packages/flutter/test/widgets/dismissible_test.dart +++ b/packages/flutter/test/widgets/dismissible_test.dart @@ -619,7 +619,7 @@ void main() { expect(find.text('1'), findsOneWidget); }); - testWidgets('Checking fling item after movementDuration', (WidgetTester tester) async { + testWidgets('Checking fling item after movementDuration', (WidgetTester tester) async { await tester.pumpWidget(buildTest()); expect(dismissedItems, isEmpty); diff --git a/packages/flutter/test/widgets/fade_in_image_test.dart b/packages/flutter/test/widgets/fade_in_image_test.dart index 63cfa8dcec..d86c59b16c 100644 --- a/packages/flutter/test/widgets/fade_in_image_test.dart +++ b/packages/flutter/test/widgets/fade_in_image_test.dart @@ -34,26 +34,26 @@ Future main() async { fadeInDuration: const Duration(milliseconds: 50), )); - expect(displayedImage().image, null); // image providers haven't completed yet + expect(displayedImage().image, null); // image providers haven't completed yet placeholderProvider.complete(); await tester.pump(); - expect(displayedImage().image, same(placeholderImage)); // placeholder completed + expect(displayedImage().image, same(placeholderImage)); // placeholder completed expect(state().phase, FadeInImagePhase.waiting); - imageProvider.complete(); // load the image - expect(state().phase, FadeInImagePhase.fadeOut); // fade out placeholder + imageProvider.complete(); // load the image + expect(state().phase, FadeInImagePhase.fadeOut); // fade out placeholder for (int i = 0; i < 7; i += 1) { expect(displayedImage().image, same(placeholderImage)); await tester.pump(const Duration(milliseconds: 10)); } expect(displayedImage().image, same(targetImage)); - expect(state().phase, FadeInImagePhase.fadeIn); // fade in image + expect(state().phase, FadeInImagePhase.fadeIn); // fade in image for (int i = 0; i < 6; i += 1) { expect(displayedImage().image, same(targetImage)); await tester.pump(const Duration(milliseconds: 10)); } - expect(state().phase, FadeInImagePhase.completed); // done + expect(state().phase, FadeInImagePhase.completed); // done expect(displayedImage().image, same(targetImage)); // Test case: re-use state object (didUpdateWidget) @@ -64,12 +64,12 @@ Future main() async { )); final dynamic stateAfterDidUpdateWidget = state(); expect(stateAfterDidUpdateWidget, same(stateBeforeDidUpdateWidget)); - expect(stateAfterDidUpdateWidget.phase, FadeInImagePhase.completed); // completes immediately + expect(stateAfterDidUpdateWidget.phase, FadeInImagePhase.completed); // completes immediately expect(displayedImage().image, same(targetImage)); // Test case: new state object but cached image final dynamic stateBeforeRecreate = state(); - await tester.pumpWidget(new Container()); // clear widget tree to prevent state reuse + await tester.pumpWidget(new Container()); // clear widget tree to prevent state reuse await tester.pumpWidget(new FadeInImage( placeholder: placeholderProvider, image: imageProvider, @@ -77,7 +77,7 @@ Future main() async { expect(displayedImage().image, same(targetImage)); final dynamic stateAfterRecreate = state(); expect(stateAfterRecreate, isNot(same(stateBeforeRecreate))); - expect(stateAfterRecreate.phase, FadeInImagePhase.completed); // completes immediately + expect(stateAfterRecreate.phase, FadeInImagePhase.completed); // completes immediately expect(displayedImage().image, same(targetImage)); }); }); diff --git a/packages/flutter/test/widgets/image_test.dart b/packages/flutter/test/widgets/image_test.dart index a814a7c58c..2ce165c78f 100644 --- a/packages/flutter/test/widgets/image_test.dart +++ b/packages/flutter/test/widgets/image_test.dart @@ -230,7 +230,7 @@ void main() { final GlobalKey imageKey = new GlobalKey(debugLabel: 'image'); final TestImageProvider imageProvider = new TestImageProvider(); - // This is just a variation on the previous test. In this version the location + // This is just a variation on the previous test. In this version the location // of the Image changes and the MediaQuery widgets do not. await tester.pumpWidget( new Row( @@ -462,7 +462,7 @@ class TestImageProvider extends ImageProvider { class TestImageStreamCompleter extends ImageStreamCompleter { final List listeners = []; - @override + @override void addListener(ImageListener listener) { listeners.add(listener); } diff --git a/packages/flutter/test/widgets/modal_barrier_test.dart b/packages/flutter/test/widgets/modal_barrier_test.dart index ab5f432fe4..7be600f272 100644 --- a/packages/flutter/test/widgets/modal_barrier_test.dart +++ b/packages/flutter/test/widgets/modal_barrier_test.dart @@ -73,13 +73,13 @@ void main() { // Tapping on X routes to the barrier await tester.tap(find.text('X')); - await tester.pump(); // begin transition - await tester.pump(const Duration(seconds: 1)); // end transition + await tester.pump(); // begin transition + await tester.pump(const Duration(seconds: 1)); // end transition // Tap on the barrier to dismiss it await tester.tap(find.byKey(const ValueKey('barrier'))); - await tester.pump(); // begin transition - await tester.pump(const Duration(seconds: 1)); // end transition + await tester.pump(); // begin transition + await tester.pump(const Duration(seconds: 1)); // end transition expect(find.byKey(const ValueKey('barrier')), findsNothing, reason: 'The route should have been dismissed by tapping the barrier.'); diff --git a/packages/flutter/test/widgets/nested_scroll_view_test.dart b/packages/flutter/test/widgets/nested_scroll_view_test.dart index aeddbef09c..9fd97d12d8 100644 --- a/packages/flutter/test/widgets/nested_scroll_view_test.dart +++ b/packages/flutter/test/widgets/nested_scroll_view_test.dart @@ -283,7 +283,7 @@ void main() { ), )); - // Initially Page0 is visible and Page0's appbar is fully expanded (height = 200.0). + // Initially Page0 is visible and Page0's appbar is fully expanded (height = 200.0). expect(find.text('Page0'), findsOneWidget); expect(find.text('Page1'), findsNothing); expect(find.text('Page2'), findsNothing); @@ -302,7 +302,7 @@ void main() { expect(find.text('Page2'), findsNothing); expect(tester.renderObject(find.byType(AppBar)).size.height, 150.0); - // Expand Page1's appbar and then fling to Page2. Page2's appbar appears + // Expand Page1's appbar and then fling to Page2. Page2's appbar appears // fully expanded. controller.jumpTo(0.0); await(tester.pumpAndSettle()); diff --git a/packages/flutter/test/widgets/scrollable_grid_test.dart b/packages/flutter/test/widgets/scrollable_grid_test.dart index 66eb536f9b..1a0cf440f8 100644 --- a/packages/flutter/test/widgets/scrollable_grid_test.dart +++ b/packages/flutter/test/widgets/scrollable_grid_test.dart @@ -29,7 +29,7 @@ void main() { child: new Align( child: new SizedBox( height: 800.0, - width: 300.0, // forces the grid children to be 300..300 + width: 300.0, // forces the grid children to be 300..300 child: new GridView.count( crossAxisCount: 1, padding: padding, diff --git a/packages/flutter/test/widgets/scrollable_semantics_test.dart b/packages/flutter/test/widgets/scrollable_semantics_test.dart index 621096be9f..ebd329f0cc 100644 --- a/packages/flutter/test/widgets/scrollable_semantics_test.dart +++ b/packages/flutter/test/widgets/scrollable_semantics_test.dart @@ -167,7 +167,7 @@ void main() { await tester.pumpWidget(new Directionality( textDirection: TextDirection.ltr, - child:new MediaQuery( + child: new MediaQuery( data: const MediaQueryData(), child: new Scrollable( controller: scrollController, @@ -315,7 +315,7 @@ void main() { expect(semantics, includesNodeWith(label: 'Item 3')); }); - testWidgets('Can toggle semantics on, off, on without crash', (WidgetTester tester) async { + testWidgets('Can toggle semantics on, off, on without crash', (WidgetTester tester) async { await tester.pumpWidget( new Directionality( textDirection: TextDirection.ltr, diff --git a/packages/flutter/test/widgets/semantics_11_test.dart b/packages/flutter/test/widgets/semantics_11_test.dart index 4b75eb6041..240a15ef8d 100644 --- a/packages/flutter/test/widgets/semantics_11_test.dart +++ b/packages/flutter/test/widgets/semantics_11_test.dart @@ -62,7 +62,7 @@ void main() { child: new Semantics( onTap: dummyTapHandler, textDirection: TextDirection.ltr, - label: 'bar', // <-- only change + label: 'bar', // <-- only change ), ), ), diff --git a/packages/flutter/test/widgets/shape_decoration_test.dart b/packages/flutter/test/widgets/shape_decoration_test.dart index 3c8dc18d9c..9fa7d0ec2b 100644 --- a/packages/flutter/test/widgets/shape_decoration_test.dart +++ b/packages/flutter/test/widgets/shape_decoration_test.dart @@ -111,7 +111,7 @@ class TestBorder extends ShapeBorder { const TestBorder(this.onLog) : assert(onLog != null); final Logger onLog; - + @override EdgeInsetsGeometry get dimensions => const EdgeInsetsDirectional.only(start: 1.0); diff --git a/packages/flutter/test/widgets/sliver_semantics_test.dart b/packages/flutter/test/widgets/sliver_semantics_test.dart index 724ea4a33a..29b34d4539 100644 --- a/packages/flutter/test/widgets/sliver_semantics_test.dart +++ b/packages/flutter/test/widgets/sliver_semantics_test.dart @@ -482,7 +482,7 @@ void main() { child: new MediaQuery( data: const MediaQueryData(), child: new CustomScrollView( - reverse: true, // This is the important setting for this test. + reverse: true, // This is the important setting for this test. slivers: [ const SliverAppBar( pinned: true, @@ -570,7 +570,7 @@ void main() { child: new MediaQuery( data: const MediaQueryData(), child: new CustomScrollView( - reverse: true, // This is the important setting for this test. + reverse: true, // This is the important setting for this test. controller: controller, slivers: [ const SliverAppBar( diff --git a/packages/flutter/test/widgets/stack_test.dart b/packages/flutter/test/widgets/stack_test.dart index 2ebec853ef..37f29e47cd 100644 --- a/packages/flutter/test/widgets/stack_test.dart +++ b/packages/flutter/test/widgets/stack_test.dart @@ -581,7 +581,7 @@ void main() { await tester.pumpWidget( new Directionality( textDirection: TextDirection.rtl, - child: new Stack( + child: new Stack( children: [ new PositionedDirectional( start: 50.0, @@ -597,7 +597,7 @@ void main() { await tester.pumpWidget( new Directionality( textDirection: TextDirection.ltr, - child: new Stack( + child: new Stack( children: [ new PositionedDirectional( start: 50.0, diff --git a/packages/flutter/test/widgets/text_formatter_test.dart b/packages/flutter/test/widgets/text_formatter_test.dart index a7f06ff8d3..991e8c0bb6 100644 --- a/packages/flutter/test/widgets/text_formatter_test.dart +++ b/packages/flutter/test/widgets/text_formatter_test.dart @@ -45,7 +45,7 @@ void main() { }); test('test blacklisting formatter', () { - final TextEditingValue actualValue = + final TextEditingValue actualValue = new BlacklistingTextInputFormatter(new RegExp(r'[a-z]')) .formatEditUpdate(testOldValue, testNewValue); @@ -62,7 +62,7 @@ void main() { }); test('test single line formatter', () { - final TextEditingValue actualValue = + final TextEditingValue actualValue = BlacklistingTextInputFormatter.singleLineFormatter .formatEditUpdate(testOldValue, testNewValue); @@ -78,7 +78,7 @@ void main() { }); test('test whitelisting formatter', () { - final TextEditingValue actualValue = + final TextEditingValue actualValue = new WhitelistingTextInputFormatter(new RegExp(r'[a-c]')) .formatEditUpdate(testOldValue, testNewValue); @@ -94,7 +94,7 @@ void main() { }); test('test digits only formatter', () { - final TextEditingValue actualValue = + final TextEditingValue actualValue = WhitelistingTextInputFormatter.digitsOnly .formatEditUpdate(testOldValue, testNewValue); @@ -173,7 +173,7 @@ void main() { test('test length limiting formatter with complex Unicode characters', () { - // TODO(gspencer): Test additional strings. We can do this once the + // TODO(gspencer): Test additional strings. We can do this once the // formatter supports Unicode grapheme clusters. // // A formatter with max length 1 should accept: diff --git a/packages/flutter/test/widgets/widget_inspector_test.dart b/packages/flutter/test/widgets/widget_inspector_test.dart index 26e0d207ec..58fb53de01 100644 --- a/packages/flutter/test/widgets/widget_inspector_test.dart +++ b/packages/flutter/test/widgets/widget_inspector_test.dart @@ -427,7 +427,7 @@ void main() { for (int i = 0; i < expectedChain.length; i += 1) { expect(chainElements[i], isMap); final Map chainNode = chainElements[i]; - final Element element = expectedChain[i]; + final Element element = expectedChain[i]; expect(chainNode['node'], isMap); final Map jsonNode = chainNode['node']; expect(service.toObject(jsonNode['valueId']), equals(element)); diff --git a/packages/flutter_driver/lib/src/common/enum_util.dart b/packages/flutter_driver/lib/src/common/enum_util.dart index 9b7a0f4d11..fcf25783ec 100644 --- a/packages/flutter_driver/lib/src/common/enum_util.dart +++ b/packages/flutter_driver/lib/src/common/enum_util.dart @@ -13,7 +13,7 @@ /// /// enum Vote { yea, nay } /// final index = new EnumIndex(Vote.values); -/// index.lookupBySimpleName('yea'); // returns Vote.yea +/// index.lookupBySimpleName('yea'); // returns Vote.yea /// index.toSimpleName(Vote.nay); // returns 'nay' class EnumIndex { /// Creates an index of [enumValues]. diff --git a/packages/flutter_localizations/lib/src/l10n/date_localizations.dart b/packages/flutter_localizations/lib/src/l10n/date_localizations.dart index d77acc75ec..b76d7600c6 100644 --- a/packages/flutter_localizations/lib/src/l10n/date_localizations.dart +++ b/packages/flutter_localizations/lib/src/l10n/date_localizations.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// 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 diff --git a/packages/flutter_localizations/lib/src/material_localizations.dart b/packages/flutter_localizations/lib/src/material_localizations.dart index 6378177c4b..4dcb82ead6 100644 --- a/packages/flutter_localizations/lib/src/material_localizations.dart +++ b/packages/flutter_localizations/lib/src/material_localizations.dart @@ -494,21 +494,21 @@ class _MaterialLocalizationsDelegate extends LocalizationsDelegate _supportedLanguages = const [ - 'ar', // Arabic - 'de', // German - 'en', // English - 'es', // Spanish - 'fa', // Farsi - 'fr', // French - 'he', // Hebrew - 'it', // Italian - 'ja', // Japanese - 'ps', // Pashto - 'pt', // Portugese - 'ro', // Romanian - 'ru', // Russian - 'ur', // Urdu - 'zh', // Simplified Chinese + 'ar', // Arabic + 'de', // German + 'en', // English + 'es', // Spanish + 'fa', // Farsi + 'fr', // French + 'he', // Hebrew + 'it', // Italian + 'ja', // Japanese + 'ps', // Pashto + 'pt', // Portugese + 'ro', // Romanian + 'ru', // Russian + 'ur', // Urdu + 'zh', // Simplified Chinese ]; @override diff --git a/packages/flutter_localizations/lib/src/widgets_localizations.dart b/packages/flutter_localizations/lib/src/widgets_localizations.dart index 2421bbbd8e..8351a8994f 100644 --- a/packages/flutter_localizations/lib/src/widgets_localizations.dart +++ b/packages/flutter_localizations/lib/src/widgets_localizations.dart @@ -32,11 +32,11 @@ class GlobalWidgetsLocalizations implements WidgetsLocalizations { // See http://en.wikipedia.org/wiki/Right-to-left static const List _rtlLanguages = const [ - 'ar', // Arabic - 'fa', // Farsi - 'he', // Hebrew - 'ps', // Pashto - 'ur', // Urdu + 'ar', // Arabic + 'fa', // Farsi + 'he', // Hebrew + 'ps', // Pashto + 'ur', // Urdu ]; /// The locale for which the values of this class's localized resources diff --git a/packages/flutter_test/lib/src/matchers.dart b/packages/flutter_test/lib/src/matchers.dart index 1b908df199..b674584e98 100644 --- a/packages/flutter_test/lib/src/matchers.dart +++ b/packages/flutter_test/lib/src/matchers.dart @@ -512,7 +512,7 @@ class _HasGoodToStringDeep extends Matcher { issues.add('Last line is all tree connector characters.'); // If a toStringDeep method doesn't properly handle nested values that - // contain line breaks it can fail to add the required prefixes to all + // contain line breaks it can fail to add the required prefixes to all // lined when toStringDeep is called specifying prefixes. const String prefixLineOne = 'PREFIX_LINE_ONE____'; const String prefixOtherLines = 'PREFIX_OTHER_LINES_'; @@ -595,7 +595,7 @@ typedef num DistanceFunction(T a, T b); /// T. /// /// This type is used to describe a collection of [DistanceFunction] -/// functions which have (potentially) unrelated argument types. Since the +/// functions which have (potentially) unrelated argument types. Since the /// argument types of the functions may be unrelated, the only thing that the /// type system can statically assume about them is that they accept null (since /// all types in Dart are nullable). diff --git a/packages/flutter_tools/lib/src/android/android_device.dart b/packages/flutter_tools/lib/src/android/android_device.dart index aef36790a8..4a2c606e89 100644 --- a/packages/flutter_tools/lib/src/android/android_device.dart +++ b/packages/flutter_tools/lib/src/android/android_device.dart @@ -410,7 +410,7 @@ class AndroidDevice extends Device { cmd = adbCommandForDevice([ 'shell', 'am', 'start', '-a', 'android.intent.action.RUN', - '-f', '0x20000000', // FLAG_ACTIVITY_SINGLE_TOP + '-f', '0x20000000', // FLAG_ACTIVITY_SINGLE_TOP '--ez', 'enable-background-compilation', 'true', '--ez', 'enable-dart-profiling', 'true', ]); diff --git a/packages/flutter_tools/lib/src/android/android_sdk.dart b/packages/flutter_tools/lib/src/android/android_sdk.dart index 5b178b7457..a024d73428 100644 --- a/packages/flutter_tools/lib/src/android/android_sdk.dart +++ b/packages/flutter_tools/lib/src/android/android_sdk.dart @@ -168,7 +168,7 @@ class AndroidSdk { return null; } - // Try to find the NDK compiler. If we can't find it, it's also ok. + // Try to find the NDK compiler. If we can't find it, it's also ok. final String ndkDir = findNdk(androidHomeDir); String ndkCompiler; List ndkCompilerArgs; diff --git a/packages/flutter_tools/lib/src/artifacts.dart b/packages/flutter_tools/lib/src/artifacts.dart index bfe8963eb7..c8060d14c9 100644 --- a/packages/flutter_tools/lib/src/artifacts.dart +++ b/packages/flutter_tools/lib/src/artifacts.dart @@ -114,7 +114,7 @@ class CachedArtifacts extends Artifacts { } @override - String getEngineType(TargetPlatform platform, [BuildMode mode]){ + String getEngineType(TargetPlatform platform, [BuildMode mode]) { return fs.path.basename(_getEngineArtifactsPath(platform, mode)); } diff --git a/packages/flutter_tools/lib/src/base/flags.dart b/packages/flutter_tools/lib/src/base/flags.dart index a6b750faeb..429b03c827 100644 --- a/packages/flutter_tools/lib/src/base/flags.dart +++ b/packages/flutter_tools/lib/src/base/flags.dart @@ -44,7 +44,7 @@ class Flags { } /// `true` iff the given flag/option was either explicitly specified by the - /// user at the command-line or it was defined to have a default value. + /// user at the command-line or it was defined to have a default value. bool contains(String key) { final ArgResults commandResults = _globalResults.command; final Iterable options = commandResults?.options; diff --git a/packages/flutter_tools/lib/src/base/os.dart b/packages/flutter_tools/lib/src/base/os.dart index a1c7d8abc9..0d7bb12c2b 100644 --- a/packages/flutter_tools/lib/src/base/os.dart +++ b/packages/flutter_tools/lib/src/base/os.dart @@ -166,7 +166,7 @@ class _WindowsUtils extends OperatingSystemUtils { final List lines = result.stdout.trim().split('\n'); if (all) return lines.map((String path) => fs.file(path.trim())).toList(); - return [fs.file(lines.first.trim())]; + return [fs.file(lines.first.trim())]; } @override diff --git a/packages/flutter_tools/lib/src/base/utils.dart b/packages/flutter_tools/lib/src/base/utils.dart index 96b8b6175b..b5d096b768 100644 --- a/packages/flutter_tools/lib/src/base/utils.dart +++ b/packages/flutter_tools/lib/src/base/utils.dart @@ -115,7 +115,7 @@ String getElapsedAsMilliseconds(Duration duration) { /// absolute path. String getDisplayPath(String fullPath) { final String cwd = fs.currentDirectory.path + fs.path.separator; - return fullPath.startsWith(cwd) ? fullPath.substring(cwd.length) : fullPath; + return fullPath.startsWith(cwd) ? fullPath.substring(cwd.length) : fullPath; } /// A class to maintain a list of items, fire events when items are added or @@ -207,7 +207,7 @@ class Uuid { '${_bitsDigits(16, 4)}${_bitsDigits(16, 4)}-' '${_bitsDigits(16, 4)}-' '4${_bitsDigits(12, 3)}-' - '${_printDigits(special, 1)}${_bitsDigits(12, 3)}-' + '${_printDigits(special, 1)}${_bitsDigits(12, 3)}-' '${_bitsDigits(16, 4)}${_bitsDigits(16, 4)}${_bitsDigits(16, 4)}'; } diff --git a/packages/flutter_tools/lib/src/build_info.dart b/packages/flutter_tools/lib/src/build_info.dart index 8ed2b77fe6..08d0d5e91f 100644 --- a/packages/flutter_tools/lib/src/build_info.dart +++ b/packages/flutter_tools/lib/src/build_info.dart @@ -29,7 +29,7 @@ class BuildInfo { // Whether build should be done using Dart2 Frontend parser. final bool previewDart2; - + // Whether build should use strong mode semantics. final bool strongMode; diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart index 62083ac1fb..81299b6f8c 100644 --- a/packages/flutter_tools/lib/src/cache.dart +++ b/packages/flutter_tools/lib/src/cache.dart @@ -236,7 +236,7 @@ abstract class CachedArtifact { String get version => cache.getVersionFor(name); /// Keep track of the files we've downloaded for this execution so we - /// can delete them after completion. We don't delete them right after + /// can delete them after completion. We don't delete them right after /// extraction in case [update] is interrupted, so we can restart without /// starting from scratch. final List _downloadedFiles = []; diff --git a/packages/flutter_tools/lib/src/commands/build_aot.dart b/packages/flutter_tools/lib/src/commands/build_aot.dart index dd60d4da7d..59715d2461 100644 --- a/packages/flutter_tools/lib/src/commands/build_aot.dart +++ b/packages/flutter_tools/lib/src/commands/build_aot.dart @@ -306,8 +306,8 @@ Future _buildAotSnapshot( } if (platform == TargetPlatform.android_arm) { genSnapshotCmd.addAll([ - '--no-sim-use-hardfp', // Android uses the softfloat ABI. - '--no-use-integer-division', // Not supported by the Pixel in 32-bit mode. + '--no-sim-use-hardfp', // Android uses the softfloat ABI. + '--no-use-integer-division', // Not supported by the Pixel in 32-bit mode. ]); } break; @@ -449,9 +449,9 @@ Future _buildAotSnapshot( } else { if (compileToSharedLibrary) { // A word of warning: Instead of compiling via two steps, to a .o file and - // then to a .so file we use only one command. When using two commands + // then to a .so file we use only one command. When using two commands // gcc will end up putting a .eh_frame and a .debug_frame into the shared - // library. Without stripping .debug_frame afterwards, unwinding tools + // library. Without stripping .debug_frame afterwards, unwinding tools // based upon libunwind use just one and ignore the contents of the other // (which causes it to not look into the other section and therefore not // find the correct unwinding information). diff --git a/packages/flutter_tools/lib/src/commands/build_apk.dart b/packages/flutter_tools/lib/src/commands/build_apk.dart index 67d8a18b99..70ae24bb7b 100644 --- a/packages/flutter_tools/lib/src/commands/build_apk.dart +++ b/packages/flutter_tools/lib/src/commands/build_apk.dart @@ -15,8 +15,8 @@ class BuildApkCommand extends BuildSubCommand { usesPubOption(); argParser - ..addFlag('preview-dart-2', negatable: false, hide: !verboseHelp) - ..addFlag('strong', negatable: false, hide: !verboseHelp) + ..addFlag('preview-dart-2', negatable: false, hide: !verboseHelp) + ..addFlag('strong', negatable: false, hide: !verboseHelp) ..addFlag('prefer-shared-library', negatable: false, help: 'Whether to prefer compiling to a *.so file (android only).') ..addOption('target-platform', diff --git a/packages/flutter_tools/lib/src/commands/devices.dart b/packages/flutter_tools/lib/src/commands/devices.dart index 242aab9007..1c8ef4e47f 100644 --- a/packages/flutter_tools/lib/src/commands/devices.dart +++ b/packages/flutter_tools/lib/src/commands/devices.dart @@ -39,7 +39,7 @@ class DevicesCommand extends FlutterCommand { printStatus(''); for (String diagnostic in diagnostics) { printStatus('• ${diagnostic.replaceAll('\n', '\n ')}'); - } + } } } else { printStatus('${devices.length} connected ${pluralize('device', devices.length)}:\n'); diff --git a/packages/flutter_tools/lib/src/commands/ide_config.dart b/packages/flutter_tools/lib/src/commands/ide_config.dart index 1a7ee40f32..269674ebe0 100644 --- a/packages/flutter_tools/lib/src/commands/ide_config.dart +++ b/packages/flutter_tools/lib/src/commands/ide_config.dart @@ -96,7 +96,7 @@ class IdeConfigCommand extends FlutterCommand { return false; } - // Test byte by byte. We're assuming that these are small files. + // Test byte by byte. We're assuming that these are small files. final List srcBytes = src.readAsBytesSync(); final List destBytes = dest.readAsBytesSync(); for (int i = 0; i < srcBytes.length; ++i) { diff --git a/packages/flutter_tools/lib/src/commands/packages.dart b/packages/flutter_tools/lib/src/commands/packages.dart index 42302a77c7..44aafbc5ff 100644 --- a/packages/flutter_tools/lib/src/commands/packages.dart +++ b/packages/flutter_tools/lib/src/commands/packages.dart @@ -102,7 +102,7 @@ class PackagesTestCommand extends FlutterCommand { } @override - Future runCommand() => pub(['run', 'test']..addAll(argResults.rest), context: PubContext.runTest, retry: false); + Future runCommand() => pub(['run', 'test']..addAll(argResults.rest), context: PubContext.runTest, retry: false); } class PackagesPassthroughCommand extends FlutterCommand { diff --git a/packages/flutter_tools/lib/src/crash_reporting.dart b/packages/flutter_tools/lib/src/crash_reporting.dart index d2ab0b1aa3..21caa670ed 100644 --- a/packages/flutter_tools/lib/src/crash_reporting.dart +++ b/packages/flutter_tools/lib/src/crash_reporting.dart @@ -87,7 +87,7 @@ class CrashReportSender { req.fields['product'] = _kProductId; req.fields['version'] = flutterVersion; req.fields['osName'] = platform.operatingSystem; - req.fields['osVersion'] = os.name; // this actually includes version + req.fields['osVersion'] = os.name; // this actually includes version req.fields['type'] = _kDartTypeId; req.fields['error_runtime_type'] = '${error.runtimeType}'; diff --git a/packages/flutter_tools/lib/src/dart/sdk.dart b/packages/flutter_tools/lib/src/dart/sdk.dart index b0cd98492a..b1af8d937c 100644 --- a/packages/flutter_tools/lib/src/dart/sdk.dart +++ b/packages/flutter_tools/lib/src/dart/sdk.dart @@ -15,7 +15,7 @@ String get dartSdkPath { const List dartVmFlags = const []; /// Return the platform specific name for the given Dart SDK binary. So, `pub` -/// ==> `pub.bat`. The default SDK location can be overridden with a specified +/// ==> `pub.bat`. The default SDK location can be overridden with a specified /// [sdkLocation]. String sdkBinaryName(String name, { String sdkLocation }) { return fs.path.absolute(fs.path.join(sdkLocation ?? dartSdkPath, 'bin', platform.isWindows ? '$name.bat' : name)); diff --git a/packages/flutter_tools/lib/src/flutter_manifest.dart b/packages/flutter_tools/lib/src/flutter_manifest.dart index 81c5610434..03cd721abd 100644 --- a/packages/flutter_tools/lib/src/flutter_manifest.dart +++ b/packages/flutter_tools/lib/src/flutter_manifest.dart @@ -12,7 +12,7 @@ import 'base/file_system.dart'; import 'cache.dart'; import 'globals.dart'; -/// A wrapper around the `flutter` section in the `pubspec.yaml` file. +/// A wrapper around the `flutter` section in the `pubspec.yaml` file. class FlutterManifest { FlutterManifest._(); diff --git a/packages/flutter_tools/lib/src/run_hot.dart b/packages/flutter_tools/lib/src/run_hot.dart index 039f440063..82ea0837ac 100644 --- a/packages/flutter_tools/lib/src/run_hot.dart +++ b/packages/flutter_tools/lib/src/run_hot.dart @@ -452,7 +452,7 @@ class HotRunner extends ResidentRunner { } else { final bool reloadOnTopOfSnapshot = _runningFromSnapshot; final String progressPrefix = reloadOnTopOfSnapshot ? 'Initializing' : 'Performing'; - final Status status = logger.startProgress( + final Status status = logger.startProgress( '$progressPrefix hot reload...', progressId: 'hot.reload' ); diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart index 39075996f7..aafc20528f 100644 --- a/packages/flutter_tools/lib/src/runner/flutter_command.dart +++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart @@ -163,7 +163,7 @@ abstract class FlutterCommand extends Command { final bool previewDart2 = argParser.options.containsKey('preview-dart-2') ? argResults['preview-dart-2'] : false; - final bool strongMode = argParser.options.containsKey('strong') + final bool strongMode = argParser.options.containsKey('strong') ? argResults['strong'] : false; if (strongMode == true && previewDart2 == false) { @@ -404,7 +404,7 @@ abstract class FlutterCommand extends Command { final bool previewDart2 = argParser.options.containsKey('preview-dart-2') ? argResults['preview-dart-2'] : false; - final bool strongMode = argParser.options.containsKey('strong') + final bool strongMode = argParser.options.containsKey('strong') ? argResults['strong'] : false; if (strongMode == true && previewDart2 == false) { diff --git a/packages/flutter_tools/lib/src/version.dart b/packages/flutter_tools/lib/src/version.dart index 8f16dce851..7794ebc7af 100644 --- a/packages/flutter_tools/lib/src/version.dart +++ b/packages/flutter_tools/lib/src/version.dart @@ -162,7 +162,7 @@ class FlutterVersion { static Future _removeVersionCheckRemoteIfExists() async { final List remotes = (await _run(['git', 'remote'])) .split('\n') - .map((String name) => name.trim()) // to account for OS-specific line-breaks + .map((String name) => name.trim()) // to account for OS-specific line-breaks .toList(); if (remotes.contains(_kVersionCheckRemote)) await _run(['git', 'remote', 'remove', _kVersionCheckRemote]); diff --git a/packages/flutter_tools/lib/src/vmservice.dart b/packages/flutter_tools/lib/src/vmservice.dart index a5c45aac73..f258e9be26 100644 --- a/packages/flutter_tools/lib/src/vmservice.dart +++ b/packages/flutter_tools/lib/src/vmservice.dart @@ -547,7 +547,7 @@ abstract class ServiceObjectOwner extends ServiceObject { VMService get vmService => null; /// Builds a [ServiceObject] corresponding to the [id] from [map]. - /// The result may come from the cache. The result will not necessarily + /// The result may come from the cache. The result will not necessarily /// be [loaded]. ServiceObject getFromMap(Map map); } @@ -1171,7 +1171,7 @@ class Isolate extends ServiceObjectOwner { Future> flutterTogglePerformanceOverlayOverride() => _flutterToggle('showPerformanceOverlay'); - Future> flutterToggleWidgetInspector() => _flutterToggle('debugWidgetInspector'); + Future> flutterToggleWidgetInspector() => _flutterToggle('debugWidgetInspector'); Future flutterDebugAllowBanner(bool show) async { await invokeFlutterExtensionRpcRaw( diff --git a/packages/flutter_tools/test/asset_bundle_test.dart b/packages/flutter_tools/test/asset_bundle_test.dart index 64c8763497..1cc03b8b51 100644 --- a/packages/flutter_tools/test/asset_bundle_test.dart +++ b/packages/flutter_tools/test/asset_bundle_test.dart @@ -16,7 +16,7 @@ import 'package:test/test.dart'; import 'src/common.dart'; import 'src/context.dart'; -void main() { +void main() { setUpAll(() { Cache.flutterRoot = getFlutterRoot(); }); diff --git a/packages/flutter_tools/test/asset_bundle_variant_test.dart b/packages/flutter_tools/test/asset_bundle_variant_test.dart index 5aa28a5649..207e4455e6 100644 --- a/packages/flutter_tools/test/asset_bundle_variant_test.dart +++ b/packages/flutter_tools/test/asset_bundle_variant_test.dart @@ -15,7 +15,7 @@ import 'package:test/test.dart'; import 'src/common.dart'; import 'src/context.dart'; -void main() { +void main() { // These tests do not use a memory file system because we want to ensure that // asset bundles work correctly on Windows and Posix systems. Directory tempDir; diff --git a/packages/flutter_tools/test/asset_test.dart b/packages/flutter_tools/test/asset_test.dart index 204bce5d71..352541bbfb 100644 --- a/packages/flutter_tools/test/asset_test.dart +++ b/packages/flutter_tools/test/asset_test.dart @@ -11,7 +11,7 @@ import 'package:test/test.dart'; import 'src/common.dart'; import 'src/context.dart'; -void main() { +void main() { group('Assets', () { final String dataPath = fs.path.join( getFlutterRoot(), diff --git a/packages/flutter_tools/test/base/file_system_test.dart b/packages/flutter_tools/test/base/file_system_test.dart index f39c3253f0..144e4eb489 100644 --- a/packages/flutter_tools/test/base/file_system_test.dart +++ b/packages/flutter_tools/test/base/file_system_test.dart @@ -21,12 +21,12 @@ void main() { testUsingContext('recursively creates a directory if it does not exist', () async { ensureDirectoryExists('foo/bar/baz.flx'); expect(fs.isDirectorySync('foo/bar'), true); - }, overrides: { FileSystem: () => fs } ); + }, overrides: { FileSystem: () => fs }); testUsingContext('throws tool exit on failure to create', () async { fs.file('foo').createSync(); expect(() => ensureDirectoryExists('foo/bar.flx'), throwsToolExit()); - }, overrides: { FileSystem: () => fs } ); + }, overrides: { FileSystem: () => fs }); }); group('copyDirectorySync', () { diff --git a/packages/flutter_tools/test/cache_test.dart b/packages/flutter_tools/test/cache_test.dart index b8fe08ac5b..fb8fd5c8ec 100644 --- a/packages/flutter_tools/test/cache_test.dart +++ b/packages/flutter_tools/test/cache_test.dart @@ -82,7 +82,7 @@ void main() { expect(flattenNameSubdirs(Uri.parse('http://flutter.io/foo/bar')), 'flutter.io/foo/bar'); expect(flattenNameSubdirs(Uri.parse('http://docs.flutter.io/foo/bar')), 'docs.flutter.io/foo/bar'); expect(flattenNameSubdirs(Uri.parse('https://www.flutter.io')), 'www.flutter.io'); - }, overrides: { + }, overrides: { FileSystem: () => new MockFileSystem(), }); } diff --git a/packages/flutter_tools/test/commands/test_test.dart b/packages/flutter_tools/test/commands/test_test.dart index 3b6ef1c28b..c423eae784 100644 --- a/packages/flutter_tools/test/commands/test_test.dart +++ b/packages/flutter_tools/test/commands/test_test.dart @@ -26,7 +26,7 @@ void main() { testUsingContext('not have extraneous error messages', () async { Cache.flutterRoot = '../..'; return _testFile('trivial_widget', automatedTestsDirectory, flutterTestDirectory, exitCode: isZero); - }, skip: io.Platform.isLinux); // Flutter on Linux sometimes has problems with font resolution (#7224) + }, skip: io.Platform.isLinux); // Flutter on Linux sometimes has problems with font resolution (#7224) testUsingContext('report nice errors for exceptions thrown within testWidgets()', () async { Cache.flutterRoot = '../..'; diff --git a/packages/flutter_tools/test/dart_dependencies_test.dart b/packages/flutter_tools/test/dart_dependencies_test.dart index c8e84b9cbf..1158b55bb6 100644 --- a/packages/flutter_tools/test/dart_dependencies_test.dart +++ b/packages/flutter_tools/test/dart_dependencies_test.dart @@ -9,7 +9,7 @@ import 'package:test/test.dart'; import 'src/common.dart'; import 'src/context.dart'; -void main() { +void main() { group('DartDependencySetBuilder', () { final String dataPath = fs.path.join( getFlutterRoot(), diff --git a/packages/flutter_tools/test/dependency_checker_test.dart b/packages/flutter_tools/test/dependency_checker_test.dart index ecc76df87b..9fd72355ba 100644 --- a/packages/flutter_tools/test/dependency_checker_test.dart +++ b/packages/flutter_tools/test/dependency_checker_test.dart @@ -12,7 +12,7 @@ import 'package:test/test.dart'; import 'src/common.dart'; import 'src/context.dart'; -void main() { +void main() { group('DependencyChecker', () { final String dataPath = fs.path.join( getFlutterRoot(), @@ -96,7 +96,7 @@ void main() { final Directory destinationPath = fs.systemTempDirectory.createTempSync('dependency_checker_test_'); // Copy the golden input and let the test run in an isolated temporary in-memory file system. const LocalFileSystem localFileSystem = const LocalFileSystem(); - final Directory sourcePath = localFileSystem.directory(localFileSystem.path.join(dataPath, 'changed_sdk_location')); + final Directory sourcePath = localFileSystem.directory(localFileSystem.path.join(dataPath, 'changed_sdk_location')); copyDirectorySync(sourcePath, destinationPath); fs.currentDirectory = destinationPath; diff --git a/packages/flutter_tools/test/devfs_test.dart b/packages/flutter_tools/test/devfs_test.dart index 3e802b627d..a4b413eb2f 100644 --- a/packages/flutter_tools/test/devfs_test.dart +++ b/packages/flutter_tools/test/devfs_test.dart @@ -477,7 +477,7 @@ Future _createPackage(FileSystem fs, String pkgName, String pkgFileName, { if (doubleSlash) { // Force two separators into the path. final String doubleSlash = fs.path.separator + fs.path.separator; - pkgFilePath = pkgTempDir.path + doubleSlash + fs.path.join(pkgName, 'lib', pkgFileName); + pkgFilePath = pkgTempDir.path + doubleSlash + fs.path.join(pkgName, 'lib', pkgFileName); } final File pkgFile = fs.file(pkgFilePath); await pkgFile.parent.create(recursive: true); diff --git a/packages/flutter_tools/test/hot_test.dart b/packages/flutter_tools/test/hot_test.dart index 09e1692113..a09d1743ab 100644 --- a/packages/flutter_tools/test/hot_test.dart +++ b/packages/flutter_tools/test/hot_test.dart @@ -7,7 +7,7 @@ import 'package:test/test.dart'; import 'src/context.dart'; -void main() { +void main() { group('validateReloadReport', () { testUsingContext('invalid', () async { expect(HotRunner.validateReloadReport({}), false); diff --git a/packages/flutter_tools/test/ios/cocoapods_test.dart b/packages/flutter_tools/test/ios/cocoapods_test.dart index e010d1a021..531c8ab540 100644 --- a/packages/flutter_tools/test/ios/cocoapods_test.dart +++ b/packages/flutter_tools/test/ios/cocoapods_test.dart @@ -256,8 +256,8 @@ class TestCocoaPods extends CocoaPods { } final ProcessResult exitsHappy = new ProcessResult( - 1, // pid - 0, // exitCode - '', // stdout - '', // stderr + 1, // pid + 0, // exitCode + '', // stdout + '', // stderr ); \ No newline at end of file diff --git a/packages/flutter_tools/test/ios/code_signing_test.dart b/packages/flutter_tools/test/ios/code_signing_test.dart index 3e701cc683..03dbea5a80 100644 --- a/packages/flutter_tools/test/ios/code_signing_test.dart +++ b/packages/flutter_tools/test/ios/code_signing_test.dart @@ -96,8 +96,8 @@ void main() { when(mockProcessManager.runSync( argThat(contains('find-identity')), environment: any, workingDirectory: any, )).thenReturn(new ProcessResult( - 1, // pid - 0, // exitCode + 1, // pid + 0, // exitCode ''' 1) 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 "iPhone Developer: Profile 1 (1111AAAA11)" 1 valid identities found''', @@ -108,8 +108,8 @@ void main() { environment: any, workingDirectory: any, )).thenReturn(new ProcessResult( - 1, // pid - 0, // exitCode + 1, // pid + 0, // exitCode 'This is a mock certificate', '', )); @@ -151,8 +151,8 @@ void main() { when(mockProcessManager.runSync( argThat(contains('find-identity')), environment: any, workingDirectory: any, )).thenReturn(new ProcessResult( - 1, // pid - 0, // exitCode + 1, // pid + 0, // exitCode ''' 1) 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 "iPhone Developer: Profile 1 (1111AAAA11)" 2) da4b9237bacccdf19c0760cab7aec4a8359010b0 "iPhone Developer: Profile 2 (2222BBBB22)" @@ -167,8 +167,8 @@ void main() { environment: any, workingDirectory: any, )).thenReturn(new ProcessResult( - 1, // pid - 0, // exitCode + 1, // pid + 0, // exitCode 'This is a mock certificate', '', )); @@ -221,8 +221,8 @@ void main() { when(mockProcessManager.runSync( argThat(contains('find-identity')), environment: any, workingDirectory: any, )).thenReturn(new ProcessResult( - 1, // pid - 0, // exitCode + 1, // pid + 0, // exitCode ''' 1) 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 "iPhone Developer: Profile 1 (1111AAAA11)" 2) da4b9237bacccdf19c0760cab7aec4a8359010b0 "iPhone Developer: Profile 2 (2222BBBB22)" @@ -237,8 +237,8 @@ void main() { environment: any, workingDirectory: any, )).thenReturn(new ProcessResult( - 1, // pid - 0, // exitCode + 1, // pid + 0, // exitCode 'This is a mock certificate', '', )); @@ -285,8 +285,8 @@ void main() { when(mockProcessManager.runSync( argThat(contains('find-identity')), environment: any, workingDirectory: any, )).thenReturn(new ProcessResult( - 1, // pid - 0, // exitCode + 1, // pid + 0, // exitCode ''' 1) 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 "iPhone Developer: Profile 1 (1111AAAA11)" 2) da4b9237bacccdf19c0760cab7aec4a8359010b0 "iPhone Developer: Profile 2 (2222BBBB22)" @@ -299,8 +299,8 @@ void main() { environment: any, workingDirectory: any, )).thenReturn(new ProcessResult( - 1, // pid - 0, // exitCode + 1, // pid + 0, // exitCode 'This is a mock certificate', '', )); @@ -351,8 +351,8 @@ void main() { when(mockProcessManager.runSync( argThat(contains('find-identity')), environment: any, workingDirectory: any, )).thenReturn(new ProcessResult( - 1, // pid - 0, // exitCode + 1, // pid + 0, // exitCode ''' 1) 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 "iPhone Developer: Profile 1 (1111AAAA11)" 2) da4b9237bacccdf19c0760cab7aec4a8359010b0 "iPhone Developer: Profile 2 (2222BBBB22)" @@ -367,8 +367,8 @@ void main() { environment: any, workingDirectory: any, )).thenReturn(new ProcessResult( - 1, // pid - 0, // exitCode + 1, // pid + 0, // exitCode 'This is a mock certificate', '', )); @@ -415,17 +415,17 @@ void main() { } final ProcessResult exitsHappy = new ProcessResult( - 1, // pid - 0, // exitCode - '', // stdout - '', // stderr + 1, // pid + 0, // exitCode + '', // stdout + '', // stderr ); final ProcessResult exitsFail = new ProcessResult( - 2, // pid - 1, // exitCode - '', // stdout - '', // stderr + 2, // pid + 1, // exitCode + '', // stdout + '', // stderr ); class MockProcessManager extends Mock implements ProcessManager {} diff --git a/packages/flutter_tools/test/ios/ios_workflow_test.dart b/packages/flutter_tools/test/ios/ios_workflow_test.dart index deafa8c49b..1b222f3534 100644 --- a/packages/flutter_tools/test/ios/ios_workflow_test.dart +++ b/packages/flutter_tools/test/ios/ios_workflow_test.dart @@ -289,10 +289,10 @@ void main() { } final ProcessResult exitsHappy = new ProcessResult( - 1, // pid - 0, // exitCode - '', // stdout - '', // stderr + 1, // pid + 0, // exitCode + '', // stdout + '', // stderr ); class MockIMobileDevice extends IMobileDevice { diff --git a/packages/flutter_tools/test/ios/mac_test.dart b/packages/flutter_tools/test/ios/mac_test.dart index 7b59f5eb76..987c737cc9 100644 --- a/packages/flutter_tools/test/ios/mac_test.dart +++ b/packages/flutter_tools/test/ios/mac_test.dart @@ -81,7 +81,7 @@ void main() { testUsingContext('idevicescreenshot captures and returns screenshot', () async { when(mockOutputFile.path).thenReturn(outputPath); - when(mockProcessManager.run(any, environment: null, workingDirectory: null)).thenAnswer( + when(mockProcessManager.run(any, environment: null, workingDirectory: null)).thenAnswer( (Invocation invocation) => new Future.value(new ProcessResult(4, 0, '', ''))); await iMobileDevice.takeScreenshot(mockOutputFile); diff --git a/packages/flutter_tools/test/ios/simulators_test.dart b/packages/flutter_tools/test/ios/simulators_test.dart index 23fab79c2c..53deb2e8cc 100644 --- a/packages/flutter_tools/test/ios/simulators_test.dart +++ b/packages/flutter_tools/test/ios/simulators_test.dart @@ -154,7 +154,7 @@ void main() { mockProcessManager = new MockProcessManager(); // Let everything else return exit code 0 so process.dart doesn't crash. when( - mockProcessManager.run(any, environment: null, workingDirectory: null) + mockProcessManager.run(any, environment: null, workingDirectory: null) ).thenAnswer((Invocation invocation) => new Future.value(new ProcessResult(2, 0, '', '')) ); diff --git a/packages/flutter_tools/test/replay/common.dart b/packages/flutter_tools/test/replay/common.dart index 246765292c..2463d0a1fe 100644 --- a/packages/flutter_tools/test/replay/common.dart +++ b/packages/flutter_tools/test/replay/common.dart @@ -53,7 +53,7 @@ void testReplay( /// be running in a test via [testReplay]. /// /// [command] should be the list of arguments that are passed to the `flutter` -/// command-line tool. For example: +/// command-line tool. For example: /// /// ``` /// [ diff --git a/packages/flutter_tools/test/runner/flutter_command_runner_test.dart b/packages/flutter_tools/test/runner/flutter_command_runner_test.dart index 1d76923574..c4e156f024 100644 --- a/packages/flutter_tools/test/runner/flutter_command_runner_test.dart +++ b/packages/flutter_tools/test/runner/flutter_command_runner_test.dart @@ -55,5 +55,5 @@ void main() { fs.directory(fs.path.join(root, 'dev', 'tools', 'aatool')).path, fs.directory(fs.path.join(root, 'dev', 'tools')).path, ]); - }, overrides: { FileSystem: () => fs } ); + }, overrides: { FileSystem: () => fs }); }