From 15a7eb3b6c5c8879c2fbd6714ce2cf7b599a02ea Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Sat, 21 Jan 2017 20:58:44 -0800 Subject: [PATCH] Move to real generic method syntax (#7235) --- dev/devicelab/lib/framework/utils.dart | 7 ++-- dev/manual_tests/card_collection.dart | 2 +- .../lib/demo/data_table_demo.dart | 26 ++++++------ .../flutter_gallery/lib/demo/dialog_demo.dart | 12 +++--- .../lib/demo/modal_bottom_sheet_demo.dart | 2 +- .../demo/persistent_bottom_sheet_demo.dart | 2 +- .../lib/demo/shrine/shrine_page.dart | 2 +- .../lib/demo/text_field_demo.dart | 2 +- examples/stocks/lib/stock_home.dart | 2 +- .../lib/src/foundation/basic_types.dart | 8 ++-- .../src/foundation/synchronous_future.dart | 6 +-- packages/flutter/lib/src/gestures/drag.dart | 14 +++---- .../flutter/lib/src/gestures/long_press.dart | 2 +- .../flutter/lib/src/gestures/multidrag.dart | 2 +- .../flutter/lib/src/gestures/multitap.dart | 12 +++--- .../flutter/lib/src/gestures/recognizer.dart | 4 +- packages/flutter/lib/src/gestures/scale.dart | 8 ++-- packages/flutter/lib/src/gestures/tap.dart | 10 ++--- packages/flutter/lib/src/http/http.dart | 2 +- packages/flutter/lib/src/http/io_client.dart | 2 +- packages/flutter/lib/src/http/utils.dart | 2 +- packages/flutter/lib/src/material/about.dart | 2 +- packages/flutter/lib/src/material/arc.dart | 8 ++-- .../lib/src/material/bottom_sheet.dart | 4 +- .../flutter/lib/src/material/button_bar.dart | 2 +- packages/flutter/lib/src/material/dialog.dart | 4 +- .../src/material/paginated_data_table.dart | 8 ++-- .../flutter/lib/src/material/popup_menu.dart | 10 ++--- .../flutter/lib/src/material/scaffold.dart | 6 +-- packages/flutter/lib/src/rendering/grid.dart | 2 +- packages/flutter/lib/src/rendering/list.dart | 2 +- .../flutter/lib/src/rendering/object.dart | 4 +- .../flutter/lib/src/widgets/drag_target.dart | 6 +-- .../lib/src/widgets/gesture_detector.dart | 2 +- packages/flutter/lib/src/widgets/table.dart | 4 +- .../flutter/test/material/scaffold_test.dart | 8 ++-- .../flutter/test/material/will_pop_test.dart | 2 +- .../widgets/bottom_sheet_rebuild_test.dart | 2 +- .../test/widgets/bottom_sheet_test.dart | 4 +- .../test/widgets/build_scope_test.dart | 4 +- .../test/widgets/image_resolution_test.dart | 4 +- .../layout_builder_and_parent_data_test.dart | 2 +- .../test/widgets/page_transitions_test.dart | 2 +- .../remember_scroll_position_test.dart | 2 +- ...parent_state_with_layout_builder_test.dart | 2 +- .../test/widgets/scroll_interaction_test.dart | 2 +- .../test/widgets/scrollable_dispose_test.dart | 2 +- .../flutter/test/widgets/slivers_test.dart | 8 ++-- .../state_setting_in_scrollables_test.dart | 4 +- .../flutter/test/widgets/test_widgets.dart | 2 +- .../test/widgets/ticker_provider_test.dart | 4 +- packages/flutter_driver/lib/src/driver.dart | 6 +-- .../lib/src/timeline_summary.dart | 4 +- packages/flutter_test/lib/src/controller.dart | 42 +++++++++---------- .../flutter_test/lib/src/widget_tester.dart | 2 +- packages/flutter_tools/lib/executable.dart | 2 +- .../lib/src/base/process_manager.dart | 2 +- .../src/commands/analyze_continuously.dart | 2 +- .../lib/src/commands/analyze_once.dart | 2 +- .../src/runner/flutter_command_runner.dart | 2 +- 60 files changed, 154 insertions(+), 157 deletions(-) diff --git a/dev/devicelab/lib/framework/utils.dart b/dev/devicelab/lib/framework/utils.dart index 6e8de75b0e3..90683532377 100644 --- a/dev/devicelab/lib/framework/utils.dart +++ b/dev/devicelab/lib/framework/utils.dart @@ -278,12 +278,11 @@ String requireEnvVar(String name) { return value; } -dynamic/*=T*/ requireConfigProperty/**/( - Map*/ > map, String propertyName) { +T requireConfigProperty(Map map, String propertyName) { if (!map.containsKey(propertyName)) fail('Configuration property not found: $propertyName'); - - return map[propertyName]; + T result = map[propertyName]; + return result; } String jsonEncode(dynamic data) { diff --git a/dev/manual_tests/card_collection.dart b/dev/manual_tests/card_collection.dart index 722c9c8eab6..e02e96da759 100644 --- a/dev/manual_tests/card_collection.dart +++ b/dev/manual_tests/card_collection.dart @@ -411,7 +411,7 @@ class CardCollectionState extends State { cardCollection = new ScrollableList( snapOffsetCallback: _snapToCenter ? _toSnapOffset : null, itemExtent: kFixedCardHeight, - children: _cardIndices.map/**/((int index) => _buildCard(context, index)) + children: _cardIndices.map((int index) => _buildCard(context, index)) ); } else { cardCollection = new LazyBlock( diff --git a/examples/flutter_gallery/lib/demo/data_table_demo.dart b/examples/flutter_gallery/lib/demo/data_table_demo.dart index 598b2c7e789..7a007db50d1 100644 --- a/examples/flutter_gallery/lib/demo/data_table_demo.dart +++ b/examples/flutter_gallery/lib/demo/data_table_demo.dart @@ -77,15 +77,15 @@ class DesertDataSource extends DataTableSource { new Desert('Coconut slice and KitKat', 677, 41.0, 72, 8.5, 63, 12, 12), ]; - void _sort/**/(Comparable getField(Desert d), bool ascending) { + void _sort(Comparable getField(Desert d), bool ascending) { _deserts.sort((Desert a, Desert b) { if (!ascending) { final Desert c = a; a = b; b = c; } - final Comparable aValue = getField(a); - final Comparable bValue = getField(b); + final Comparable aValue = getField(a); + final Comparable bValue = getField(b); return Comparable.compare(aValue, bValue); }); notifyListeners(); @@ -153,8 +153,8 @@ class _DataTableDemoState extends State { bool _sortAscending = true; DesertDataSource _desertsDataSource = new DesertDataSource(); - void _sort/**/(Comparable getField(Desert d), int columnIndex, bool ascending) { - _desertsDataSource._sort/**/(getField, ascending); + void _sort(Comparable getField(Desert d), int columnIndex, bool ascending) { + _desertsDataSource._sort(getField, ascending); setState(() { _sortColumnIndex = columnIndex; _sortAscending = ascending; @@ -178,44 +178,44 @@ class _DataTableDemoState extends State { columns: [ new DataColumn( label: new Text('Dessert (100g serving)'), - onSort: (int columnIndex, bool ascending) => _sort/**/((Desert d) => d.name, columnIndex, ascending) + onSort: (int columnIndex, bool ascending) => _sort((Desert d) => d.name, columnIndex, ascending) ), new DataColumn( label: new Text('Calories'), tooltip: 'The total amount of food energy in the given serving size.', numeric: true, - onSort: (int columnIndex, bool ascending) => _sort/**/((Desert d) => d.calories, columnIndex, ascending) + onSort: (int columnIndex, bool ascending) => _sort((Desert d) => d.calories, columnIndex, ascending) ), new DataColumn( label: new Text('Fat (g)'), numeric: true, - onSort: (int columnIndex, bool ascending) => _sort/**/((Desert d) => d.fat, columnIndex, ascending) + onSort: (int columnIndex, bool ascending) => _sort((Desert d) => d.fat, columnIndex, ascending) ), new DataColumn( label: new Text('Carbs (g)'), numeric: true, - onSort: (int columnIndex, bool ascending) => _sort/**/((Desert d) => d.carbs, columnIndex, ascending) + onSort: (int columnIndex, bool ascending) => _sort((Desert d) => d.carbs, columnIndex, ascending) ), new DataColumn( label: new Text('Protein (g)'), numeric: true, - onSort: (int columnIndex, bool ascending) => _sort/**/((Desert d) => d.protein, columnIndex, ascending) + onSort: (int columnIndex, bool ascending) => _sort((Desert d) => d.protein, columnIndex, ascending) ), new DataColumn( label: new Text('Sodium (mg)'), numeric: true, - onSort: (int columnIndex, bool ascending) => _sort/**/((Desert d) => d.sodium, columnIndex, ascending) + onSort: (int columnIndex, bool ascending) => _sort((Desert d) => d.sodium, columnIndex, ascending) ), new DataColumn( label: new Text('Calcium (%)'), tooltip: 'The amount of calcium as a percentage of the recommended daily amount.', numeric: true, - onSort: (int columnIndex, bool ascending) => _sort/**/((Desert d) => d.calcium, columnIndex, ascending) + onSort: (int columnIndex, bool ascending) => _sort((Desert d) => d.calcium, columnIndex, ascending) ), new DataColumn( label: new Text('Iron (%)'), numeric: true, - onSort: (int columnIndex, bool ascending) => _sort/**/((Desert d) => d.iron, columnIndex, ascending) + onSort: (int columnIndex, bool ascending) => _sort((Desert d) => d.iron, columnIndex, ascending) ), ], source: _desertsDataSource diff --git a/examples/flutter_gallery/lib/demo/dialog_demo.dart b/examples/flutter_gallery/lib/demo/dialog_demo.dart index 3548ad9b938..650a2986ee5 100644 --- a/examples/flutter_gallery/lib/demo/dialog_demo.dart +++ b/examples/flutter_gallery/lib/demo/dialog_demo.dart @@ -65,12 +65,12 @@ class DialogDemoState extends State { _selectedTime = new TimeOfDay(hour: now.hour, minute: now.minute); } - void showDemoDialog/**/({ BuildContext context, Widget child }) { - showDialog/**/( + void showDemoDialog({ BuildContext context, Widget child }) { + showDialog( context: context, child: child ) - .then((dynamic/*=T*/ value) { // The value passed to Navigator.pop() or null. + .then((T value) { // The value passed to Navigator.pop() or null. if (value != null) { _scaffoldKey.currentState.showSnackBar(new SnackBar( content: new Text('You selected: $value') @@ -95,7 +95,7 @@ class DialogDemoState extends State { new RaisedButton( child: new Text('ALERT'), onPressed: () { - showDemoDialog/**/( + showDemoDialog( context: context, child: new AlertDialog( content: new Text( @@ -119,7 +119,7 @@ class DialogDemoState extends State { new RaisedButton( child: new Text('ALERT WITH TITLE'), onPressed: () { - showDemoDialog/**/( + showDemoDialog( context: context, child: new AlertDialog( title: new Text('Use Google\'s location service?'), @@ -144,7 +144,7 @@ class DialogDemoState extends State { new RaisedButton( child: new Text('SIMPLE'), onPressed: () { - showDemoDialog/**/( + showDemoDialog( context: context, child: new SimpleDialog( title: new Text('Set backup account'), diff --git a/examples/flutter_gallery/lib/demo/modal_bottom_sheet_demo.dart b/examples/flutter_gallery/lib/demo/modal_bottom_sheet_demo.dart index d41022f844f..24650f18caf 100644 --- a/examples/flutter_gallery/lib/demo/modal_bottom_sheet_demo.dart +++ b/examples/flutter_gallery/lib/demo/modal_bottom_sheet_demo.dart @@ -15,7 +15,7 @@ class ModalBottomSheetDemo extends StatelessWidget { child: new RaisedButton( child: new Text('SHOW BOTTOM SHEET'), onPressed: () { - showModalBottomSheet/**/(context: context, builder: (BuildContext context) { + showModalBottomSheet(context: context, builder: (BuildContext context) { return new Container( child: new Padding( padding: const EdgeInsets.all(32.0), diff --git a/examples/flutter_gallery/lib/demo/persistent_bottom_sheet_demo.dart b/examples/flutter_gallery/lib/demo/persistent_bottom_sheet_demo.dart index 92b460d6ea5..fc8c2d00142 100644 --- a/examples/flutter_gallery/lib/demo/persistent_bottom_sheet_demo.dart +++ b/examples/flutter_gallery/lib/demo/persistent_bottom_sheet_demo.dart @@ -27,7 +27,7 @@ class _PersistentBottomSheetDemoState extends State { setState(() { // disable the button _showBottomSheetCallback = null; }); - _scaffoldKey.currentState.showBottomSheet/**/((BuildContext context) { + _scaffoldKey.currentState.showBottomSheet((BuildContext context) { final ThemeData themeData = Theme.of(context); return new Container( decoration: new BoxDecoration( diff --git a/examples/flutter_gallery/lib/demo/shrine/shrine_page.dart b/examples/flutter_gallery/lib/demo/shrine/shrine_page.dart index 8f2dc7c5904..c134e7c76df 100644 --- a/examples/flutter_gallery/lib/demo/shrine/shrine_page.dart +++ b/examples/flutter_gallery/lib/demo/shrine/shrine_page.dart @@ -51,7 +51,7 @@ class ShrinePageState extends State { } void _showShoppingCart() { - showModalBottomSheet/**/(context: context, builder: (BuildContext context) { + showModalBottomSheet(context: context, builder: (BuildContext context) { if (config.shoppingCart.isEmpty) { return new Padding( padding: const EdgeInsets.all(24.0), diff --git a/examples/flutter_gallery/lib/demo/text_field_demo.dart b/examples/flutter_gallery/lib/demo/text_field_demo.dart index 87316446536..ea3eb87071d 100644 --- a/examples/flutter_gallery/lib/demo/text_field_demo.dart +++ b/examples/flutter_gallery/lib/demo/text_field_demo.dart @@ -80,7 +80,7 @@ class TextFieldDemoState extends State { if (!_formWasEdited || form.validate()) return new Future.value(true); - return showDialog/**/( + return showDialog( context: context, child: new AlertDialog( title: new Text('This form has errors'), diff --git a/examples/stocks/lib/stock_home.dart b/examples/stocks/lib/stock_home.dart index e138b6eaba1..22d1f7cd0dc 100644 --- a/examples/stocks/lib/stock_home.dart +++ b/examples/stocks/lib/stock_home.dart @@ -300,7 +300,7 @@ class StockHomeState extends State { } void _handleCreateCompany() { - showModalBottomSheet/**/( + showModalBottomSheet( context: context, builder: (BuildContext context) => new _CreateCompanySheet() ); diff --git a/packages/flutter/lib/src/foundation/basic_types.dart b/packages/flutter/lib/src/foundation/basic_types.dart index 1884faabc8c..997caa91271 100644 --- a/packages/flutter/lib/src/foundation/basic_types.dart +++ b/packages/flutter/lib/src/foundation/basic_types.dart @@ -161,8 +161,8 @@ class CachingIterable extends IterableBase { } @override - Iterable map/**/(/*=T*/ f(E e)) { - return new CachingIterable(super.map/**/(f).iterator); + Iterable map(T f(E e)) { + return new CachingIterable(super.map(f).iterator); } @override @@ -171,8 +171,8 @@ class CachingIterable extends IterableBase { } @override - Iterable expand/**/(Iterable/**/ f(E element)) { - return new CachingIterable(super.expand/**/(f).iterator); + Iterable expand(Iterable f(E element)) { + return new CachingIterable(super.expand(f).iterator); } @override diff --git a/packages/flutter/lib/src/foundation/synchronous_future.dart b/packages/flutter/lib/src/foundation/synchronous_future.dart index bb589a8148a..2cd61c8c356 100644 --- a/packages/flutter/lib/src/foundation/synchronous_future.dart +++ b/packages/flutter/lib/src/foundation/synchronous_future.dart @@ -34,11 +34,11 @@ class SynchronousFuture implements Future { Future catchError(Function onError, { bool test(dynamic error) }) => new Completer().future; @override - Future then/**/(dynamic f(T value), { Function onError }) { + Future then(dynamic f(T value), { Function onError }) { dynamic result = f(_value); - if (result is Future) + if (result is Future) return result; - return new SynchronousFuture(result); + return new SynchronousFuture(result); } @override diff --git a/packages/flutter/lib/src/gestures/drag.dart b/packages/flutter/lib/src/gestures/drag.dart index 1d5e4c4ecd0..7431e557506 100644 --- a/packages/flutter/lib/src/gestures/drag.dart +++ b/packages/flutter/lib/src/gestures/drag.dart @@ -275,7 +275,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { _initialPosition = event.position; _pendingDragOffset = Offset.zero; if (onDown != null) - invokeCallback/**/('onDown', () => onDown(new DragDownDetails(globalPosition: _initialPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onDown', () => onDown(new DragDownDetails(globalPosition: _initialPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } } @@ -289,7 +289,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { Offset delta = event.delta; if (_state == _DragState.accepted) { if (onUpdate != null) { - invokeCallback/**/('onUpdate', () => onUpdate(new DragUpdateDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onUpdate', () => onUpdate(new DragUpdateDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 delta: _getDeltaForDetails(delta), primaryDelta: _getPrimaryValueFromOffset(delta), globalPosition: event.position, @@ -311,12 +311,12 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { Offset delta = _pendingDragOffset; _pendingDragOffset = Offset.zero; if (onStart != null) { - invokeCallback/**/('onStart', () => onStart(new DragStartDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onStart', () => onStart(new DragStartDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 globalPosition: _initialPosition, ))); } if (delta != Offset.zero && onUpdate != null) { - invokeCallback/**/('onUpdate', () => onUpdate(new DragUpdateDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onUpdate', () => onUpdate(new DragUpdateDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 delta: _getDeltaForDetails(delta), primaryDelta: _getPrimaryValueFromOffset(delta), globalPosition: _initialPosition, @@ -336,7 +336,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { resolve(GestureDisposition.rejected); _state = _DragState.ready; if (onCancel != null) - invokeCallback/**/('onCancel', onCancel); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onCancel', onCancel); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 return; } bool wasAccepted = (_state == _DragState.accepted); @@ -350,12 +350,12 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { final Offset pixelsPerSecond = velocity.pixelsPerSecond; if (pixelsPerSecond.distanceSquared > kMaxFlingVelocity * kMaxFlingVelocity) velocity = new Velocity(pixelsPerSecond: (pixelsPerSecond / pixelsPerSecond.distance) * kMaxFlingVelocity); - invokeCallback/**/('onEnd', () => onEnd(new DragEndDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onEnd', () => onEnd(new DragEndDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 velocity: velocity, primaryVelocity: _getPrimaryValueFromOffset(velocity.pixelsPerSecond), ))); } else { - invokeCallback/**/('onEnd', () => onEnd(new DragEndDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onEnd', () => onEnd(new DragEndDetails( // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 velocity: Velocity.zero, primaryVelocity: 0.0, ))); diff --git a/packages/flutter/lib/src/gestures/long_press.dart b/packages/flutter/lib/src/gestures/long_press.dart index 7f3640c29e2..a754774fe37 100644 --- a/packages/flutter/lib/src/gestures/long_press.dart +++ b/packages/flutter/lib/src/gestures/long_press.dart @@ -26,7 +26,7 @@ class LongPressGestureRecognizer extends PrimaryPointerGestureRecognizer { void didExceedDeadline() { resolve(GestureDisposition.accepted); if (onLongPress != null) - invokeCallback/**/('onLongPress', onLongPress); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onLongPress', onLongPress); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } @override diff --git a/packages/flutter/lib/src/gestures/multidrag.dart b/packages/flutter/lib/src/gestures/multidrag.dart index 439386cf622..19cc0596b9a 100644 --- a/packages/flutter/lib/src/gestures/multidrag.dart +++ b/packages/flutter/lib/src/gestures/multidrag.dart @@ -261,7 +261,7 @@ abstract class MultiDragGestureRecognizer exten assert(state._pendingDelta != null); Drag drag; if (onStart != null) - drag = invokeCallback/**/('onStart', () => onStart(initialPosition)); + drag = invokeCallback('onStart', () => onStart(initialPosition)); if (drag != null) { state._startDrag(drag); } else { diff --git a/packages/flutter/lib/src/gestures/multitap.dart b/packages/flutter/lib/src/gestures/multitap.dart index 43260e37521..c147bd90846 100644 --- a/packages/flutter/lib/src/gestures/multitap.dart +++ b/packages/flutter/lib/src/gestures/multitap.dart @@ -191,7 +191,7 @@ class DoubleTapGestureRecognizer extends GestureRecognizer { _freezeTracker(tracker); _trackers.remove(tracker.pointer); if (onDoubleTap != null) - invokeCallback/**/('onDoubleTap', onDoubleTap); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onDoubleTap', onDoubleTap); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 _reset(); } @@ -352,7 +352,7 @@ class MultiTapGestureRecognizer extends GestureRecognizer { longTapDelay: longTapDelay ); if (onTapDown != null) - invokeCallback/**/('onTapDown', () => onTapDown(event.pointer, new TapDownDetails(globalPosition: event.position))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onTapDown', () => onTapDown(event.pointer, new TapDownDetails(globalPosition: event.position))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } @override @@ -372,22 +372,22 @@ class MultiTapGestureRecognizer extends GestureRecognizer { assert(_gestureMap.containsKey(pointer)); _gestureMap.remove(pointer); if (onTapCancel != null) - invokeCallback/**/('onTapCancel', () => onTapCancel(pointer)); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onTapCancel', () => onTapCancel(pointer)); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } void _dispatchTap(int pointer, Point globalPosition) { assert(_gestureMap.containsKey(pointer)); _gestureMap.remove(pointer); if (onTapUp != null) - invokeCallback/**/('onTapUp', () => onTapUp(pointer, new TapUpDetails(globalPosition: globalPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onTapUp', () => onTapUp(pointer, new TapUpDetails(globalPosition: globalPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 if (onTap != null) - invokeCallback/**/('onTap', () => onTap(pointer)); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onTap', () => onTap(pointer)); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } void _dispatchLongTap(int pointer, Point lastPosition) { assert(_gestureMap.containsKey(pointer)); if (onLongTapDown != null) - invokeCallback/**/('onLongTapDown', () => onLongTapDown(pointer, new TapDownDetails(globalPosition: lastPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onLongTapDown', () => onLongTapDown(pointer, new TapDownDetails(globalPosition: lastPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } @override diff --git a/packages/flutter/lib/src/gestures/recognizer.dart b/packages/flutter/lib/src/gestures/recognizer.dart index 9996e6b1de0..f3b76465de0 100644 --- a/packages/flutter/lib/src/gestures/recognizer.dart +++ b/packages/flutter/lib/src/gestures/recognizer.dart @@ -59,8 +59,8 @@ abstract class GestureRecognizer extends GestureArenaMember { /// Invoke a callback provided by the application, catching and logging any /// exceptions. @protected - dynamic/*=T*/ invokeCallback/**/(String name, RecognizerCallback callback) { - dynamic/*=T*/ result; + T invokeCallback(String name, RecognizerCallback callback) { + T result; try { result = callback(); } catch (exception, stack) { diff --git a/packages/flutter/lib/src/gestures/scale.dart b/packages/flutter/lib/src/gestures/scale.dart index 7464c108640..623978e2dbb 100644 --- a/packages/flutter/lib/src/gestures/scale.dart +++ b/packages/flutter/lib/src/gestures/scale.dart @@ -180,9 +180,9 @@ class ScaleGestureRecognizer extends OneSequenceGestureRecognizer { final Offset pixelsPerSecond = velocity.pixelsPerSecond; if (pixelsPerSecond.distanceSquared > kMaxFlingVelocity * kMaxFlingVelocity) velocity = new Velocity(pixelsPerSecond: (pixelsPerSecond / pixelsPerSecond.distance) * kMaxFlingVelocity); - invokeCallback/**/('onEnd', () => onEnd(new ScaleEndDetails(velocity: velocity))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onEnd', () => onEnd(new ScaleEndDetails(velocity: velocity))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } else { - invokeCallback/**/('onEnd', () => onEnd(new ScaleEndDetails(velocity: Velocity.zero))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onEnd', () => onEnd(new ScaleEndDetails(velocity: Velocity.zero))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } } _state = ScaleState.accepted; @@ -200,11 +200,11 @@ class ScaleGestureRecognizer extends OneSequenceGestureRecognizer { if (_state == ScaleState.accepted && !configChanged) { _state = ScaleState.started; if (onStart != null) - invokeCallback/**/('onStart', () => onStart(new ScaleStartDetails(focalPoint: focalPoint))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onStart', () => onStart(new ScaleStartDetails(focalPoint: focalPoint))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } if (_state == ScaleState.started && onUpdate != null) - invokeCallback/**/('onUpdate', () => onUpdate(new ScaleUpdateDetails(scale: _scaleFactor, focalPoint: focalPoint))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onUpdate', () => onUpdate(new ScaleUpdateDetails(scale: _scaleFactor, focalPoint: focalPoint))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 } @override diff --git a/packages/flutter/lib/src/gestures/tap.dart b/packages/flutter/lib/src/gestures/tap.dart index a1b67081907..b584cd0905d 100644 --- a/packages/flutter/lib/src/gestures/tap.dart +++ b/packages/flutter/lib/src/gestures/tap.dart @@ -99,7 +99,7 @@ class TapGestureRecognizer extends PrimaryPointerGestureRecognizer { void resolve(GestureDisposition disposition) { if (_wonArenaForPrimaryPointer && disposition == GestureDisposition.rejected) { if (onTapCancel != null) - invokeCallback/**/('onTapCancel', onTapCancel); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onTapCancel', onTapCancel); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 _reset(); } super.resolve(disposition); @@ -126,7 +126,7 @@ class TapGestureRecognizer extends PrimaryPointerGestureRecognizer { if (pointer == primaryPointer) { assert(state == GestureRecognizerState.defunct); if (onTapCancel != null) - invokeCallback/**/('onTapCancel', onTapCancel); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onTapCancel', onTapCancel); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 _reset(); } } @@ -134,7 +134,7 @@ class TapGestureRecognizer extends PrimaryPointerGestureRecognizer { void _checkDown() { if (!_sentTapDown) { if (onTapDown != null) - invokeCallback/**/('onTapDown', () => onTapDown(new TapDownDetails(globalPosition: initialPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onTapDown', () => onTapDown(new TapDownDetails(globalPosition: initialPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 _sentTapDown = true; } } @@ -143,9 +143,9 @@ class TapGestureRecognizer extends PrimaryPointerGestureRecognizer { if (_wonArenaForPrimaryPointer && _finalPosition != null) { resolve(GestureDisposition.accepted); if (onTapUp != null) - invokeCallback/**/('onTapUp', () => onTapUp(new TapUpDetails(globalPosition: _finalPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onTapUp', () => onTapUp(new TapUpDetails(globalPosition: _finalPosition))); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 if (onTap != null) - invokeCallback/**/('onTap', onTap); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 + invokeCallback('onTap', onTap); // ignore: STRONG_MODE_INVALID_CAST_FUNCTION_EXPR, https://github.com/dart-lang/sdk/issues/27504 _reset(); } } diff --git a/packages/flutter/lib/src/http/http.dart b/packages/flutter/lib/src/http/http.dart index 6806075dd13..870cca1a6ae 100644 --- a/packages/flutter/lib/src/http/http.dart +++ b/packages/flutter/lib/src/http/http.dart @@ -161,7 +161,7 @@ Future read(dynamic url, {Map headers}) => Future readBytes(dynamic url, {Map headers}) => _withClient((Client client) => client.readBytes(url, headers: headers)); -Future/**/ _withClient/**/(Future/**/ fn(Client client)) async { +Future _withClient(Future fn(Client client)) async { Client client = new Client(); try { return await fn(client); diff --git a/packages/flutter/lib/src/http/io_client.dart b/packages/flutter/lib/src/http/io_client.dart index 5a3ae797248..14f41d4b690 100644 --- a/packages/flutter/lib/src/http/io_client.dart +++ b/packages/flutter/lib/src/http/io_client.dart @@ -62,7 +62,7 @@ class IOClient extends BaseClient { }); return new StreamedResponse( - DelegatingStream.typed/*>*/(response).handleError((dynamic error) => + DelegatingStream.typed>(response).handleError((dynamic error) => throw new ClientException(error.message, error.uri), test: (dynamic error) => io.isHttpException(error)), response.statusCode, diff --git a/packages/flutter/lib/src/http/utils.dart b/packages/flutter/lib/src/http/utils.dart index 4617269dd0c..3ff414a54da 100644 --- a/packages/flutter/lib/src/http/utils.dart +++ b/packages/flutter/lib/src/http/utils.dart @@ -85,7 +85,7 @@ ByteStream toByteStream(Stream> stream) { /// Calls [onDone] once [stream] (a single-subscription [Stream]) is finished. /// The return value, also a single-subscription [Stream] should be used in /// place of [stream] after calling this method. -Stream/**/ onDone/**/(Stream/**/ stream, void onDone()) => +Stream onDone(Stream stream, void onDone()) => stream.transform(new StreamTransformer.fromHandlers(handleDone: (EventSink sink) { // ignore: always_specify_types sink.close(); onDone(); diff --git a/packages/flutter/lib/src/material/about.dart b/packages/flutter/lib/src/material/about.dart index 30ccd6574c3..4ee2aaf4e06 100644 --- a/packages/flutter/lib/src/material/about.dart +++ b/packages/flutter/lib/src/material/about.dart @@ -147,7 +147,7 @@ void showAboutDialog({ String applicationLegalese, List children }) { - showDialog/**/( + showDialog( context: context, child: new AboutDialog( applicationName: applicationName, diff --git a/packages/flutter/lib/src/material/arc.dart b/packages/flutter/lib/src/material/arc.dart index 4f7858db0b9..f4bf4c01ff1 100644 --- a/packages/flutter/lib/src/material/arc.dart +++ b/packages/flutter/lib/src/material/arc.dart @@ -163,10 +163,10 @@ const List<_Diagonal> _allDiagonals = const <_Diagonal>[ typedef dynamic _KeyFunc(T input); // Select the element for which the key function returns the maximum value. -dynamic/*=T*/ _maxBy/**/(Iterable input, _KeyFunc/**/ keyFunc) { - dynamic/*=T*/ maxValue; +T _maxBy(Iterable input, _KeyFunc keyFunc) { + T maxValue; dynamic maxKey; - for (dynamic/*=T*/ value in input) { + for (T value in input) { dynamic key = keyFunc(value); if (maxKey == null || key > maxKey) { maxValue = value; @@ -200,7 +200,7 @@ class MaterialRectArcTween extends RectTween { assert(begin != null); assert(end != null); final Offset centersVector = end.center - begin.center; - _diagonal = _maxBy/*<_Diagonal>*/(_allDiagonals, (_Diagonal d) => _diagonalSupport(centersVector, d)); + _diagonal = _maxBy<_Diagonal>(_allDiagonals, (_Diagonal d) => _diagonalSupport(centersVector, d)); _beginArc = new MaterialPointArcTween( begin: _cornerFor(begin, _diagonal.beginId), end: _cornerFor(end, _diagonal.beginId) diff --git a/packages/flutter/lib/src/material/bottom_sheet.dart b/packages/flutter/lib/src/material/bottom_sheet.dart index c9e7727b1b2..573f07165a3 100644 --- a/packages/flutter/lib/src/material/bottom_sheet.dart +++ b/packages/flutter/lib/src/material/bottom_sheet.dart @@ -256,10 +256,10 @@ class _ModalBottomSheetRoute extends PopupRoute { /// * [BottomSheet] /// * [Scaffold.showBottomSheet] /// * -Future showModalBottomSheet/**/({ BuildContext context, WidgetBuilder builder }) { +Future showModalBottomSheet({ BuildContext context, WidgetBuilder builder }) { assert(context != null); assert(builder != null); - return Navigator.push(context, new _ModalBottomSheetRoute( + return Navigator.push(context, new _ModalBottomSheetRoute( builder: builder, theme: Theme.of(context, shadowThemeOnly: true), )); diff --git a/packages/flutter/lib/src/material/button_bar.dart b/packages/flutter/lib/src/material/button_bar.dart index 0e4388c4fef..7c98e270296 100644 --- a/packages/flutter/lib/src/material/button_bar.dart +++ b/packages/flutter/lib/src/material/button_bar.dart @@ -57,7 +57,7 @@ class ButtonBar extends StatelessWidget { child: new Row( mainAxisAlignment: alignment, mainAxisSize: mainAxisSize, - children: children.map/**/((Widget child) { + children: children.map((Widget child) { return new Padding( padding: new EdgeInsets.symmetric(horizontal: paddingUnit), child: child diff --git a/packages/flutter/lib/src/material/dialog.dart b/packages/flutter/lib/src/material/dialog.dart index 02d5baae228..252fe13c149 100644 --- a/packages/flutter/lib/src/material/dialog.dart +++ b/packages/flutter/lib/src/material/dialog.dart @@ -361,11 +361,11 @@ class _DialogRoute extends PopupRoute { /// * [AlertDialog], for dialogs that have a row of buttons below the body. /// * [Dialog], on which [SimpleDialog] and [AlertDialog] are based. /// * -Future showDialog/**/({ +Future showDialog({ @required BuildContext context, @required Widget child }) { - return Navigator.push(context, new _DialogRoute( + return Navigator.push(context, new _DialogRoute( child: child, theme: Theme.of(context, shadowThemeOnly: true), )); diff --git a/packages/flutter/lib/src/material/paginated_data_table.dart b/packages/flutter/lib/src/material/paginated_data_table.dart index 8f1ad5cdf28..e42cd9b4554 100644 --- a/packages/flutter/lib/src/material/paginated_data_table.dart +++ b/packages/flutter/lib/src/material/paginated_data_table.dart @@ -221,13 +221,13 @@ class PaginatedDataTableState extends State { DataRow _getBlankRowFor(int index) { return new DataRow.byIndex( index: index, - cells: config.columns.map/**/((DataColumn column) => DataCell.empty).toList() + cells: config.columns.map((DataColumn column) => DataCell.empty).toList() ); } DataRow _getProgressIndicatorRowFor(int index) { bool haveProgressIndicator = false; - final List cells = config.columns.map/**/((DataColumn column) { + final List cells = config.columns.map((DataColumn column) { if (!column.numeric) { haveProgressIndicator = true; return new DataCell(new CircularProgressIndicator()); @@ -291,7 +291,7 @@ class PaginatedDataTableState extends State { } if (config.actions != null) { headerWidgets.addAll( - config.actions.map/**/((Widget widget) { + config.actions.map((Widget widget) { return new Padding( // 8.0 is the default padding of an icon button padding: const EdgeInsets.only(left: 24.0 - 8.0 * 2.0), @@ -307,7 +307,7 @@ class PaginatedDataTableState extends State { if (config.onRowsPerPageChanged != null) { List availableRowsPerPage = config.availableRowsPerPage .where((int value) => value <= _rowCount) - .map/*>*/((int value) { + .map>((int value) { return new DropdownMenuItem( value: value, child: new Text('$value') diff --git a/packages/flutter/lib/src/material/popup_menu.dart b/packages/flutter/lib/src/material/popup_menu.dart index 802dbc2e07d..08fda76cdfe 100644 --- a/packages/flutter/lib/src/material/popup_menu.dart +++ b/packages/flutter/lib/src/material/popup_menu.dart @@ -437,16 +437,16 @@ class _PopupMenuRoute extends PopupRoute { /// menu. The following elevations have defined shadows: 1, 2, 3, 4, 6, 8, 9, /// 12, 16, 24. The elevation defaults to 8, the appropriate elevation for popup /// menus. -Future showMenu/**/({ +Future showMenu({ BuildContext context, RelativeRect position, - List> items, - dynamic/*=T*/ initialValue, + List> items, + T initialValue, int elevation: 8 }) { assert(context != null); assert(items != null && items.isNotEmpty); - return Navigator.push(context, new _PopupMenuRoute( + return Navigator.push(context, new _PopupMenuRoute( position: position, items: items, initialValue: initialValue, @@ -525,7 +525,7 @@ class _PopupMenuButtonState extends State> { void showButtonMenu() { final RenderBox renderBox = context.findRenderObject(); final Point topLeft = renderBox.localToGlobal(Point.origin); - showMenu/**/( + showMenu( context: context, elevation: config.elevation, items: config.itemBuilder(context), diff --git a/packages/flutter/lib/src/material/scaffold.dart b/packages/flutter/lib/src/material/scaffold.dart index 58a444e5491..a2f06c78526 100644 --- a/packages/flutter/lib/src/material/scaffold.dart +++ b/packages/flutter/lib/src/material/scaffold.dart @@ -676,12 +676,12 @@ class ScaffoldState extends State with TickerProviderStateMixin { /// sheet. /// * [Scaffold.of], for information about how to obtain the [ScaffoldState]. /// * - PersistentBottomSheetController showBottomSheet/**/(WidgetBuilder builder) { + PersistentBottomSheetController showBottomSheet(WidgetBuilder builder) { if (_currentBottomSheet != null) { _currentBottomSheet.close(); assert(_currentBottomSheet == null); } - Completer completer = new Completer(); + Completer completer = new Completer(); GlobalKey<_PersistentBottomSheetState> bottomSheetKey = new GlobalKey<_PersistentBottomSheetState>(); AnimationController controller = BottomSheet.createAnimationController(this) ..forward(); @@ -717,7 +717,7 @@ class ScaffoldState extends State with TickerProviderStateMixin { ); ModalRoute.of(context).addLocalHistoryEntry(entry); setState(() { - _currentBottomSheet = new PersistentBottomSheetController._( + _currentBottomSheet = new PersistentBottomSheetController._( bottomSheet, completer, () => entry.remove(), diff --git a/packages/flutter/lib/src/rendering/grid.dart b/packages/flutter/lib/src/rendering/grid.dart index 3a8495d9995..a58fb8d9664 100644 --- a/packages/flutter/lib/src/rendering/grid.dart +++ b/packages/flutter/lib/src/rendering/grid.dart @@ -643,7 +643,7 @@ class RenderGrid extends RenderVirtualViewport { size = constraints.constrain(gridSize); if (callback != null) - invokeLayoutCallback/**/(callback); + invokeLayoutCallback(callback); double gridTopPadding = 0.0; double gridLeftPadding = 0.0; diff --git a/packages/flutter/lib/src/rendering/list.dart b/packages/flutter/lib/src/rendering/list.dart index fab5d07c7d0..d3fa5c5f3b3 100644 --- a/packages/flutter/lib/src/rendering/list.dart +++ b/packages/flutter/lib/src/rendering/list.dart @@ -153,7 +153,7 @@ class RenderList extends RenderVirtualViewport { } if (callback != null) - invokeLayoutCallback/**/(callback); + invokeLayoutCallback(callback); double itemWidth; double itemHeight; diff --git a/packages/flutter/lib/src/rendering/object.dart b/packages/flutter/lib/src/rendering/object.dart index d0bf72da125..6ab02ae8da4 100644 --- a/packages/flutter/lib/src/rendering/object.dart +++ b/packages/flutter/lib/src/rendering/object.dart @@ -1824,7 +1824,7 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget { /// /// This function can only be called during layout. @protected - void invokeLayoutCallback/**/(LayoutCallback/**/ callback) { + void invokeLayoutCallback(LayoutCallback callback) { assert(_debugMutationsLocked); assert(_debugDoingThisLayout); assert(!_doingThisLayoutWithCallback); @@ -2413,7 +2413,7 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget { debugFillDescription(description); result += description .expand((String description) => debugWordWrap(description, 65, wrapIndent: ' ')) - .map/**/((String line) => "$descriptionPrefix$line\n") + .map((String line) => "$descriptionPrefix$line\n") .join(); if (childrenDescription == '') result += '$prefixOtherLines\n'; diff --git a/packages/flutter/lib/src/widgets/drag_target.dart b/packages/flutter/lib/src/widgets/drag_target.dart index 834230873b4..7bf243b7f32 100644 --- a/packages/flutter/lib/src/widgets/drag_target.dart +++ b/packages/flutter/lib/src/widgets/drag_target.dart @@ -375,8 +375,8 @@ class DragTarget extends StatefulWidget { _DragTargetState createState() => new _DragTargetState(); } -List/**/ _mapAvatarsToData/**/(List/*<_DragAvatar>*/ avatars) { - return avatars.map/**/((_DragAvatar/**/ avatar) => avatar.data).toList(); +List _mapAvatarsToData(List<_DragAvatar> avatars) { + return avatars.map((_DragAvatar avatar) => avatar.data).toList(); } class _DragTargetState extends State> { @@ -423,7 +423,7 @@ class _DragTargetState extends State> { return new MetaData( metaData: this, behavior: HitTestBehavior.translucent, - child: config.builder(context, _mapAvatarsToData/**/(_candidateAvatars), _mapAvatarsToData(_rejectedAvatars)) + child: config.builder(context, _mapAvatarsToData(_candidateAvatars), _mapAvatarsToData(_rejectedAvatars)) ); } } diff --git a/packages/flutter/lib/src/widgets/gesture_detector.dart b/packages/flutter/lib/src/widgets/gesture_detector.dart index 4e4d8912cc8..bfb852a0733 100644 --- a/packages/flutter/lib/src/widgets/gesture_detector.dart +++ b/packages/flutter/lib/src/widgets/gesture_detector.dart @@ -454,7 +454,7 @@ class RawGestureDetectorState extends State { if (_recognizers == null) { description.add('DISPOSED'); } else { - List gestures = _recognizers.values.map/**/((GestureRecognizer recognizer) => recognizer.toStringShort()).toList(); + List gestures = _recognizers.values.map((GestureRecognizer recognizer) => recognizer.toStringShort()).toList(); if (gestures.isEmpty) gestures.add(''); description.add('gestures: ${gestures.join(", ")}'); diff --git a/packages/flutter/lib/src/widgets/table.dart b/packages/flutter/lib/src/widgets/table.dart index f9ef88f6d9c..65b64295f7e 100644 --- a/packages/flutter/lib/src/widgets/table.dart +++ b/packages/flutter/lib/src/widgets/table.dart @@ -100,7 +100,7 @@ class Table extends RenderObjectWidget { this.textBaseline }) : children = children, _rowDecorations = children.any((TableRow row) => row.decoration != null) - ? children.map/**/((TableRow row) => row.decoration).toList(growable: false) + ? children.map((TableRow row) => row.decoration).toList(growable: false) : null, super(key: key) { assert(children != null); @@ -246,7 +246,7 @@ class _TableElement extends RenderObjectElement { _children = widget.children.map((TableRow row) { return new _TableElementRow( key: row.key, - children: row.children.map/**/((Widget child) { + children: row.children.map((Widget child) { assert(child != null); return inflateWidget(child, null); }).toList(growable: false) diff --git a/packages/flutter/test/material/scaffold_test.dart b/packages/flutter/test/material/scaffold_test.dart index d97b2124072..4102bb8f575 100644 --- a/packages/flutter/test/material/scaffold_test.dart +++ b/packages/flutter/test/material/scaffold_test.dart @@ -313,7 +313,7 @@ void main() { new Scaffold(body: new Container(key: testKey)) ); expect(tester.element(find.byKey(testKey)).size, const Size(800.0, 600.0)); - expect(tester.renderObject/**/(find.byKey(testKey)).localToGlobal(Point.origin), const Point(0.0, 0.0)); + expect(tester.renderObject(find.byKey(testKey)).localToGlobal(Point.origin), const Point(0.0, 0.0)); }); testWidgets('body size with sized container', (WidgetTester tester) async { @@ -322,7 +322,7 @@ void main() { new Scaffold(body: new Container(key: testKey, height: 100.0)) ); expect(tester.element(find.byKey(testKey)).size, const Size(800.0, 100.0)); - expect(tester.renderObject/**/(find.byKey(testKey)).localToGlobal(Point.origin), const Point(0.0, 0.0)); + expect(tester.renderObject(find.byKey(testKey)).localToGlobal(Point.origin), const Point(0.0, 0.0)); }); testWidgets('body size with centered container', (WidgetTester tester) async { @@ -331,7 +331,7 @@ void main() { new Scaffold(body: new Center(child: new Container(key: testKey))) ); expect(tester.element(find.byKey(testKey)).size, const Size(800.0, 600.0)); - expect(tester.renderObject/**/(find.byKey(testKey)).localToGlobal(Point.origin), const Point(0.0, 0.0)); + expect(tester.renderObject(find.byKey(testKey)).localToGlobal(Point.origin), const Point(0.0, 0.0)); }); testWidgets('body size with button', (WidgetTester tester) async { @@ -340,7 +340,7 @@ void main() { new Scaffold(body: new FlatButton(key: testKey, onPressed: () { }, child: new Text(''))) ); expect(tester.element(find.byKey(testKey)).size, const Size(88.0, 36.0)); - expect(tester.renderObject/**/(find.byKey(testKey)).localToGlobal(Point.origin), const Point(0.0, 0.0)); + expect(tester.renderObject(find.byKey(testKey)).localToGlobal(Point.origin), const Point(0.0, 0.0)); }); }); } diff --git a/packages/flutter/test/material/will_pop_test.dart b/packages/flutter/test/material/will_pop_test.dart index 14fb334f0d4..fdbb36b7ea9 100644 --- a/packages/flutter/test/material/will_pop_test.dart +++ b/packages/flutter/test/material/will_pop_test.dart @@ -155,7 +155,7 @@ void main() { testWidgets('Form.willPop callbacks do not accumulate', (WidgetTester tester) async { Future showYesNoAlert(BuildContext context) { - return showDialog/**/( + return showDialog( context: context, child: new AlertDialog( actions: [ diff --git a/packages/flutter/test/widgets/bottom_sheet_rebuild_test.dart b/packages/flutter/test/widgets/bottom_sheet_rebuild_test.dart index 036df9b32d1..eaf8e3c1da3 100644 --- a/packages/flutter/test/widgets/bottom_sheet_rebuild_test.dart +++ b/packages/flutter/test/widgets/bottom_sheet_rebuild_test.dart @@ -18,7 +18,7 @@ void main() { ) )); - bottomSheet = scaffoldKey.currentState.showBottomSheet/**/((_) { + bottomSheet = scaffoldKey.currentState.showBottomSheet((_) { return new Builder( builder: (BuildContext context) { buildCount += 1; diff --git a/packages/flutter/test/widgets/bottom_sheet_test.dart b/packages/flutter/test/widgets/bottom_sheet_test.dart index 3b90f23674f..606ccb32ff8 100644 --- a/packages/flutter/test/widgets/bottom_sheet_test.dart +++ b/packages/flutter/test/widgets/bottom_sheet_test.dart @@ -23,7 +23,7 @@ void main() { expect(find.text('BottomSheet'), findsNothing); bool showBottomSheetThenCalled = false; - showModalBottomSheet/**/( + showModalBottomSheet( context: savedContext, builder: (BuildContext context) => new Text('BottomSheet') ).then((Null result) { @@ -45,7 +45,7 @@ void main() { expect(find.text('BottomSheet'), findsNothing); showBottomSheetThenCalled = false; - showModalBottomSheet/**/( + showModalBottomSheet( context: savedContext, builder: (BuildContext context) => new Text('BottomSheet'), ).then((Null result) { diff --git a/packages/flutter/test/widgets/build_scope_test.dart b/packages/flutter/test/widgets/build_scope_test.dart index b25f2d21b9e..f723798f39b 100644 --- a/packages/flutter/test/widgets/build_scope_test.dart +++ b/packages/flutter/test/widgets/build_scope_test.dart @@ -206,7 +206,7 @@ void main() { middle = part2; await tester.pumpWidget(part1); - for (StatefulWrapperState state in tester.stateList/**/(find.byType(StatefulWrapper))) { + for (StatefulWrapperState state in tester.stateList(find.byType(StatefulWrapper))) { expect(state.built, isNotNull); state.oldBuilt = state.built; state.trigger(); @@ -219,7 +219,7 @@ void main() { didMiddle = false; await tester.pumpWidget(part2); - for (StatefulWrapperState state in tester.stateList/**/(find.byType(StatefulWrapper))) { + for (StatefulWrapperState state in tester.stateList(find.byType(StatefulWrapper))) { expect(state.built, isNotNull); expect(state.built, isNot(equals(state.oldBuilt))); } diff --git a/packages/flutter/test/widgets/image_resolution_test.dart b/packages/flutter/test/widgets/image_resolution_test.dart index 0d04af95de3..8b939e70623 100644 --- a/packages/flutter/test/widgets/image_resolution_test.dart +++ b/packages/flutter/test/widgets/image_resolution_test.dart @@ -133,10 +133,10 @@ Widget buildImageAtRatio(String image, Key key, double ratio, bool inferSize) { } RenderImage getRenderImage(WidgetTester tester, Key key) { - return tester.renderObject/**/(find.byKey(key)); + return tester.renderObject(find.byKey(key)); } TestImage getTestImage(WidgetTester tester, Key key) { - return tester.renderObject/**/(find.byKey(key)).image; + return tester.renderObject(find.byKey(key)).image; } Future pumpTreeToLayout(WidgetTester tester, Widget widget) { diff --git a/packages/flutter/test/widgets/layout_builder_and_parent_data_test.dart b/packages/flutter/test/widgets/layout_builder_and_parent_data_test.dart index a7ffa2da7bf..2fb57980beb 100644 --- a/packages/flutter/test/widgets/layout_builder_and_parent_data_test.dart +++ b/packages/flutter/test/widgets/layout_builder_and_parent_data_test.dart @@ -66,7 +66,7 @@ void main() { }) )); frame += 1; - tester.state/**/(find.byType(SizeChanger)).trigger(); + tester.state(find.byType(SizeChanger)).trigger(); await tester.pump(); }); } diff --git a/packages/flutter/test/widgets/page_transitions_test.dart b/packages/flutter/test/widgets/page_transitions_test.dart index bd53c501d3f..592d5ee62d9 100644 --- a/packages/flutter/test/widgets/page_transitions_test.dart +++ b/packages/flutter/test/widgets/page_transitions_test.dart @@ -26,7 +26,7 @@ class PersistentBottomSheetTestState extends State { bool setStateCalled = false; void showBottomSheet() { - _scaffoldKey.currentState.showBottomSheet/**/((BuildContext context) { + _scaffoldKey.currentState.showBottomSheet((BuildContext context) { return new Text('bottomSheet'); }) .closed.then((_) { diff --git a/packages/flutter/test/widgets/remember_scroll_position_test.dart b/packages/flutter/test/widgets/remember_scroll_position_test.dart index 08fb6da409a..c293024afee 100644 --- a/packages/flutter/test/widgets/remember_scroll_position_test.dart +++ b/packages/flutter/test/widgets/remember_scroll_position_test.dart @@ -60,7 +60,7 @@ Future performTest(WidgetTester tester, bool maintainState) async { expect(find.text('100'), findsNothing); Completer completer = new Completer(); - tester.state/**/(find.byType(Scrollable)).scrollTo(1000.0).whenComplete(completer.complete); + tester.state(find.byType(Scrollable)).scrollTo(1000.0).whenComplete(completer.complete); expect(completer.isCompleted, isFalse); await tester.pump(const Duration(seconds: 1)); expect(completer.isCompleted, isTrue); diff --git a/packages/flutter/test/widgets/reparent_state_with_layout_builder_test.dart b/packages/flutter/test/widgets/reparent_state_with_layout_builder_test.dart index b836b617c9c..60a88db9c3f 100644 --- a/packages/flutter/test/widgets/reparent_state_with_layout_builder_test.dart +++ b/packages/flutter/test/widgets/reparent_state_with_layout_builder_test.dart @@ -71,7 +71,7 @@ void main() { expect(StatefulCreationCounterState.creationCount, 0); await tester.pumpWidget(new Bar()); expect(StatefulCreationCounterState.creationCount, 1); - BarState s = tester.state/**/(find.byType(Bar)); + BarState s = tester.state(find.byType(Bar)); s.trigger(); await tester.pump(); expect(StatefulCreationCounterState.creationCount, 1); diff --git a/packages/flutter/test/widgets/scroll_interaction_test.dart b/packages/flutter/test/widgets/scroll_interaction_test.dart index 35b594579e1..c26f677837f 100644 --- a/packages/flutter/test/widgets/scroll_interaction_test.dart +++ b/packages/flutter/test/widgets/scroll_interaction_test.dart @@ -14,7 +14,7 @@ void main() { )); ScrollableState scrollable = - tester.state/**/(find.byType(Scrollable)); + tester.state(find.byType(Scrollable)); expect(scrollable.scrollOffset, equals(0.0)); diff --git a/packages/flutter/test/widgets/scrollable_dispose_test.dart b/packages/flutter/test/widgets/scrollable_dispose_test.dart index 3b8738710ca..ff61bdc319c 100644 --- a/packages/flutter/test/widgets/scrollable_dispose_test.dart +++ b/packages/flutter/test/widgets/scrollable_dispose_test.dart @@ -20,7 +20,7 @@ void main() { await tester.fling(find.byType(Scrollable), const Offset(0.0, -200.0), 1000.0); await tester.pump(); - tester.state/**/(find.byType(FlipWidget)).flip(); + tester.state(find.byType(FlipWidget)).flip(); await tester.pump(const Duration(hours: 5)); }); } diff --git a/packages/flutter/test/widgets/slivers_test.dart b/packages/flutter/test/widgets/slivers_test.dart index 85096536644..5905bc6471b 100644 --- a/packages/flutter/test/widgets/slivers_test.dart +++ b/packages/flutter/test/widgets/slivers_test.dart @@ -21,10 +21,10 @@ Future test(WidgetTester tester, double offset, { double anchor: 0.0 }) { } void verify(WidgetTester tester, List idealPositions, List idealVisibles) { - List actualPositions = tester.renderObjectList/**/(find.byType(SizedBox)).map/**/( + List actualPositions = tester.renderObjectList(find.byType(SizedBox)).map( (RenderBox target) => target.localToGlobal(const Point(0.0, 0.0)) ).toList(); - List actualVisibles = tester.renderObjectList/**/(find.byType(SliverToBoxAdapter)).map/**/( + List actualVisibles = tester.renderObjectList(find.byType(SliverToBoxAdapter)).map( (RenderSliverToBoxAdapter target) => target.geometry.visible ).toList(); expect(actualPositions, equals(idealPositions)); @@ -34,7 +34,7 @@ void verify(WidgetTester tester, List idealPositions, List idealVis void main() { testWidgets('Viewport2 basic test', (WidgetTester tester) async { await test(tester, 0.0); - expect(tester.renderObject/**/(find.byType(Viewport2)).size, equals(const Size(800.0, 600.0))); + expect(tester.renderObject(find.byType(Viewport2)).size, equals(const Size(800.0, 600.0))); verify(tester, [ const Point(0.0, 0.0), const Point(0.0, 400.0), @@ -73,7 +73,7 @@ void main() { testWidgets('Viewport2 anchor test', (WidgetTester tester) async { await test(tester, 0.0, anchor: 100.0); - expect(tester.renderObject/**/(find.byType(Viewport2)).size, equals(const Size(800.0, 600.0))); + expect(tester.renderObject(find.byType(Viewport2)).size, equals(const Size(800.0, 600.0))); verify(tester, [ const Point(0.0, 100.0), const Point(0.0, 500.0), diff --git a/packages/flutter/test/widgets/state_setting_in_scrollables_test.dart b/packages/flutter/test/widgets/state_setting_in_scrollables_test.dart index 3dfb7ed405a..7650484d2f4 100644 --- a/packages/flutter/test/widgets/state_setting_in_scrollables_test.dart +++ b/packages/flutter/test/widgets/state_setting_in_scrollables_test.dart @@ -89,10 +89,10 @@ class FooScrollConfiguration extends ScrollConfigurationDelegate { void main() { testWidgets('https://github.com/flutter/flutter/issues/5630', (WidgetTester tester) async { await tester.pumpWidget(new Foo()); - expect(tester.state/**/(find.byType(Scrollable)).scrollOffset, 0.0); + expect(tester.state(find.byType(Scrollable)).scrollOffset, 0.0); await tester.tap(find.byType(GestureDetector).first); await tester.pump(); await tester.pump(const Duration(seconds: 1)); - expect(tester.state/**/(find.byType(Scrollable)).scrollOffset, 200.0); + expect(tester.state(find.byType(Scrollable)).scrollOffset, 200.0); }); } diff --git a/packages/flutter/test/widgets/test_widgets.dart b/packages/flutter/test/widgets/test_widgets.dart index d42afaeb663..5c8d5bb6aab 100644 --- a/packages/flutter/test/widgets/test_widgets.dart +++ b/packages/flutter/test/widgets/test_widgets.dart @@ -54,5 +54,5 @@ class FlipWidgetState extends State { } void flipStatefulWidget(WidgetTester tester) { - tester.state/**/(find.byType(FlipWidget)).flip(); + tester.state(find.byType(FlipWidget)).flip(); } diff --git a/packages/flutter/test/widgets/ticker_provider_test.dart b/packages/flutter/test/widgets/ticker_provider_test.dart index 34ba3dad411..5c24b836166 100644 --- a/packages/flutter/test/widgets/ticker_provider_test.dart +++ b/packages/flutter/test/widgets/ticker_provider_test.dart @@ -40,13 +40,13 @@ void main() { }, )); expect(tester.binding.transientCallbackCount, 1); - tester.state/**/(find.byType(Navigator)).pushNamed('/test'); + tester.state(find.byType(Navigator)).pushNamed('/test'); expect(tester.binding.transientCallbackCount, 2); await tester.pump(); expect(tester.binding.transientCallbackCount, 2); await tester.pump(const Duration(seconds: 5)); expect(tester.binding.transientCallbackCount, 0); - tester.state/**/(find.byType(Navigator)).pop(); + tester.state(find.byType(Navigator)).pop(); expect(tester.binding.transientCallbackCount, 1); await tester.pump(); expect(tester.binding.transientCallbackCount, 2); diff --git a/packages/flutter_driver/lib/src/driver.dart b/packages/flutter_driver/lib/src/driver.dart index f4ed325f92f..7b33a24ef9a 100644 --- a/packages/flutter_driver/lib/src/driver.dart +++ b/packages/flutter_driver/lib/src/driver.dart @@ -196,7 +196,7 @@ class FlutterDriver { // option, then the VM service extension is not registered yet. Wait for // it to be registered. Future whenResumed = resumeLeniently(); - Future whenServiceExtensionReady = Future.any/**/(>[ + Future whenServiceExtensionReady = Future.any(>[ waitForServiceExtension(), // We will never receive the extension event if the user does not // register it. If that happens time out. @@ -452,9 +452,9 @@ class FlutterDriver { /// With frame sync disabled, its the responsibility of the test author to /// ensure that no action is performed while the app is undergoing a /// transition to avoid flakiness. - Future runUnsynchronized/**/(Future action()) async { + Future runUnsynchronized(Future action()) async { await _sendCommand(new SetFrameSync(false)); - dynamic/*=T*/ result; + T result; try { result = await action(); } finally { diff --git a/packages/flutter_driver/lib/src/timeline_summary.dart b/packages/flutter_driver/lib/src/timeline_summary.dart index 6c4972a2b44..bb4ce3b5ead 100644 --- a/packages/flutter_driver/lib/src/timeline_summary.dart +++ b/packages/flutter_driver/lib/src/timeline_summary.dart @@ -160,7 +160,7 @@ class TimelineSummary { if (events.length == 0) return null; - int total = events.fold/**/(0, (int t, TimedEvent e) => t + e.duration.inMilliseconds); + int total = events.fold(0, (int t, TimedEvent e) => t + e.duration.inMilliseconds); return total / events.length; } @@ -169,7 +169,7 @@ class TimelineSummary { return null; return events - .map/**/((TimedEvent e) => e.duration.inMilliseconds.toDouble()) + .map((TimedEvent e) => e.duration.inMilliseconds.toDouble()) .reduce((double a, double b) => math.max(a, b)); } diff --git a/packages/flutter_test/lib/src/controller.dart b/packages/flutter_test/lib/src/controller.dart index 2e1d044870c..85cdc41bb5a 100644 --- a/packages/flutter_test/lib/src/controller.dart +++ b/packages/flutter_test/lib/src/controller.dart @@ -52,7 +52,7 @@ class WidgetController { /// /// * Use [firstWidget] if you expect to match several widgets but only want the first. /// * Use [widgetList] if you expect to match several widgets and want all of them. - Widget/*=T*/ widget/**/(Finder finder) { + T widget(Finder finder) { TestAsyncUtils.guardSync(); return finder.evaluate().single.widget; } @@ -63,7 +63,7 @@ class WidgetController { /// Throws a [StateError] if `finder` is empty. /// /// * Use [widget] if you only expect to match one widget. - Widget/*=T*/ firstWidget/**/(Finder finder) { + T firstWidget(Finder finder) { TestAsyncUtils.guardSync(); return finder.evaluate().first.widget; } @@ -72,11 +72,10 @@ class WidgetController { /// /// * Use [widget] if you only expect to match one widget. /// * Use [firstWidget] if you expect to match several but only want the first. - Iterable widgetList/**/(Finder finder) { + Iterable widgetList(Finder finder) { TestAsyncUtils.guardSync(); - return finder.evaluate().map/**/((Element element) { - // TODO(ianh): simplify once the VM can infer the return type - dynamic/*=T*/ result = element.widget; + return finder.evaluate().map((Element element) { + T result = element.widget; return result; }); } @@ -99,7 +98,7 @@ class WidgetController { /// /// * Use [firstElement] if you expect to match several elements but only want the first. /// * Use [elementList] if you expect to match several elements and want all of them. - Element/*=T*/ element/**/(Finder finder) { + T element(Finder finder) { TestAsyncUtils.guardSync(); return finder.evaluate().single; } @@ -110,7 +109,7 @@ class WidgetController { /// Throws a [StateError] if `finder` is empty. /// /// * Use [element] if you only expect to match one element. - Element/*=T*/ firstElement/**/(Finder finder) { + T firstElement(Finder finder) { TestAsyncUtils.guardSync(); return finder.evaluate().first; } @@ -119,7 +118,7 @@ class WidgetController { /// /// * Use [element] if you only expect to match one element. /// * Use [firstElement] if you expect to match several but only want the first. - Iterable elementList/**/(Finder finder) { + Iterable elementList(Finder finder) { TestAsyncUtils.guardSync(); return finder.evaluate(); } @@ -144,9 +143,9 @@ class WidgetController { /// /// * Use [firstState] if you expect to match several states but only want the first. /// * Use [stateList] if you expect to match several states and want all of them. - State/*=T*/ state/**/(Finder finder) { + T state(Finder finder) { TestAsyncUtils.guardSync(); - return _stateOf/**/(finder.evaluate().single, finder); + return _stateOf(finder.evaluate().single, finder); } /// The first matching state according to a depth-first pre-order @@ -156,9 +155,9 @@ class WidgetController { /// matching widget has no state. /// /// * Use [state] if you only expect to match one state. - State/*=T*/ firstState/**/(Finder finder) { + T firstState(Finder finder) { TestAsyncUtils.guardSync(); - return _stateOf/**/(finder.evaluate().first, finder); + return _stateOf(finder.evaluate().first, finder); } /// The matching states in the widget tree. @@ -168,12 +167,12 @@ class WidgetController { /// /// * Use [state] if you only expect to match one state. /// * Use [firstState] if you expect to match several but only want the first. - Iterable stateList/**/(Finder finder) { + Iterable stateList(Finder finder) { TestAsyncUtils.guardSync(); - return finder.evaluate().map((Element element) => _stateOf/**/(element, finder)); + return finder.evaluate().map((Element element) => _stateOf(element, finder)); } - State/*=T*/ _stateOf/**/(Element element, Finder finder) { + T _stateOf(Element element, Finder finder) { TestAsyncUtils.guardSync(); if (element is StatefulElement) return element.state; @@ -201,7 +200,7 @@ class WidgetController { /// /// * Use [firstRenderObject] if you expect to match several render objects but only want the first. /// * Use [renderObjectList] if you expect to match several render objects and want all of them. - RenderObject/*=T*/ renderObject/**/(Finder finder) { + T renderObject(Finder finder) { TestAsyncUtils.guardSync(); return finder.evaluate().single.renderObject; } @@ -212,7 +211,7 @@ class WidgetController { /// Throws a [StateError] if `finder` is empty. /// /// * Use [renderObject] if you only expect to match one render object. - RenderObject/*=T*/ firstRenderObject/**/(Finder finder) { + T firstRenderObject(Finder finder) { TestAsyncUtils.guardSync(); return finder.evaluate().first.renderObject; } @@ -221,11 +220,10 @@ class WidgetController { /// /// * Use [renderObject] if you only expect to match one render object. /// * Use [firstRenderObject] if you expect to match several but only want the first. - Iterable renderObjectList/**/(Finder finder) { + Iterable renderObjectList(Finder finder) { TestAsyncUtils.guardSync(); - return finder.evaluate().map/**/((Element element) { - // TODO(ianh): simplify once the VM can infer the return type - dynamic/*=T*/ result = element.renderObject; + return finder.evaluate().map((Element element) { + T result = element.renderObject; return result; }); } diff --git a/packages/flutter_test/lib/src/widget_tester.dart b/packages/flutter_test/lib/src/widget_tester.dart index 52f355018c8..07c03a17b1b 100644 --- a/packages/flutter_test/lib/src/widget_tester.dart +++ b/packages/flutter_test/lib/src/widget_tester.dart @@ -224,7 +224,7 @@ class WidgetTester extends WidgetController implements HitTestDispatcher, Ticker await binding.pump(duration, phase); count += 1; } - }).then/**/((Null _) => count); + }).then((Null _) => count); } @override diff --git a/packages/flutter_tools/lib/executable.dart b/packages/flutter_tools/lib/executable.dart index 3a0ba9abc5a..ce49c2c4259 100644 --- a/packages/flutter_tools/lib/executable.dart +++ b/packages/flutter_tools/lib/executable.dart @@ -120,7 +120,7 @@ Future main(List args) async { context.putIfAbsent(SimControl, () => new SimControl()); context.putIfAbsent(Usage, () => new Usage()); - return Chain.capture/*>*/(() async { + return Chain.capture>(() async { await runner.run(args); _exit(0); }, onError: (dynamic error, Chain chain) { diff --git a/packages/flutter_tools/lib/src/base/process_manager.dart b/packages/flutter_tools/lib/src/base/process_manager.dart index 3c66aacadb6..4ee26f2e120 100644 --- a/packages/flutter_tools/lib/src/base/process_manager.dart +++ b/packages/flutter_tools/lib/src/base/process_manager.dart @@ -19,7 +19,7 @@ ProcessManager get processManager => context[ProcessManager]; const String _kManifestName = 'MANIFEST.txt'; -bool _areListsEqual/**/(List list1, List list2) { +bool _areListsEqual(List list1, List list2) { int i = 0; return list1 != null && list2 != null diff --git a/packages/flutter_tools/lib/src/commands/analyze_continuously.dart b/packages/flutter_tools/lib/src/commands/analyze_continuously.dart index de0cac389d5..0f0dcf94ca9 100644 --- a/packages/flutter_tools/lib/src/commands/analyze_continuously.dart +++ b/packages/flutter_tools/lib/src/commands/analyze_continuously.dart @@ -94,7 +94,7 @@ class AnalyzeContinuously extends AnalyzeBase { printTrace('error code: ${error.code}'); } - dumpErrors(errors.map/**/((AnalysisError error) => error.toLegacyString())); + dumpErrors(errors.map((AnalysisError error) => error.toLegacyString())); // Print an analysis summary. String errorsMessage; diff --git a/packages/flutter_tools/lib/src/commands/analyze_once.dart b/packages/flutter_tools/lib/src/commands/analyze_once.dart index 87923307bb9..a7d07303103 100644 --- a/packages/flutter_tools/lib/src/commands/analyze_once.dart +++ b/packages/flutter_tools/lib/src/commands/analyze_once.dart @@ -183,7 +183,7 @@ class AnalyzeOnce extends AnalyzeBase { printError(error.asString()); errorCount += 1; } - dumpErrors(errors.map/**/((AnalysisErrorDescription error) => error.asString())); + dumpErrors(errors.map((AnalysisErrorDescription error) => error.asString())); stopwatch.stop(); String elapsed = (stopwatch.elapsedMilliseconds / 1000.0).toStringAsFixed(1); diff --git a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart index e67848e4603..4538efc0587 100644 --- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart +++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart @@ -323,7 +323,7 @@ class FlutterCommandRunner extends CommandRunner { // And since analyzer refuses to look at paths that end in "packages/": result.addAll( _gatherProjectPaths(path.join(rootPath, 'packages')) - .map/**/((String path) => fs.directory(path)) + .map((String path) => fs.directory(path)) ); return result; }