format parameter list (#27261)
diff --git a/packages/flutter/lib/src/cupertino/refresh.dart b/packages/flutter/lib/src/cupertino/refresh.dart index 1a22775..1a65ad4 100644 --- a/packages/flutter/lib/src/cupertino/refresh.dart +++ b/packages/flutter/lib/src/cupertino/refresh.dart
@@ -353,7 +353,8 @@ /// arrow before the refresh is triggered, a [CupertinoActivityIndicator] /// during the refresh and fades the [CupertinoActivityIndicator] away when /// the refresh is done. - static Widget buildSimpleRefreshIndicator(BuildContext context, + static Widget buildSimpleRefreshIndicator( + BuildContext context, RefreshIndicatorMode refreshState, double pulledExtent, double refreshTriggerPullDistance,
diff --git a/packages/flutter/lib/src/cupertino/route.dart b/packages/flutter/lib/src/cupertino/route.dart index 566e4b6..eb96038 100644 --- a/packages/flutter/lib/src/cupertino/route.dart +++ b/packages/flutter/lib/src/cupertino/route.dart
@@ -730,7 +730,7 @@ } @override - _CupertinoEdgeShadowPainter createBoxPainter([VoidCallback onChanged]) { + _CupertinoEdgeShadowPainter createBoxPainter([ VoidCallback onChanged ]) { return _CupertinoEdgeShadowPainter(this, onChanged); }
diff --git a/packages/flutter/lib/src/cupertino/segmented_control.dart b/packages/flutter/lib/src/cupertino/segmented_control.dart index 720618e..0438d44 100644 --- a/packages/flutter/lib/src/cupertino/segmented_control.dart +++ b/packages/flutter/lib/src/cupertino/segmented_control.dart
@@ -703,7 +703,7 @@ } @override - bool hitTestChildren(HitTestResult result, {@required Offset position}) { + bool hitTestChildren(HitTestResult result, { @required Offset position }) { assert(position != null); RenderBox child = lastChild; while (child != null) {
diff --git a/packages/flutter/lib/src/material/button.dart b/packages/flutter/lib/src/material/button.dart index 9bfe0e6..049e24f 100644 --- a/packages/flutter/lib/src/material/button.dart +++ b/packages/flutter/lib/src/material/button.dart
@@ -324,7 +324,7 @@ } @override - bool hitTest(HitTestResult result, {Offset position}) { + bool hitTest(HitTestResult result, { Offset position }) { return super.hitTest(result, position: position) || child.hitTest(result, position: child.size.center(Offset.zero)); }
diff --git a/packages/flutter/lib/src/material/chip.dart b/packages/flutter/lib/src/material/chip.dart index 5f476b6..c7ffc9f 100644 --- a/packages/flutter/lib/src/material/chip.dart +++ b/packages/flutter/lib/src/material/chip.dart
@@ -1682,7 +1682,7 @@ _RenderChipRedirectingHitDetection(BoxConstraints additionalConstraints) : super(additionalConstraints: additionalConstraints); @override - bool hitTest(HitTestResult result, {Offset position}) { + bool hitTest(HitTestResult result, { Offset position }) { if (!size.contains(position)) return false; // Only redirects hit detection which occurs above and below the render object. @@ -2200,7 +2200,7 @@ } @override - bool hitTest(HitTestResult result, {Offset position}) { + bool hitTest(HitTestResult result, { Offset position }) { if (!size.contains(position)) return false; RenderBox hitTestChild;
diff --git a/packages/flutter/lib/src/material/floating_action_button_location.dart b/packages/flutter/lib/src/material/floating_action_button_location.dart index af7a97c..fb766ca 100644 --- a/packages/flutter/lib/src/material/floating_action_button_location.dart +++ b/packages/flutter/lib/src/material/floating_action_button_location.dart
@@ -352,7 +352,7 @@ /// [progress] is the current progress of the transition animation. /// When [progress] is 0.0, the returned [Offset] should be equal to [begin]. /// when [progress] is 1.0, the returned [Offset] should be equal to [end]. - Offset getOffset({@required Offset begin, @required Offset end, @required double progress}); + Offset getOffset({ @required Offset begin, @required Offset end, @required double progress }); /// Animates the scale of the [FloatingActionButton]. /// @@ -371,7 +371,7 @@ /// ); /// } /// ``` - Animation<double> getScaleAnimation({@required Animation<double> parent}); + Animation<double> getScaleAnimation({ @required Animation<double> parent }); /// Animates the rotation of [Scaffold.floatingActionButton]. /// @@ -389,7 +389,7 @@ /// return Tween<double>(begin: 0.0, end: 1.0).animate(parent); /// } /// ``` - Animation<double> getRotationAnimation({@required Animation<double> parent}); + Animation<double> getRotationAnimation({ @required Animation<double> parent }); /// Gets the progress value to restart a motion animation from when the animation is interrupted. /// @@ -413,7 +413,7 @@ const _ScalingFabMotionAnimator(); @override - Offset getOffset({Offset begin, Offset end, double progress}) { + Offset getOffset({ Offset begin, Offset end, double progress }) { if (progress < 0.5) { return begin; } else { @@ -422,7 +422,7 @@ } @override - Animation<double> getScaleAnimation({Animation<double> parent}) { + Animation<double> getScaleAnimation({ Animation<double> parent }) { // Animate the scale down from 1 to 0 in the first half of the animation // then from 0 back to 1 in the second half. const Curve curve = Interval(0.5, 1.0, curve: Curves.ease); @@ -444,7 +444,7 @@ static final Animatable<double> _thresholdCenterTween = CurveTween(curve: const Threshold(0.5)); @override - Animation<double> getRotationAnimation({Animation<double> parent}) { + Animation<double> getRotationAnimation({ Animation<double> parent }) { // This rotation will turn on the way in, but not on the way out. return _AnimationSwap<double>( parent.drive(_rotationTween),
diff --git a/packages/flutter/lib/src/material/input_border.dart b/packages/flutter/lib/src/material/input_border.dart index 2c772cf..fbfa167 100644 --- a/packages/flutter/lib/src/material/input_border.dart +++ b/packages/flutter/lib/src/material/input_border.dart
@@ -71,11 +71,13 @@ /// [gapExtent] parameters define a floating label width interval, and /// [gapPercentage] defines the animation's progress (0.0 to 1.0). @override - void paint(Canvas canvas, Rect rect, { - double gapStart, - double gapExtent = 0.0, - double gapPercentage = 0.0, - TextDirection textDirection, + void paint( + Canvas canvas, + Rect rect, { + double gapStart, + double gapExtent = 0.0, + double gapPercentage = 0.0, + TextDirection textDirection, }); } @@ -106,11 +108,13 @@ } @override - void paint(Canvas canvas, Rect rect, { - double gapStart, - double gapExtent = 0.0, - double gapPercentage = 0.0, - TextDirection textDirection, + void paint( + Canvas canvas, + Rect rect, { + double gapStart, + double gapExtent = 0.0, + double gapPercentage = 0.0, + TextDirection textDirection, }) { // Do not paint. } @@ -217,11 +221,13 @@ /// The [borderSide] defines the line's color and weight. The `textDirection` /// `gap` and `textDirection` parameters are ignored. @override - void paint(Canvas canvas, Rect rect, { - double gapStart, - double gapExtent = 0.0, - double gapPercentage = 0.0, - TextDirection textDirection, + void paint( + Canvas canvas, + Rect rect, { + double gapStart, + double gapExtent = 0.0, + double gapPercentage = 0.0, + TextDirection textDirection, }) { if (borderRadius.bottomLeft != Radius.zero || borderRadius.bottomRight != Radius.zero) canvas.clipPath(getOuterPath(rect, textDirection: textDirection)); @@ -447,11 +453,13 @@ /// `gapStart - gapPadding` (assuming that the [textDirection] is [TextDirection.ltr]). /// The gap's width is `(gapPadding + gapExtent + gapPadding) * gapPercentage`. @override - void paint(Canvas canvas, Rect rect, { - double gapStart, - double gapExtent = 0.0, - double gapPercentage = 0.0, - TextDirection textDirection, + void paint( + Canvas canvas, + Rect rect, { + double gapStart, + double gapExtent = 0.0, + double gapPercentage = 0.0, + TextDirection textDirection, }) { assert(gapExtent != null); assert(gapPercentage >= 0.0 && gapPercentage <= 1.0);
diff --git a/packages/flutter/lib/src/material/material_localizations.dart b/packages/flutter/lib/src/material/material_localizations.dart index 7e2248b..2550de4 100644 --- a/packages/flutter/lib/src/material/material_localizations.dart +++ b/packages/flutter/lib/src/material/material_localizations.dart
@@ -95,7 +95,7 @@ /// there are, e.g. 'Tab 1 of 2' in United States English. /// /// `tabIndex` and `tabCount` must be greater than or equal to one. - String tabLabel({int tabIndex, int tabCount}); + String tabLabel({ int tabIndex, int tabCount }); /// Title for the [PaginatedDataTable]'s selected row count header. String selectedRowCountTitle(int selectedRowCount); @@ -599,7 +599,7 @@ String get rowsPerPageTitle => 'Rows per page:'; @override - String tabLabel({int tabIndex, int tabCount}) { + String tabLabel({ int tabIndex, int tabCount }) { assert(tabIndex >= 1); assert(tabCount >= 1); return 'Tab $tabIndex of $tabCount';
diff --git a/packages/flutter/lib/src/material/page.dart b/packages/flutter/lib/src/material/page.dart index 1dc004e..d76af28 100644 --- a/packages/flutter/lib/src/material/page.dart +++ b/packages/flutter/lib/src/material/page.dart
@@ -79,8 +79,11 @@ } @override - Widget buildPage(BuildContext context, Animation<double> animation, - Animation<double> secondaryAnimation) { + Widget buildPage( + BuildContext context, + Animation<double> animation, + Animation<double> secondaryAnimation, + ) { final Widget result = builder(context); assert(() { if (result == null) {
diff --git a/packages/flutter/lib/src/material/reorderable_list.dart b/packages/flutter/lib/src/material/reorderable_list.dart index 81dc9c3..3890f4f 100644 --- a/packages/flutter/lib/src/material/reorderable_list.dart +++ b/packages/flutter/lib/src/material/reorderable_list.dart
@@ -328,7 +328,7 @@ // Wraps children in Row or Column, so that the children flow in // the widget's scrollDirection. - Widget _buildContainerForScrollDirection({List<Widget> children}) { + Widget _buildContainerForScrollDirection({ List<Widget> children }) { switch (widget.scrollDirection) { case Axis.horizontal: return Row(children: children);
diff --git a/packages/flutter/lib/src/material/scaffold.dart b/packages/flutter/lib/src/material/scaffold.dart index 1e0759d..f9b8d59 100644 --- a/packages/flutter/lib/src/material/scaffold.dart +++ b/packages/flutter/lib/src/material/scaffold.dart
@@ -1692,7 +1692,10 @@ super.dispose(); } - void _addIfNonNull(List<LayoutId> children, Widget child, Object childId, { + void _addIfNonNull( + List<LayoutId> children, + Widget child, + Object childId, { @required bool removeLeftPadding, @required bool removeTopPadding, @required bool removeRightPadding,
diff --git a/packages/flutter/lib/src/material/search.dart b/packages/flutter/lib/src/material/search.dart index ec33ce3..52e2609 100644 --- a/packages/flutter/lib/src/material/search.dart +++ b/packages/flutter/lib/src/material/search.dart
@@ -309,10 +309,10 @@ @override Widget buildPage( - BuildContext context, - Animation<double> animation, - Animation<double> secondaryAnimation, - ) { + BuildContext context, + Animation<double> animation, + Animation<double> secondaryAnimation, + ) { return _SearchPage<T>( delegate: delegate, animation: animation,
diff --git a/packages/flutter/lib/src/material/tab_indicator.dart b/packages/flutter/lib/src/material/tab_indicator.dart index d0ca571..1a7b6e8 100644 --- a/packages/flutter/lib/src/material/tab_indicator.dart +++ b/packages/flutter/lib/src/material/tab_indicator.dart
@@ -58,7 +58,7 @@ } @override - _UnderlinePainter createBoxPainter([VoidCallback onChanged]) { + _UnderlinePainter createBoxPainter([ VoidCallback onChanged ]) { return _UnderlinePainter(this, onChanged); } }
diff --git a/packages/flutter/lib/src/material/text_field.dart b/packages/flutter/lib/src/material/text_field.dart index 6619290..52238f9 100644 --- a/packages/flutter/lib/src/material/text_field.dart +++ b/packages/flutter/lib/src/material/text_field.dart
@@ -25,17 +25,15 @@ /// Signature for the [TextField.buildCounter] callback. typedef InputCounterWidgetBuilder = Widget Function( /// The build context for the TextField - BuildContext context, - { - /// The length of the string currently in the input. - @required int currentLength, - /// The maximum string length that can be entered into the TextField. - @required int maxLength, - /// Whether or not the TextField is currently focused. Mainly provided for - /// the [liveRegion] parameter in the [Semantics] widget for accessibility. - @required bool isFocused, - } -); + BuildContext context, { + /// The length of the string currently in the input. + @required int currentLength, + /// The maximum string length that can be entered into the TextField. + @required int maxLength, + /// Whether or not the TextField is currently focused. Mainly provided for + /// the [liveRegion] parameter in the [Semantics] widget for accessibility. + @required bool isFocused, +}); /// A material design text field. ///
diff --git a/packages/flutter/lib/src/material/time_picker.dart b/packages/flutter/lib/src/material/time_picker.dart index 39d7c13..8a2952d 100644 --- a/packages/flutter/lib/src/material/time_picker.dart +++ b/packages/flutter/lib/src/material/time_picker.dart
@@ -454,8 +454,10 @@ } // Convenience function for creating a time header format with up to two pieces. - _TimePickerHeaderFormat format(_TimePickerHeaderPiece piece1, - [ _TimePickerHeaderPiece piece2 ]) { + _TimePickerHeaderFormat format( + _TimePickerHeaderPiece piece1, [ + _TimePickerHeaderPiece piece2, + ]) { final List<_TimePickerHeaderPiece> pieces = <_TimePickerHeaderPiece>[]; switch (context.textDirection) { case TextDirection.ltr: @@ -480,8 +482,13 @@ } // Convenience function for creating a time header piece with up to three fragments. - _TimePickerHeaderPiece piece({ int pivotIndex = -1, double bottomMargin = 0.0, - _TimePickerHeaderFragment fragment1, _TimePickerHeaderFragment fragment2, _TimePickerHeaderFragment fragment3 }) { + _TimePickerHeaderPiece piece({ + int pivotIndex = -1, + double bottomMargin = 0.0, + _TimePickerHeaderFragment fragment1, + _TimePickerHeaderFragment fragment2, + _TimePickerHeaderFragment fragment3, + }) { final List<_TimePickerHeaderFragment> fragments = <_TimePickerHeaderFragment>[fragment1]; if (fragment2 != null) { fragments.add(fragment2);
diff --git a/packages/flutter/lib/src/painting/borders.dart b/packages/flutter/lib/src/painting/borders.dart index 40d4f54..b944a44 100644 --- a/packages/flutter/lib/src/painting/borders.dart +++ b/packages/flutter/lib/src/painting/borders.dart
@@ -652,7 +652,9 @@ /// * [Border], which uses this function to paint its border when the border is /// not uniform. /// * [BoxDecoration], which describes its border using the [Border] class. -void paintBorder(Canvas canvas, Rect rect, { +void paintBorder( + Canvas canvas, + Rect rect, { BorderSide top = BorderSide.none, BorderSide right = BorderSide.none, BorderSide bottom = BorderSide.none,
diff --git a/packages/flutter/lib/src/painting/box_border.dart b/packages/flutter/lib/src/painting/box_border.dart index 1c6d38a..e367d7a 100644 --- a/packages/flutter/lib/src/painting/box_border.dart +++ b/packages/flutter/lib/src/painting/box_border.dart
@@ -196,7 +196,9 @@ /// /// * [paintBorder], which is used if the border is not uniform. @override - void paint(Canvas canvas, Rect rect, { + void paint( + Canvas canvas, + Rect rect, { TextDirection textDirection, BoxShape shape = BoxShape.rectangle, BorderRadius borderRadius, @@ -466,7 +468,9 @@ /// /// * [paintBorder], which is used if the border is not uniform. @override - void paint(Canvas canvas, Rect rect, { + void paint( + Canvas canvas, + Rect rect, { TextDirection textDirection, BoxShape shape = BoxShape.rectangle, BorderRadius borderRadius, @@ -759,7 +763,9 @@ /// /// * [paintBorder], which is used if the border is not uniform. @override - void paint(Canvas canvas, Rect rect, { + void paint( + Canvas canvas, + Rect rect, { TextDirection textDirection, BoxShape shape = BoxShape.rectangle, BorderRadius borderRadius,
diff --git a/packages/flutter/lib/src/painting/box_decoration.dart b/packages/flutter/lib/src/painting/box_decoration.dart index 3137c33..9777628 100644 --- a/packages/flutter/lib/src/painting/box_decoration.dart +++ b/packages/flutter/lib/src/painting/box_decoration.dart
@@ -326,7 +326,7 @@ } @override - _BoxDecorationPainter createBoxPainter([VoidCallback onChanged]) { + _BoxDecorationPainter createBoxPainter([ VoidCallback onChanged ]) { assert(onChanged != null || image == null); return _BoxDecorationPainter(this, onChanged); }
diff --git a/packages/flutter/lib/src/painting/continuous_rectangle_border.dart b/packages/flutter/lib/src/painting/continuous_rectangle_border.dart index 53f6a83..0a314ec 100644 --- a/packages/flutter/lib/src/painting/continuous_rectangle_border.dart +++ b/packages/flutter/lib/src/painting/continuous_rectangle_border.dart
@@ -123,17 +123,17 @@ } @override - Path getInnerPath(Rect rect, {TextDirection textDirection}) { + Path getInnerPath(Rect rect, { TextDirection textDirection }) { return _getPath(borderRadius.resolve(textDirection).toRRect(rect).deflate(side.width)); } @override - Path getOuterPath(Rect rect, {TextDirection textDirection}) { + Path getOuterPath(Rect rect, { TextDirection textDirection }) { return _getPath(borderRadius.resolve(textDirection).toRRect(rect)); } @override - void paint(Canvas canvas, Rect rect, {TextDirection textDirection}) { + void paint(Canvas canvas, Rect rect, { TextDirection textDirection }) { if (rect.isEmpty) return; switch (side.style) {
diff --git a/packages/flutter/lib/src/painting/decoration.dart b/packages/flutter/lib/src/painting/decoration.dart index 6321446..0ea8743 100644 --- a/packages/flutter/lib/src/painting/decoration.dart +++ b/packages/flutter/lib/src/painting/decoration.dart
@@ -164,7 +164,7 @@ /// The `onChanged` argument configures [BoxPainter.onChanged]. It can be /// omitted if there is no chance that the painter will change (for example, /// if it is a [BoxDecoration] with definitely no [DecorationImage]). - BoxPainter createBoxPainter([VoidCallback onChanged]); + BoxPainter createBoxPainter([ VoidCallback onChanged ]); } /// A stateful class that can paint a particular [Decoration].
diff --git a/packages/flutter/lib/src/painting/edge_insets.dart b/packages/flutter/lib/src/painting/edge_insets.dart index 9ff3269..4c16dcd 100644 --- a/packages/flutter/lib/src/painting/edge_insets.dart +++ b/packages/flutter/lib/src/painting/edge_insets.dart
@@ -588,7 +588,7 @@ double top, double right, double bottom, -}) { + }) { return EdgeInsets.only( left: left ?? this.left, top: top ?? this.top,
diff --git a/packages/flutter/lib/src/painting/flutter_logo.dart b/packages/flutter/lib/src/painting/flutter_logo.dart index 2b7bddd..8811f70 100644 --- a/packages/flutter/lib/src/painting/flutter_logo.dart +++ b/packages/flutter/lib/src/painting/flutter_logo.dart
@@ -200,7 +200,7 @@ bool hitTest(Size size, Offset position, { TextDirection textDirection }) => true; @override - BoxPainter createBoxPainter([VoidCallback onChanged]) { + BoxPainter createBoxPainter([ VoidCallback onChanged ]) { assert(debugAssertIsValid()); return _FlutterLogoPainter(this); }
diff --git a/packages/flutter/lib/src/painting/image_provider.dart b/packages/flutter/lib/src/painting/image_provider.dart index 1a2845c..0b9cb08 100644 --- a/packages/flutter/lib/src/painting/image_provider.dart +++ b/packages/flutter/lib/src/painting/image_provider.dart
@@ -343,7 +343,7 @@ /// } /// ``` /// {@end-tool} - Future<bool> evict({ImageCache cache, ImageConfiguration configuration = ImageConfiguration.empty}) async { + Future<bool> evict({ ImageCache cache, ImageConfiguration configuration = ImageConfiguration.empty }) async { cache ??= imageCache; final T key = await obtainKey(configuration); return cache.evict(key);
diff --git a/packages/flutter/lib/src/painting/shape_decoration.dart b/packages/flutter/lib/src/painting/shape_decoration.dart index 8638099..e021223 100644 --- a/packages/flutter/lib/src/painting/shape_decoration.dart +++ b/packages/flutter/lib/src/painting/shape_decoration.dart
@@ -275,7 +275,7 @@ } @override - _ShapeDecorationPainter createBoxPainter([VoidCallback onChanged]) { + _ShapeDecorationPainter createBoxPainter([ VoidCallback onChanged ]) { assert(onChanged != null || image == null); return _ShapeDecorationPainter(this, onChanged); }
diff --git a/packages/flutter/lib/src/painting/text_painter.dart b/packages/flutter/lib/src/painting/text_painter.dart index 0d8da07..d020b9a 100644 --- a/packages/flutter/lib/src/painting/text_painter.dart +++ b/packages/flutter/lib/src/painting/text_painter.dart
@@ -226,7 +226,7 @@ ui.Paragraph _layoutTemplate; - ui.ParagraphStyle _createParagraphStyle([TextDirection defaultTextDirection]) { + ui.ParagraphStyle _createParagraphStyle([ TextDirection defaultTextDirection ]) { // The defaultTextDirection argument is used for preferredLineHeight in case // textDirection hasn't yet been set. assert(textAlign != null);
diff --git a/packages/flutter/lib/src/painting/text_style.dart b/packages/flutter/lib/src/painting/text_style.dart index 7cfc700..04e06d0 100644 --- a/packages/flutter/lib/src/painting/text_style.dart +++ b/packages/flutter/lib/src/painting/text_style.dart
@@ -807,18 +807,18 @@ /// If the font size on this style isn't set, it will default to 14 logical /// pixels. ui.ParagraphStyle getParagraphStyle({ - TextAlign textAlign, - TextDirection textDirection, - double textScaleFactor = 1.0, - String ellipsis, - int maxLines, - Locale locale, - String fontFamily, - double fontSize, - FontWeight fontWeight, - FontStyle fontStyle, - double height, - StrutStyle strutStyle, + TextAlign textAlign, + TextDirection textDirection, + double textScaleFactor = 1.0, + String ellipsis, + int maxLines, + Locale locale, + String fontFamily, + double fontSize, + FontWeight fontWeight, + FontStyle fontStyle, + double height, + StrutStyle strutStyle, }) { assert(textScaleFactor != null); assert(maxLines == null || maxLines > 0);
diff --git a/packages/flutter/lib/src/rendering/box.dart b/packages/flutter/lib/src/rendering/box.dart index e297305..f6f9bcd 100644 --- a/packages/flutter/lib/src/rendering/box.dart +++ b/packages/flutter/lib/src/rendering/box.dart
@@ -247,14 +247,14 @@ /// Returns the width that both satisfies the constraints and is as close as /// possible to the given width. - double constrainWidth([double width = double.infinity]) { + double constrainWidth([ double width = double.infinity ]) { assert(debugAssertIsValid()); return width.clamp(minWidth, maxWidth); } /// Returns the height that both satisfies the constraints and is as close as /// possible to the given height. - double constrainHeight([double height = double.infinity]) { + double constrainHeight([ double height = double.infinity ]) { assert(debugAssertIsValid()); return height.clamp(minHeight, maxHeight); }
diff --git a/packages/flutter/lib/src/rendering/editable.dart b/packages/flutter/lib/src/rendering/editable.dart index 08a8f9b..3c7bc8e 100644 --- a/packages/flutter/lib/src/rendering/editable.dart +++ b/packages/flutter/lib/src/rendering/editable.dart
@@ -1246,7 +1246,7 @@ /// If you have a [TextEditingController], it's generally easier to /// programmatically manipulate its `value` or `selection` directly. /// {@endtemplate} - void selectPosition({@required SelectionChangedCause cause}) { + void selectPosition({ @required SelectionChangedCause cause }) { assert(cause != null); _layoutText(constraints.maxWidth); assert(_lastTapDownPosition != null); @@ -1259,7 +1259,7 @@ /// Select a word around the location of the last tap down. /// /// {@macro flutter.rendering.editable.select} - void selectWord({@required SelectionChangedCause cause}) { + void selectWord({ @required SelectionChangedCause cause }) { selectWordsInRange(from: _lastTapDownPosition, cause: cause); } @@ -1269,7 +1269,7 @@ /// beginning and end of a word respectively. /// /// {@macro flutter.rendering.editable.select} - void selectWordsInRange({@required Offset from, Offset to, @required SelectionChangedCause cause}) { + void selectWordsInRange({ @required Offset from, Offset to, @required SelectionChangedCause cause }) { assert(cause != null); _layoutText(constraints.maxWidth); if (onSelectionChanged != null) { @@ -1291,7 +1291,7 @@ /// Move the selection to the beginning or end of a word. /// /// {@macro flutter.rendering.editable.select} - void selectWordEdge({@required SelectionChangedCause cause}) { + void selectWordEdge({ @required SelectionChangedCause cause }) { assert(cause != null); _layoutText(constraints.maxWidth); assert(_lastTapDownPosition != null);
diff --git a/packages/flutter/lib/src/rendering/layer.dart b/packages/flutter/lib/src/rendering/layer.dart index 4e06e80..f5e22df 100644 --- a/packages/flutter/lib/src/rendering/layer.dart +++ b/packages/flutter/lib/src/rendering/layer.dart
@@ -175,7 +175,7 @@ /// Return the engine layer for retained rendering. When there's no /// corresponding engine layer, null is returned. @protected - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]); + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]); void _addToSceneWithRetainedRendering(ui.SceneBuilder builder) { // There can't be a loop by adding a retained layer subtree whose @@ -276,7 +276,7 @@ } @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { builder.addPicture(layerOffset, picture, isComplexHint: isComplexHint, willChangeHint: willChangeHint); return null; // this does not return an engine layer yet. } @@ -344,7 +344,7 @@ final bool freeze; @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { final Rect shiftedRect = rect.shift(layerOffset); builder.addTexture( textureId, @@ -381,7 +381,7 @@ final int viewId; @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { final Rect shiftedRect = rect.shift(layerOffset); builder.addPlatformView( viewId, @@ -456,7 +456,7 @@ final bool checkerboardOffscreenLayers; @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { assert(optionsMask != null); builder.addPerformanceOverlay(optionsMask, overlayRect.shift(layerOffset)); builder.setRasterizerTracingThreshold(rasterizerThreshold); @@ -617,7 +617,7 @@ } @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { addChildrenToScene(builder, layerOffset); return null; // ContainerLayer does not have a corresponding engine layer } @@ -629,7 +629,7 @@ /// to apply effects to the scene using the [SceneBuilder] API, then insert /// their children using [addChildrenToScene], then reverse the aforementioned /// effects before returning from [addToScene]. - void addChildrenToScene(ui.SceneBuilder builder, [Offset childOffset = Offset.zero]) { + void addChildrenToScene(ui.SceneBuilder builder, [ Offset childOffset = Offset.zero ]) { Layer child = firstChild; while (child != null) { if (childOffset == Offset.zero) { @@ -750,7 +750,7 @@ } @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { // Skia has a fast path for concatenating scale/translation only matrices. // Hence pushing a translation-only transform layer should be fast. For // retained rendering, we don't want to push the offset down to each leaf @@ -784,7 +784,7 @@ /// /// * [RenderRepaintBoundary.toImage] for a similar API at the render object level. /// * [dart:ui.Scene.toImage] for more information about the image returned. - Future<ui.Image> toImage(Rect bounds, {double pixelRatio = 1.0}) async { + Future<ui.Image> toImage(Rect bounds, { double pixelRatio = 1.0 }) async { assert(bounds != null); assert(pixelRatio != null); final ui.SceneBuilder builder = ui.SceneBuilder(); @@ -864,7 +864,7 @@ } @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { bool enabled = true; assert(() { enabled = !debugDisableClipLayers; @@ -936,7 +936,7 @@ } @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { bool enabled = true; assert(() { enabled = !debugDisableClipLayers; @@ -1008,7 +1008,7 @@ } @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { bool enabled = true; assert(() { enabled = !debugDisableClipLayers; @@ -1060,7 +1060,7 @@ bool _inverseDirty = true; @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { _lastEffectiveTransform = transform; final Offset totalOffset = offset + layerOffset; if (totalOffset != Offset.zero) { @@ -1143,7 +1143,7 @@ } @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { bool enabled = true; assert(() { enabled = !debugDisableOpacityLayers; @@ -1219,7 +1219,7 @@ } @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { builder.pushShaderMask(shader, maskRect.shift(layerOffset), blendMode); addChildrenToScene(builder, layerOffset); builder.pop(); @@ -1257,7 +1257,7 @@ } @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { builder.pushBackdropFilter(filter); addChildrenToScene(builder, layerOffset); builder.pop(); @@ -1369,7 +1369,7 @@ } @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { ui.EngineLayer engineLayer; bool enabled = true; assert(() { @@ -1484,7 +1484,7 @@ } @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { assert(offset != null); _lastOffset = offset + layerOffset; if (_lastOffset != Offset.zero) @@ -1702,7 +1702,7 @@ bool get alwaysNeedsAddToScene => true; @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { assert(link != null); assert(showWhenUnlinked != null); if (link.leader == null && !showWhenUnlinked) {
diff --git a/packages/flutter/lib/src/rendering/list_wheel_viewport.dart b/packages/flutter/lib/src/rendering/list_wheel_viewport.dart index 66f3631..2386cf3 100644 --- a/packages/flutter/lib/src/rendering/list_wheel_viewport.dart +++ b/packages/flutter/lib/src/rendering/list_wheel_viewport.dart
@@ -42,7 +42,7 @@ /// nothing. /// /// It is possible to create children with negative indices. - void createChild(int index, {@required RenderBox after}); + void createChild(int index, { @required RenderBox after }); /// Removes the child element corresponding with the given RenderBox. void removeChild(RenderBox child); @@ -572,7 +572,7 @@ /// Returns the scroll offset of the child with the given index. double indexToScrollOffset(int index) => index * itemExtent; - void _createChild(int index, {RenderBox after}) { + void _createChild(int index, { RenderBox after }) { invokeLayoutCallback<BoxConstraints>((BoxConstraints constraints) { assert(constraints == this.constraints); childManager.createChild(index, after: after); @@ -804,12 +804,12 @@ /// Paint child with the magnifier active - the child will be rendered /// differently if it intersects with the magnifier. void _paintChildWithMagnifier( - PaintingContext context, - Offset offset, - RenderBox child, - Matrix4 cylindricalTransform, - Offset offsetToCenter, - Offset untransformedPaintingCoordinates, + PaintingContext context, + Offset offset, + RenderBox child, + Matrix4 cylindricalTransform, + Offset offsetToCenter, + Offset untransformedPaintingCoordinates, ) { final double magnifierTopLinePosition = size.height / 2 - _itemExtent * _magnification / 2; @@ -884,11 +884,11 @@ // / Paint the child cylindrically at given offset. void _paintChildCylindrically( - PaintingContext context, - Offset offset, - RenderBox child, - Matrix4 cylindricalTransform, - Offset offsetToCenter, + PaintingContext context, + Offset offset, + RenderBox child, + Matrix4 cylindricalTransform, + Offset offsetToCenter, ) { context.pushTransform( // Text with TransformLayers and no cullRects currently have an issue rendering @@ -952,7 +952,7 @@ } @override - RevealedOffset getOffsetToReveal(RenderObject target, double alignment, {Rect rect}) { + RevealedOffset getOffsetToReveal(RenderObject target, double alignment, { Rect rect }) { // `target` is only fully revealed when in the selected/center position. Therefore, // this method always returns the offset that shows `target` in the center position, // which is the same offset for all `alignment` values.
diff --git a/packages/flutter/lib/src/rendering/object.dart b/packages/flutter/lib/src/rendering/object.dart index a96ae36..a6520b1 100644 --- a/packages/flutter/lib/src/rendering/object.dart +++ b/packages/flutter/lib/src/rendering/object.dart
@@ -388,7 +388,7 @@ /// * `painter` is a callback that will paint with the [clipRect] applied. This /// function calls the [painter] synchronously. /// * `clipBehavior` controls how the rectangle is clipped. - void pushClipRect(bool needsCompositing, Offset offset, Rect clipRect, PaintingContextCallback painter, {Clip clipBehavior = Clip.hardEdge}) { + void pushClipRect(bool needsCompositing, Offset offset, Rect clipRect, PaintingContextCallback painter, { Clip clipBehavior = Clip.hardEdge }) { final Rect offsetClipRect = clipRect.shift(offset); if (needsCompositing) { pushLayer(ClipRectLayer(clipRect: offsetClipRect, clipBehavior: clipBehavior), painter, offset, childPaintBounds: offsetClipRect); @@ -410,7 +410,7 @@ /// * `painter` is a callback that will paint with the `clipRRect` applied. This /// function calls the `painter` synchronously. /// * `clipBehavior` controls how the path is clipped. - void pushClipRRect(bool needsCompositing, Offset offset, Rect bounds, RRect clipRRect, PaintingContextCallback painter, {Clip clipBehavior = Clip.antiAlias}) { + void pushClipRRect(bool needsCompositing, Offset offset, Rect bounds, RRect clipRRect, PaintingContextCallback painter, { Clip clipBehavior = Clip.antiAlias }) { assert(clipBehavior != null); final Rect offsetBounds = bounds.shift(offset); final RRect offsetClipRRect = clipRRect.shift(offset); @@ -434,7 +434,7 @@ /// * `painter` is a callback that will paint with the `clipPath` applied. This /// function calls the `painter` synchronously. /// * `clipBehavior` controls how the rounded rectangle is clipped. - void pushClipPath(bool needsCompositing, Offset offset, Rect bounds, Path clipPath, PaintingContextCallback painter, {Clip clipBehavior = Clip.antiAlias}) { + void pushClipPath(bool needsCompositing, Offset offset, Rect bounds, Path clipPath, PaintingContextCallback painter, { Clip clipBehavior = Clip.antiAlias }) { assert(clipBehavior != null); final Rect offsetBounds = bounds.shift(offset); final Path offsetClipPath = clipPath.shift(offset); @@ -2537,9 +2537,9 @@ /// to the tree. If new [SemanticsNode]s are instantiated in this method /// they must be disposed in [clearSemantics]. void assembleSemanticsNode( - SemanticsNode node, - SemanticsConfiguration config, - Iterable<SemanticsNode> children, + SemanticsNode node, + SemanticsConfiguration config, + Iterable<SemanticsNode> children, ) { assert(node == _semantics); node.updateWith(config: config, childrenInInversePaintOrder: children); @@ -3273,7 +3273,7 @@ }) : super(owner: owner, dropsSemanticsOfPreviousSiblings: dropsSemanticsOfPreviousSiblings); @override - Iterable<SemanticsNode> compileChildren({Rect parentSemanticsClipRect, Rect parentPaintClipRect, double elevationAdjustment}) sync* { + Iterable<SemanticsNode> compileChildren({ Rect parentSemanticsClipRect, Rect parentPaintClipRect, double elevationAdjustment }) sync* { assert(_tagsForChildren == null || _tagsForChildren.isEmpty); assert(parentSemanticsClipRect == null); assert(parentPaintClipRect == null); @@ -3363,7 +3363,7 @@ final List<_InterestingSemanticsFragment> _children = <_InterestingSemanticsFragment>[]; @override - Iterable<SemanticsNode> compileChildren({Rect parentSemanticsClipRect, Rect parentPaintClipRect, double elevationAdjustment}) sync* { + Iterable<SemanticsNode> compileChildren({ Rect parentSemanticsClipRect, Rect parentPaintClipRect, double elevationAdjustment }) sync* { if (!_isExplicit) { owner._semantics = null; for (_InterestingSemanticsFragment fragment in _children) { @@ -3486,7 +3486,7 @@ } @override - Iterable<SemanticsNode> compileChildren({Rect parentSemanticsClipRect, Rect parentPaintClipRect, double elevationAdjustment}) sync* { + Iterable<SemanticsNode> compileChildren({ Rect parentSemanticsClipRect, Rect parentPaintClipRect, double elevationAdjustment }) sync* { yield owner._semantics; }
diff --git a/packages/flutter/lib/src/rendering/proxy_box.dart b/packages/flutter/lib/src/rendering/proxy_box.dart index 516d32b..b9591d1 100644 --- a/packages/flutter/lib/src/rendering/proxy_box.dart +++ b/packages/flutter/lib/src/rendering/proxy_box.dart
@@ -2120,14 +2120,14 @@ } /// Concatenates a translation by (x, y, z) into the transform. - void translate(double x, [double y = 0.0, double z = 0.0]) { + void translate(double x, [ double y = 0.0, double z = 0.0 ]) { _transform.translate(x, y, z); markNeedsPaint(); markNeedsSemanticsUpdate(); } /// Concatenates a scale into the transform. - void scale(double x, [double y, double z]) { + void scale(double x, [ double y, double z ]) { _transform.scale(x, y, z); markNeedsPaint(); markNeedsSemanticsUpdate(); @@ -2765,7 +2765,7 @@ /// /// * [OffsetLayer.toImage] for a similar API at the layer level. /// * [dart:ui.Scene.toImage] for more information about the image returned. - Future<ui.Image> toImage({double pixelRatio = 1.0}) { + Future<ui.Image> toImage({ double pixelRatio = 1.0 }) { assert(!debugNeedsPaint); return layer.toImage(Offset.zero & size, pixelRatio: pixelRatio); }
diff --git a/packages/flutter/lib/src/rendering/sliver_fill.dart b/packages/flutter/lib/src/rendering/sliver_fill.dart index 60bb052..89ca497 100644 --- a/packages/flutter/lib/src/rendering/sliver_fill.dart +++ b/packages/flutter/lib/src/rendering/sliver_fill.dart
@@ -75,7 +75,8 @@ } @override - double estimateMaxScrollOffset(SliverConstraints constraints, { + double estimateMaxScrollOffset( + SliverConstraints constraints, { int firstIndex, int lastIndex, double leadingScrollOffset,
diff --git a/packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart b/packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart index 48a71a8..0ced41e 100644 --- a/packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart +++ b/packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart
@@ -93,7 +93,8 @@ /// * [computeMaxScrollOffset], which is similar but must provide a precise /// value. @protected - double estimateMaxScrollOffset(SliverConstraints constraints, { + double estimateMaxScrollOffset( + SliverConstraints constraints, { int firstIndex, int lastIndex, double leadingScrollOffset,
diff --git a/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart b/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart index 453e9b4..f2de999 100644 --- a/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart +++ b/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart
@@ -65,7 +65,8 @@ /// Must return the total distance from the start of the child with the /// earliest possible index to the end of the child with the last possible /// index. - double estimateMaxScrollOffset(SliverConstraints constraints, { + double estimateMaxScrollOffset( + SliverConstraints constraints, { int firstIndex, int lastIndex, double leadingScrollOffset, @@ -370,7 +371,8 @@ /// during this layout pass. No child should be added during that call except /// for the one that is created and returned by `createChild`. @protected - RenderBox insertAndLayoutLeadingChild(BoxConstraints childConstraints, { + RenderBox insertAndLayoutLeadingChild( + BoxConstraints childConstraints, { bool parentUsesSize = false, }) { assert(_debugAssertChildListLocked()); @@ -397,7 +399,8 @@ /// Children after the `after` child may be removed in the process. Only the /// new child may be added. @protected - RenderBox insertAndLayoutChild(BoxConstraints childConstraints, { + RenderBox insertAndLayoutChild( + BoxConstraints childConstraints, { @required RenderBox after, bool parentUsesSize = false, }) {
diff --git a/packages/flutter/lib/src/rendering/table_border.dart b/packages/flutter/lib/src/rendering/table_border.dart index 5913025..d193cf5 100644 --- a/packages/flutter/lib/src/rendering/table_border.dart +++ b/packages/flutter/lib/src/rendering/table_border.dart
@@ -192,7 +192,9 @@ /// /// The paint order is particularly notable in the case of /// partially-transparent borders. - void paint(Canvas canvas, Rect rect, { + void paint( + Canvas canvas, + Rect rect, { @required Iterable<double> rows, @required Iterable<double> columns, }) {
diff --git a/packages/flutter/lib/src/rendering/viewport.dart b/packages/flutter/lib/src/rendering/viewport.dart index 69c06a2..67648731 100644 --- a/packages/flutter/lib/src/rendering/viewport.dart +++ b/packages/flutter/lib/src/rendering/viewport.dart
@@ -68,7 +68,7 @@ /// See also: /// /// * [RevealedOffset], which describes the return value of this method. - RevealedOffset getOffsetToReveal(RenderObject target, double alignment, {Rect rect}); + RevealedOffset getOffsetToReveal(RenderObject target, double alignment, { Rect rect }); /// The default value for the cache extent of the viewport. /// @@ -585,7 +585,7 @@ } @override - RevealedOffset getOffsetToReveal(RenderObject target, double alignment, {Rect rect}) { + RevealedOffset getOffsetToReveal(RenderObject target, double alignment, { Rect rect }) { double leadingScrollOffset = 0.0; double targetMainAxisExtent; rect ??= target.paintBounds;
diff --git a/packages/flutter/lib/src/rendering/viewport_offset.dart b/packages/flutter/lib/src/rendering/viewport_offset.dart index 62c5e1f..ea3f7f2 100644 --- a/packages/flutter/lib/src/rendering/viewport_offset.dart +++ b/packages/flutter/lib/src/rendering/viewport_offset.dart
@@ -176,7 +176,8 @@ /// /// The duration must not be zero. To jump to a particular value without an /// animation, use [jumpTo]. - Future<void> animateTo(double to, { + Future<void> animateTo( + double to, { @required Duration duration, @required Curve curve, }); @@ -188,7 +189,8 @@ /// [clamp] parameter is ignored by this stub implementation but subclasses /// like [ScrollPosition] handle it by adjusting [to] to prevent over or /// underscroll. - Future<void> moveTo(double to, { + Future<void> moveTo( + double to, { Duration duration, Curve curve, bool clamp, @@ -273,7 +275,8 @@ } @override - Future<void> animateTo(double to, { + Future<void> animateTo( + double to, { @required Duration duration, @required Curve curve, }) async { }
diff --git a/packages/flutter/lib/src/scheduler/binding.dart b/packages/flutter/lib/src/scheduler/binding.dart index 9a2679b8..773b790 100644 --- a/packages/flutter/lib/src/scheduler/binding.dart +++ b/packages/flutter/lib/src/scheduler/binding.dart
@@ -296,7 +296,9 @@ /// [Priority.animation] won't run (at least, not with the /// [defaultSchedulingStrategy]; this can be configured using /// [schedulingStrategy]). - Future<T> scheduleTask<T>(TaskCallback<T> task, Priority priority, { + Future<T> scheduleTask<T>( + TaskCallback<T> task, + Priority priority, { String debugLabel, Flow flow, }) {
diff --git a/packages/flutter/lib/src/semantics/semantics.dart b/packages/flutter/lib/src/semantics/semantics.dart index a585782..ee8478a 100644 --- a/packages/flutter/lib/src/semantics/semantics.dart +++ b/packages/flutter/lib/src/semantics/semantics.dart
@@ -2500,7 +2500,7 @@ /// /// If the given `action` requires arguments they need to be passed in via /// the `args` parameter. - void performAction(int id, SemanticsAction action, [dynamic args]) { + void performAction(int id, SemanticsAction action, [ dynamic args ]) { assert(action != null); final _SemanticsActionHandler handler = _getSemanticsActionHandlerForId(id, action); if (handler != null) { @@ -2550,7 +2550,7 @@ /// /// If the given `action` requires arguments they need to be passed in via /// the `args` parameter. - void performActionAt(Offset position, SemanticsAction action, [dynamic args]) { + void performActionAt(Offset position, SemanticsAction action, [ dynamic args ]) { assert(action != null); final SemanticsNode node = rootSemanticsNode; if (node == null)
diff --git a/packages/flutter/lib/src/services/message_codec.dart b/packages/flutter/lib/src/services/message_codec.dart index efe96b8..42bddff 100644 --- a/packages/flutter/lib/src/services/message_codec.dart +++ b/packages/flutter/lib/src/services/message_codec.dart
@@ -81,7 +81,7 @@ /// /// The specified error [code], human-readable error [message], and error /// [details] correspond to the fields of [PlatformException]. - ByteData encodeErrorEnvelope({@required String code, String message, dynamic details}); + ByteData encodeErrorEnvelope({ @required String code, String message, dynamic details }); }
diff --git a/packages/flutter/lib/src/services/message_codecs.dart b/packages/flutter/lib/src/services/message_codecs.dart index 64e74c4..8a658a4 100644 --- a/packages/flutter/lib/src/services/message_codecs.dart +++ b/packages/flutter/lib/src/services/message_codecs.dart
@@ -160,7 +160,7 @@ } @override - ByteData encodeErrorEnvelope({@required String code, String message, dynamic details}) { + ByteData encodeErrorEnvelope({ @required String code, String message, dynamic details }) { assert(code != null); return const JSONMessageCodec().encodeMessage(<dynamic>[code, message, details]); } @@ -540,7 +540,7 @@ } @override - ByteData encodeErrorEnvelope({@required String code, String message, dynamic details}) { + ByteData encodeErrorEnvelope({ @required String code, String message, dynamic details }) { final WriteBuffer buffer = WriteBuffer(); buffer.putUint8(1); messageCodec.writeValue(buffer, code);
diff --git a/packages/flutter/lib/src/services/platform_channel.dart b/packages/flutter/lib/src/services/platform_channel.dart index bf80a47..d5037bf 100644 --- a/packages/flutter/lib/src/services/platform_channel.dart +++ b/packages/flutter/lib/src/services/platform_channel.dart
@@ -290,7 +290,7 @@ /// * <https://docs.flutter.io/javadoc/io/flutter/plugin/common/MethodCall.html> /// for how to access method call arguments on Android. @optionalTypeArgs - Future<T> invokeMethod<T>(String method, [dynamic arguments]) async { + Future<T> invokeMethod<T>(String method, [ dynamic arguments ]) async { assert(method != null); final ByteData result = await BinaryMessages.send( name, @@ -312,7 +312,7 @@ /// See also: /// /// * [invokeMethod], which this call delegates to. - Future<List<T>> invokeListMethod<T>(String method, [dynamic arguments]) async { + Future<List<T>> invokeListMethod<T>(String method, [ dynamic arguments ]) async { final List<dynamic> result = await invokeMethod<List<dynamic>>(method, arguments); return result.cast<T>(); } @@ -326,7 +326,7 @@ /// See also: /// /// * [invokeMethod], which this call delegates to. - Future<Map<K, V>> invokeMapMethod<K, V>(String method, [dynamic arguments]) async { + Future<Map<K, V>> invokeMapMethod<K, V>(String method, [ dynamic arguments ]) async { final Map<dynamic, dynamic> result = await invokeMethod<Map<dynamic, dynamic>>(method, arguments); return result.cast<K, V>(); } @@ -405,7 +405,7 @@ : super(name, codec); @override - Future<T> invokeMethod<T>(String method, [dynamic arguments]) async { + Future<T> invokeMethod<T>(String method, [ dynamic arguments ]) async { try { final T result = await super.invokeMethod<T>(method, arguments); return result; @@ -415,13 +415,13 @@ } @override - Future<List<T>> invokeListMethod<T>(String method, [dynamic arguments]) async { + Future<List<T>> invokeListMethod<T>(String method, [ dynamic arguments ]) async { final List<dynamic> result = await invokeMethod<List<dynamic>>(method, arguments); return result.cast<T>(); } @override - Future<Map<K, V>> invokeMapMethod<K, V>(String method, [dynamic arguments]) async { + Future<Map<K, V>> invokeMapMethod<K, V>(String method, [ dynamic arguments ]) async { final Map<dynamic, dynamic> result = await invokeMethod<Map<dynamic, dynamic>>(method, arguments); return result.cast<K, V>(); } @@ -470,7 +470,7 @@ /// through the [FlutterError] facility. Stream activation happens only when /// stream listener count changes from 0 to 1. Stream deactivation happens /// only when stream listener count changes from 1 to 0. - Stream<dynamic> receiveBroadcastStream([dynamic arguments]) { + Stream<dynamic> receiveBroadcastStream([ dynamic arguments ]) { final MethodChannel methodChannel = MethodChannel(name, codec); StreamController<dynamic> controller; controller = StreamController<dynamic>.broadcast(onListen: () async {
diff --git a/packages/flutter/lib/src/services/platform_messages.dart b/packages/flutter/lib/src/services/platform_messages.dart index b1f7f88..5e83b91 100644 --- a/packages/flutter/lib/src/services/platform_messages.dart +++ b/packages/flutter/lib/src/services/platform_messages.dart
@@ -65,7 +65,10 @@ /// /// To register a handler for a given message channel, see [setMessageHandler]. static Future<void> handlePlatformMessage( - String channel, ByteData data, ui.PlatformMessageResponseCallback callback) async { + String channel, + ByteData data, + ui.PlatformMessageResponseCallback callback, + ) async { ByteData response; try { final _MessageHandler handler = _handlers[channel];
diff --git a/packages/flutter/lib/src/services/raw_keyboard.dart b/packages/flutter/lib/src/services/raw_keyboard.dart index af3b5d5..68740b1 100644 --- a/packages/flutter/lib/src/services/raw_keyboard.dart +++ b/packages/flutter/lib/src/services/raw_keyboard.dart
@@ -121,7 +121,7 @@ /// side of the keyboard. Defaults to checking for the key being down on /// either side of the keyboard. If there is only one instance of the key on /// the keyboard, then [side] is ignored. - bool isModifierPressed(ModifierKey key, {KeyboardSide side = KeyboardSide.any}); + bool isModifierPressed(ModifierKey key, { KeyboardSide side = KeyboardSide.any }); /// Returns a [KeyboardSide] enum value that describes which side or sides of /// the given keyboard modifier key were pressed at the time of this event.
diff --git a/packages/flutter/lib/src/services/raw_keyboard_android.dart b/packages/flutter/lib/src/services/raw_keyboard_android.dart index aed752b..2927501 100644 --- a/packages/flutter/lib/src/services/raw_keyboard_android.dart +++ b/packages/flutter/lib/src/services/raw_keyboard_android.dart
@@ -170,7 +170,7 @@ } @override - bool isModifierPressed(ModifierKey key, {KeyboardSide side = KeyboardSide.any}) { + bool isModifierPressed(ModifierKey key, { KeyboardSide side = KeyboardSide.any }) { assert(side != null); switch (key) { case ModifierKey.controlModifier:
diff --git a/packages/flutter/lib/src/services/raw_keyboard_fuschia.dart b/packages/flutter/lib/src/services/raw_keyboard_fuschia.dart index 1f7498b..2b23eb9 100644 --- a/packages/flutter/lib/src/services/raw_keyboard_fuschia.dart +++ b/packages/flutter/lib/src/services/raw_keyboard_fuschia.dart
@@ -111,7 +111,7 @@ } @override - bool isModifierPressed(ModifierKey key, {KeyboardSide side = KeyboardSide.any}) { + bool isModifierPressed(ModifierKey key, { KeyboardSide side = KeyboardSide.any }) { assert(side != null); switch (key) { case ModifierKey.controlModifier:
diff --git a/packages/flutter/lib/src/services/text_formatter.dart b/packages/flutter/lib/src/services/text_formatter.dart index cb9e4e1..5d5392d 100644 --- a/packages/flutter/lib/src/services/text_formatter.dart +++ b/packages/flutter/lib/src/services/text_formatter.dart
@@ -54,8 +54,8 @@ /// Function signature expected for creating custom [TextInputFormatter] /// shorthands via [TextInputFormatter.withFunction]; typedef TextInputFormatFunction = TextEditingValue Function( - TextEditingValue oldValue, - TextEditingValue newValue, + TextEditingValue oldValue, + TextEditingValue newValue, ); /// Wiring for [TextInputFormatter.withFunction].
diff --git a/packages/flutter/lib/src/widgets/animated_switcher.dart b/packages/flutter/lib/src/widgets/animated_switcher.dart index 45c1fbe..ea21fa8 100644 --- a/packages/flutter/lib/src/widgets/animated_switcher.dart +++ b/packages/flutter/lib/src/widgets/animated_switcher.dart
@@ -321,7 +321,7 @@ } } - void _addEntryForNewChild({@required bool animate}) { + void _addEntryForNewChild({ @required bool animate }) { assert(animate || _currentEntry == null); if (_currentEntry != null) { assert(animate);
diff --git a/packages/flutter/lib/src/widgets/binding.dart b/packages/flutter/lib/src/widgets/binding.dart index bbe9944..4674ab4 100644 --- a/packages/flutter/lib/src/widgets/binding.dart +++ b/packages/flutter/lib/src/widgets/binding.dart
@@ -839,7 +839,7 @@ /// the given element will have an update scheduled to switch to this widget. /// /// Used by [runApp] to bootstrap applications. - RenderObjectToWidgetElement<T> attachToRenderTree(BuildOwner owner, [RenderObjectToWidgetElement<T> element]) { + RenderObjectToWidgetElement<T> attachToRenderTree(BuildOwner owner, [ RenderObjectToWidgetElement<T> element ]) { if (element == null) { owner.lockState(() { element = createElement();
diff --git a/packages/flutter/lib/src/widgets/drag_target.dart b/packages/flutter/lib/src/widgets/drag_target.dart index 6112042..5059e3b 100644 --- a/packages/flutter/lib/src/widgets/drag_target.dart +++ b/packages/flutter/lib/src/widgets/drag_target.dart
@@ -678,7 +678,7 @@ _enteredTargets.clear(); } - void finishDrag(_DragEndKind endKind, [Velocity velocity]) { + void finishDrag(_DragEndKind endKind, [ Velocity velocity ]) { bool wasAccepted = false; if (endKind == _DragEndKind.dropped && _activeTarget != null) { _activeTarget.didDrop(this);
diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index e388b30..f3aa9be 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart
@@ -2223,7 +2223,7 @@ /// [debugPrintBuildScope] to true. This is useful when debugging problems /// involving widgets not getting marked dirty, or getting marked dirty too /// often. - void buildScope(Element context, [VoidCallback callback]) { + void buildScope(Element context, [ VoidCallback callback ]) { if (callback == null && _dirtyElements.isEmpty) return; assert(context != null); @@ -3689,7 +3689,7 @@ /// See also: /// /// * [WidgetBuilder], which is similar but only takes a [BuildContext]. -typedef ControlsWidgetBuilder = Widget Function(BuildContext context, {VoidCallback onStepContinue, VoidCallback onStepCancel}); +typedef ControlsWidgetBuilder = Widget Function(BuildContext context, { VoidCallback onStepContinue, VoidCallback onStepCancel }); /// An [Element] that composes other [Element]s. ///
diff --git a/packages/flutter/lib/src/widgets/icon_theme_data.dart b/packages/flutter/lib/src/widgets/icon_theme_data.dart index 61247ec..7a123f0 100644 --- a/packages/flutter/lib/src/widgets/icon_theme_data.dart +++ b/packages/flutter/lib/src/widgets/icon_theme_data.dart
@@ -32,7 +32,7 @@ /// Creates a copy of this icon theme but with the given fields replaced with /// the new values. - IconThemeData copyWith({Color color, double opacity, double size}) { + IconThemeData copyWith({ Color color, double opacity, double size }) { return IconThemeData( color: color ?? this.color, opacity: opacity ?? this.opacity,
diff --git a/packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart b/packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart index 2385cc8..c71246f 100644 --- a/packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart +++ b/packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart
@@ -254,7 +254,8 @@ /// The returned [Future] resolves when the animation completes. /// /// The `duration` and `curve` arguments must not be null. - Future<void> animateToItem(int itemIndex, { + Future<void> animateToItem( + int itemIndex, { @required Duration duration, @required Curve curve, }) async {
diff --git a/packages/flutter/lib/src/widgets/navigator.dart b/packages/flutter/lib/src/widgets/navigator.dart index a6b8457..6a86bdb 100644 --- a/packages/flutter/lib/src/widgets/navigator.dart +++ b/packages/flutter/lib/src/widgets/navigator.dart
@@ -1438,9 +1438,9 @@ /// instances of [Navigator]. static NavigatorState of( BuildContext context, { - bool rootNavigator = false, - bool nullOk = false, - }) { + bool rootNavigator = false, + bool nullOk = false, + }) { final NavigatorState navigator = rootNavigator ? context.rootAncestorStateOfType(const TypeMatcher<NavigatorState>()) : context.ancestorStateOfType(const TypeMatcher<NavigatorState>());
diff --git a/packages/flutter/lib/src/widgets/nested_scroll_view.dart b/packages/flutter/lib/src/widgets/nested_scroll_view.dart index 839cbe4..4dc7cdc 100644 --- a/packages/flutter/lib/src/widgets/nested_scroll_view.dart +++ b/packages/flutter/lib/src/widgets/nested_scroll_view.dart
@@ -713,7 +713,8 @@ _outerPosition.updateCanDrag(maxInnerExtent); } - Future<void> animateTo(double to, { + Future<void> animateTo( + double to, { @required Duration duration, @required Curve curve, }) async { @@ -1057,7 +1058,8 @@ )); } - ScrollActivity createBallisticScrollActivity(Simulation simulation, { + ScrollActivity createBallisticScrollActivity( + Simulation simulation, { @required _NestedBallisticScrollActivityMode mode, _NestedScrollMetrics metrics, }) { @@ -1079,7 +1081,8 @@ } @override - Future<void> animateTo(double to, { + Future<void> animateTo( + double to, { @required Duration duration, @required Curve curve, }) {
diff --git a/packages/flutter/lib/src/widgets/page_view.dart b/packages/flutter/lib/src/widgets/page_view.dart index d4509b1..9f8256d 100644 --- a/packages/flutter/lib/src/widgets/page_view.dart +++ b/packages/flutter/lib/src/widgets/page_view.dart
@@ -112,7 +112,8 @@ /// The returned [Future] resolves when the animation completes. /// /// The `duration` and `curve` arguments must not be null. - Future<void> animateToPage(int page, { + Future<void> animateToPage( + int page, { @required Duration duration, @required Curve curve, }) {
diff --git a/packages/flutter/lib/src/widgets/routes.dart b/packages/flutter/lib/src/widgets/routes.dart index cf00273..2ab046f 100644 --- a/packages/flutter/lib/src/widgets/routes.dart +++ b/packages/flutter/lib/src/widgets/routes.dart
@@ -883,10 +883,10 @@ /// * [buildPage], which is used to describe the actual contents of the page, /// and whose result is passed to the `child` argument of this method. Widget buildTransitions( - BuildContext context, - Animation<double> animation, - Animation<double> secondaryAnimation, - Widget child, + BuildContext context, + Animation<double> animation, + Animation<double> secondaryAnimation, + Widget child, ) { return child; }
diff --git a/packages/flutter/lib/src/widgets/scroll_controller.dart b/packages/flutter/lib/src/widgets/scroll_controller.dart index 8b1ca31..59c6724 100644 --- a/packages/flutter/lib/src/widgets/scroll_controller.dart +++ b/packages/flutter/lib/src/widgets/scroll_controller.dart
@@ -142,7 +142,8 @@ /// /// The duration must not be zero. To jump to a particular value without an /// animation, use [jumpTo]. - Future<void> animateTo(double offset, { + Future<void> animateTo( + double offset, { @required Duration duration, @required Curve curve, }) {
diff --git a/packages/flutter/lib/src/widgets/scroll_position.dart b/packages/flutter/lib/src/widgets/scroll_position.dart index 0b294f6..bf6661c 100644 --- a/packages/flutter/lib/src/widgets/scroll_position.dart +++ b/packages/flutter/lib/src/widgets/scroll_position.dart
@@ -488,7 +488,8 @@ /// Animates the position such that the given object is as visible as possible /// by just scrolling this position. - Future<void> ensureVisible(RenderObject object, { + Future<void> ensureVisible( + RenderObject object, { double alignment = 0.0, Duration duration = Duration.zero, Curve curve = Curves.ease, @@ -545,7 +546,8 @@ /// /// The animation is typically handled by an [DrivenScrollActivity]. @override - Future<void> animateTo(double to, { + Future<void> animateTo( + double to, { @required Duration duration, @required Curve curve, }); @@ -570,7 +572,8 @@ /// /// If [animateTo] is called then [curve] defaults to [Curves.ease]. @override - Future<void> moveTo(double to, { + Future<void> moveTo( + double to, { Duration duration, Curve curve, bool clamp = true,
diff --git a/packages/flutter/lib/src/widgets/scroll_position_with_single_context.dart b/packages/flutter/lib/src/widgets/scroll_position_with_single_context.dart index 68c36b7..6c39b2b 100644 --- a/packages/flutter/lib/src/widgets/scroll_position_with_single_context.dart +++ b/packages/flutter/lib/src/widgets/scroll_position_with_single_context.dart
@@ -170,7 +170,8 @@ } @override - Future<void> animateTo(double to, { + Future<void> animateTo( + double to, { @required Duration duration, @required Curve curve, }) {
diff --git a/packages/flutter/lib/src/widgets/scrollable.dart b/packages/flutter/lib/src/widgets/scrollable.dart index f0f723d..eeabba0 100644 --- a/packages/flutter/lib/src/widgets/scrollable.dart +++ b/packages/flutter/lib/src/widgets/scrollable.dart
@@ -231,7 +231,8 @@ /// Scrolls the scrollables that enclose the given context so as to make the /// given context visible. - static Future<void> ensureVisible(BuildContext context, { + static Future<void> ensureVisible( + BuildContext context, { double alignment = 0.0, Duration duration = Duration.zero, Curve curve = Curves.ease,
diff --git a/packages/flutter/lib/src/widgets/single_child_scroll_view.dart b/packages/flutter/lib/src/widgets/single_child_scroll_view.dart index 4f9419f..65b59bd 100644 --- a/packages/flutter/lib/src/widgets/single_child_scroll_view.dart +++ b/packages/flutter/lib/src/widgets/single_child_scroll_view.dart
@@ -564,7 +564,7 @@ } @override - RevealedOffset getOffsetToReveal(RenderObject target, double alignment, {Rect rect}) { + RevealedOffset getOffsetToReveal(RenderObject target, double alignment, { Rect rect }) { rect ??= target.paintBounds; if (target is! RenderBox) return RevealedOffset(offset: offset.pixels, rect: rect);
diff --git a/packages/flutter/lib/src/widgets/sliver.dart b/packages/flutter/lib/src/widgets/sliver.dart index 4f51d41..8bbe840 100644 --- a/packages/flutter/lib/src/widgets/sliver.dart +++ b/packages/flutter/lib/src/widgets/sliver.dart
@@ -1081,7 +1081,8 @@ } @override - double estimateMaxScrollOffset(SliverConstraints constraints, { + double estimateMaxScrollOffset( + SliverConstraints constraints, { int firstIndex, int lastIndex, double leadingScrollOffset,
diff --git a/packages/flutter/lib/src/widgets/text_selection.dart b/packages/flutter/lib/src/widgets/text_selection.dart index 0351213..40c39c7 100644 --- a/packages/flutter/lib/src/widgets/text_selection.dart +++ b/packages/flutter/lib/src/widgets/text_selection.dart
@@ -348,7 +348,7 @@ _markNeedsBuild(); } - void _markNeedsBuild([Duration duration]) { + void _markNeedsBuild([ Duration duration ]) { if (_handles != null) { _handles[0].markNeedsBuild(); _handles[1].markNeedsBuild();
diff --git a/packages/flutter/lib/src/widgets/widget_inspector.dart b/packages/flutter/lib/src/widgets/widget_inspector.dart index ffe9b3a..01b7bc6 100644 --- a/packages/flutter/lib/src/widgets/widget_inspector.dart +++ b/packages/flutter/lib/src/widgets/widget_inspector.dart
@@ -55,7 +55,7 @@ final Layer _layer; @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { return _layer.addToScene(builder, layerOffset); } @@ -79,19 +79,19 @@ final Canvas _screenshot; @override - void clipPath(Path path, {bool doAntiAlias = true}) { + void clipPath(Path path, { bool doAntiAlias = true }) { _main.clipPath(path, doAntiAlias: doAntiAlias); _screenshot.clipPath(path, doAntiAlias: doAntiAlias); } @override - void clipRRect(RRect rrect, {bool doAntiAlias = true}) { + void clipRRect(RRect rrect, { bool doAntiAlias = true }) { _main.clipRRect(rrect, doAntiAlias: doAntiAlias); _screenshot.clipRRect(rrect, doAntiAlias: doAntiAlias); } @override - void clipRect(Rect rect, {ui.ClipOp clipOp = ui.ClipOp.intersect, bool doAntiAlias = true}) { + void clipRect(Rect rect, { ui.ClipOp clipOp = ui.ClipOp.intersect, bool doAntiAlias = true }) { _main.clipRect(rect, clipOp: clipOp, doAntiAlias: doAntiAlias); _screenshot.clipRect(rect, clipOp: clipOp, doAntiAlias: doAntiAlias); } @@ -256,7 +256,7 @@ } @override - void scale(double sx, [double sy]) { + void scale(double sx, [ double sy ]) { _main.scale(sx, sy); _screenshot.scale(sx, sy); } @@ -313,7 +313,7 @@ /// screenshots render to the scene in the local coordinate system of the layer. class _ScreenshotContainerLayer extends OffsetLayer { @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { addChildrenToScene(builder, layerOffset); return null; // this does not have an engine layer. } @@ -630,7 +630,8 @@ final int childIndex; } -List<_DiagnosticsPathNode> _followDiagnosticableChain(List<Diagnosticable> chain, { +List<_DiagnosticsPathNode> _followDiagnosticableChain( + List<Diagnosticable> chain, { String name, DiagnosticsTreeStyle style, }) { @@ -968,8 +969,7 @@ /// * <https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#rpcs-requests-and-responses> /// * [BindingBase.initServiceExtensions], which explains when service /// extensions can be used. - void initServiceExtensions( - _RegisterServiceExtensionCallback registerServiceExtensionCallback) { + void initServiceExtensions(_RegisterServiceExtensionCallback registerServiceExtensionCallback) { _registerServiceExtensionCallback = registerServiceExtensionCallback; assert(!_debugServiceExtensionsRegistered); assert(() { _debugServiceExtensionsRegistered = true; return true; }()); @@ -1220,7 +1220,7 @@ /// Returns whether the application has rendered its first frame and it is /// appropriate to display the Widget tree in the inspector. @protected - bool isWidgetTreeReady([String groupName]) { + bool isWidgetTreeReady([ String groupName ]) { return WidgetsBinding.instance != null && WidgetsBinding.instance.debugDidSendFirstFrameEvent; } @@ -1231,7 +1231,7 @@ /// API surface of the methods in this class called from the Flutter IntelliJ /// Plugin. @protected - Object toObject(String id, [String groupName]) { + Object toObject(String id, [ String groupName ]) { if (id == null) return null; @@ -1252,7 +1252,7 @@ /// The `groupName` parameter is not required by is added to regularize the /// API surface of methods called from the Flutter IntelliJ Plugin. @protected - Object toObjectForSourceLocation(String id, [String groupName]) { + Object toObjectForSourceLocation(String id, [ String groupName ]) { final Object object = toObject(id); if (object is Element) { return object.widget; @@ -1298,7 +1298,7 @@ /// The `groupName` parameter is not required by is added to regularize the /// API surface of methods called from the Flutter IntelliJ Plugin. @protected - bool setSelectionById(String id, [String groupName]) { + bool setSelectionById(String id, [ String groupName ]) { return setSelection(toObject(id), groupName); } @@ -1310,7 +1310,7 @@ /// The `groupName` parameter is not needed but is specified to regularize the /// API surface of methods called from the Flutter IntelliJ Plugin. @protected - bool setSelection(Object object, [String groupName]) { + bool setSelection(Object object, [ String groupName ]) { if (object is Element || object is RenderObject) { if (object is Element) { if (object == selection.currentElement) { @@ -1376,7 +1376,7 @@ }; } - List<Element> _getRawElementParentChain(Element element, {int numLocalParents}) { + List<Element> _getRawElementParentChain(Element element, { int numLocalParents }) { List<Element> elements = element?.debugGetDiagnosticChain(); if (numLocalParents != null) { for (int i = 0; i < elements.length; i += 1) { @@ -1392,13 +1392,13 @@ return elements?.reversed?.toList(); } - List<_DiagnosticsPathNode> _getElementParentChain(Element element, String groupName, {int numLocalParents}) { + List<_DiagnosticsPathNode> _getElementParentChain(Element element, String groupName, { int numLocalParents }) { return _followDiagnosticableChain( _getRawElementParentChain(element, numLocalParents: numLocalParents), ) ?? const <_DiagnosticsPathNode>[]; } - List<_DiagnosticsPathNode> _getRenderObjectParentChain(RenderObject renderObject, String groupName, {int maxparents}) { + List<_DiagnosticsPathNode> _getRenderObjectParentChain(RenderObject renderObject, String groupName, { int maxparents }) { final List<RenderObject> chain = <RenderObject>[]; while (renderObject != null) { chain.add(renderObject); @@ -2583,7 +2583,7 @@ double _textPainterMaxWidth; @override - ui.EngineLayer addToScene(ui.SceneBuilder builder, [Offset layerOffset = Offset.zero]) { + ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { if (!selection.active) return null;
diff --git a/packages/flutter/test/cupertino/date_picker_test.dart b/packages/flutter/test/cupertino/date_picker_test.dart index 652b09d..e43337c 100644 --- a/packages/flutter/test/cupertino/date_picker_test.dart +++ b/packages/flutter/test/cupertino/date_picker_test.dart
@@ -811,7 +811,7 @@ }); } -Widget _buildPicker({FixedExtentScrollController controller, ValueChanged<int> onSelectedItemChanged}) { +Widget _buildPicker({ FixedExtentScrollController controller, ValueChanged<int> onSelectedItemChanged }) { return Directionality( textDirection: TextDirection.ltr, child: CupertinoPicker(
diff --git a/packages/flutter/test/cupertino/dialog_test.dart b/packages/flutter/test/cupertino/dialog_test.dart index 52dcd34..8050b97 100644 --- a/packages/flutter/test/cupertino/dialog_test.dart +++ b/packages/flutter/test/cupertino/dialog_test.dart
@@ -991,7 +991,7 @@ return actionsSection; } -Widget createAppWithButtonThatLaunchesDialog({WidgetBuilder dialogBuilder}) { +Widget createAppWithButtonThatLaunchesDialog({ WidgetBuilder dialogBuilder }) { return MaterialApp( home: Material( child: Center(
diff --git a/packages/flutter/test/cupertino/refresh_test.dart b/packages/flutter/test/cupertino/refresh_test.dart index fff138f..590ad57 100644 --- a/packages/flutter/test/cupertino/refresh_test.dart +++ b/packages/flutter/test/cupertino/refresh_test.dart
@@ -21,12 +21,13 @@ /// These two Functions are required to avoid tearing off of the MockHelper object, /// which is not supported when using Dart 2 runtime semantics. - final Function builder = (BuildContext context, RefreshIndicatorMode refreshState, - double pulledExtent, - double refreshTriggerPullDistance, - double refreshIndicatorExtent) => - mockHelper.builder(context, refreshState, pulledExtent, refreshTriggerPullDistance, - refreshIndicatorExtent); + final Function builder = ( + BuildContext context, + RefreshIndicatorMode refreshState, + double pulledExtent, + double refreshTriggerPullDistance, + double refreshIndicatorExtent, + ) => mockHelper.builder(context, refreshState, pulledExtent, refreshTriggerPullDistance, refreshIndicatorExtent); final Function onRefresh = () => mockHelper.refreshTask();
diff --git a/packages/flutter/test/cupertino/segmented_control_test.dart b/packages/flutter/test/cupertino/segmented_control_test.dart index 9355a56..78827ad 100644 --- a/packages/flutter/test/cupertino/segmented_control_test.dart +++ b/packages/flutter/test/cupertino/segmented_control_test.dart
@@ -41,7 +41,7 @@ ); } -Widget boilerplate({Widget child}) { +Widget boilerplate({ Widget child }) { return Directionality( textDirection: TextDirection.ltr, child: Center(child: child),
diff --git a/packages/flutter/test/foundation/capture_output.dart b/packages/flutter/test/foundation/capture_output.dart index de4f514..8bd3bef 100644 --- a/packages/flutter/test/foundation/capture_output.dart +++ b/packages/flutter/test/foundation/capture_output.dart
@@ -9,12 +9,14 @@ final List<String> log = <String>[]; runZoned<void>(fn, zoneSpecification: ZoneSpecification( - print: (Zone self, - ZoneDelegate parent, - Zone zone, - String line) { - log.add(line); - }, + print: ( + Zone self, + ZoneDelegate parent, + Zone zone, + String line, + ) { + log.add(line); + }, )); return log;
diff --git a/packages/flutter/test/foundation/debug_test.dart b/packages/flutter/test/foundation/debug_test.dart index faddcce..c8a31dc 100644 --- a/packages/flutter/test/foundation/debug_test.dart +++ b/packages/flutter/test/foundation/debug_test.dart
@@ -14,7 +14,7 @@ debugInstrumentationEnabled = true; printBuffer = StringBuffer(); originalDebugPrintCallback = debugPrint; - debugPrint = (String message, {int wrapWidth}) { + debugPrint = (String message, { int wrapWidth }) { printBuffer.writeln(message); }; });
diff --git a/packages/flutter/test/foundation/diagnostics_test.dart b/packages/flutter/test/foundation/diagnostics_test.dart index e49b0c5..44d2c36 100644 --- a/packages/flutter/test/foundation/diagnostics_test.dart +++ b/packages/flutter/test/foundation/diagnostics_test.dart
@@ -180,10 +180,12 @@ void main() { test('TreeDiagnosticsMixin control test', () async { - void goldenStyleTest(String description, - {DiagnosticsTreeStyle style, - DiagnosticsTreeStyle lastChildStyle, - String golden = ''}) { + void goldenStyleTest( + String description, { + DiagnosticsTreeStyle style, + DiagnosticsTreeStyle lastChildStyle, + String golden = '', + }) { final TestTree tree = TestTree(children: <TestTree>[ TestTree(name: 'node A', style: style), TestTree( @@ -315,7 +317,8 @@ }); test('TreeDiagnosticsMixin tree with properties test', () async { - void goldenStyleTest(String description, { + void goldenStyleTest( + String description, { DiagnosticsTreeStyle style, DiagnosticsTreeStyle lastChildStyle, @required String golden,
diff --git a/packages/flutter/test/material/chip_test.dart b/packages/flutter/test/material/chip_test.dart index f0bdf11..07f220e 100644 --- a/packages/flutter/test/material/chip_test.dart +++ b/packages/flutter/test/material/chip_test.dart
@@ -554,7 +554,7 @@ testWidgets('Avatar drawer works as expected on RawChip', (WidgetTester tester) async { final GlobalKey labelKey = GlobalKey(); - Future<void> pushChip({Widget avatar}) async { + Future<void> pushChip({ Widget avatar }) async { return tester.pumpWidget( _wrapForChip( child: Wrap( @@ -668,7 +668,7 @@ final UniqueKey labelKey = UniqueKey(); final UniqueKey deleteButtonKey = UniqueKey(); bool wasDeleted = false; - Future<void> pushChip({bool deletable = false}) async { + Future<void> pushChip({ bool deletable = false }) async { return tester.pumpWidget( _wrapForChip( child: Wrap( @@ -783,7 +783,7 @@ testWidgets('Selection with avatar works as expected on RawChip', (WidgetTester tester) async { bool selected = false; final UniqueKey labelKey = UniqueKey(); - Future<void> pushChip({Widget avatar, bool selectable = false}) async { + Future<void> pushChip({ Widget avatar, bool selectable = false }) async { return tester.pumpWidget( _wrapForChip( child: Wrap( @@ -866,7 +866,7 @@ testWidgets('Selection without avatar works as expected on RawChip', (WidgetTester tester) async { bool selected = false; final UniqueKey labelKey = UniqueKey(); - Future<void> pushChip({bool selectable = false}) async { + Future<void> pushChip({ bool selectable = false }) async { return tester.pumpWidget( _wrapForChip( child: Wrap( @@ -942,7 +942,7 @@ testWidgets('Activation works as expected on RawChip', (WidgetTester tester) async { bool selected = false; final UniqueKey labelKey = UniqueKey(); - Future<void> pushChip({Widget avatar, bool selectable = false}) async { + Future<void> pushChip({ Widget avatar, bool selectable = false }) async { return tester.pumpWidget( _wrapForChip( child: Wrap(
diff --git a/packages/flutter/test/material/dialog_test.dart b/packages/flutter/test/material/dialog_test.dart index 1bf4f3f..28adf61 100644 --- a/packages/flutter/test/material/dialog_test.dart +++ b/packages/flutter/test/material/dialog_test.dart
@@ -11,7 +11,7 @@ import '../widgets/semantics_tester.dart'; -MaterialApp _appWithAlertDialog(WidgetTester tester, AlertDialog dialog, {ThemeData theme}) { +MaterialApp _appWithAlertDialog(WidgetTester tester, AlertDialog dialog, { ThemeData theme }) { return MaterialApp( theme: theme, home: Material(
diff --git a/packages/flutter/test/material/dialog_theme_test.dart b/packages/flutter/test/material/dialog_theme_test.dart index c0214c9..bddbe9e 100644 --- a/packages/flutter/test/material/dialog_theme_test.dart +++ b/packages/flutter/test/material/dialog_theme_test.dart
@@ -8,7 +8,7 @@ import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; -MaterialApp _appWithAlertDialog(WidgetTester tester, AlertDialog dialog, {ThemeData theme}) { +MaterialApp _appWithAlertDialog(WidgetTester tester, AlertDialog dialog, { ThemeData theme }) { return MaterialApp( theme: theme, home: Material(
diff --git a/packages/flutter/test/material/dropdown_test.dart b/packages/flutter/test/material/dropdown_test.dart index 1e631cd..bdd074f 100644 --- a/packages/flutter/test/material/dropdown_test.dart +++ b/packages/flutter/test/material/dropdown_test.dart
@@ -855,7 +855,7 @@ testWidgets('disabledHint displays on empty items or onChanged', (WidgetTester tester) async { final Key buttonKey = UniqueKey(); - Widget build({List<String> items, ValueChanged<String> onChanged}) => buildFrame( + Widget build({ List<String> items, ValueChanged<String> onChanged }) => buildFrame( items: items, onChanged: onChanged, buttonKey: buttonKey, value: null,
diff --git a/packages/flutter/test/material/material_test.dart b/packages/flutter/test/material/material_test.dart index 2496f1b..282f0be 100644 --- a/packages/flutter/test/material/material_test.dart +++ b/packages/flutter/test/material/material_test.dart
@@ -20,8 +20,10 @@ } } -Widget buildMaterial( - {double elevation = 0.0, Color shadowColor = const Color(0xFF00FF00)}) { +Widget buildMaterial({ + double elevation = 0.0, + Color shadowColor = const Color(0xFF00FF00), +}) { return Center( child: SizedBox( height: 100.0,
diff --git a/packages/flutter/test/material/outline_button_test.dart b/packages/flutter/test/material/outline_button_test.dart index e15d6f72..75debbf 100644 --- a/packages/flutter/test/material/outline_button_test.dart +++ b/packages/flutter/test/material/outline_button_test.dart
@@ -70,7 +70,7 @@ const Color disabledBorderColor = Color(0xFFFF00FF); const double borderWidth = 4.0; - Widget buildFrame({VoidCallback onPressed}) { + Widget buildFrame({ VoidCallback onPressed }) { return Directionality( textDirection: TextDirection.ltr, child: Theme(
diff --git a/packages/flutter/test/material/reorderable_list_test.dart b/packages/flutter/test/material/reorderable_list_test.dart index 1e76682..646bec1 100644 --- a/packages/flutter/test/material/reorderable_list_test.dart +++ b/packages/flutter/test/material/reorderable_list_test.dart
@@ -30,7 +30,7 @@ ); } - Widget build({Widget header, Axis scrollDirection = Axis.vertical, TextDirection textDirection = TextDirection.ltr}) { + Widget build({ Widget header, Axis scrollDirection = Axis.vertical, TextDirection textDirection = TextDirection.ltr }) { return MaterialApp( home: Directionality( textDirection: textDirection,
diff --git a/packages/flutter/test/material/search_test.dart b/packages/flutter/test/material/search_test.dart index 9f2454b..afaefbb 100644 --- a/packages/flutter/test/material/search_test.dart +++ b/packages/flutter/test/material/search_test.dart
@@ -482,7 +482,7 @@ }); group('contributes semantics', () { - TestSemantics buildExpected({String routeName}) { + TestSemantics buildExpected({ String routeName }) { return TestSemantics.root( children: <TestSemantics>[ TestSemantics(
diff --git a/packages/flutter/test/material/slider_test.dart b/packages/flutter/test/material/slider_test.dart index 49cd304..19f4d0b 100644 --- a/packages/flutter/test/material/slider_test.dart +++ b/packages/flutter/test/material/slider_test.dart
@@ -1256,7 +1256,7 @@ ); SliderThemeData theme = baseTheme.sliderTheme; double value = 0.45; - Widget buildApp({SliderThemeData sliderTheme, int divisions, bool enabled = true}) { + Widget buildApp({ SliderThemeData sliderTheme, int divisions, bool enabled = true }) { final ValueChanged<double> onChanged = enabled ? (double d) => value = d : null; return Directionality( textDirection: TextDirection.ltr,
diff --git a/packages/flutter/test/material/slider_theme_test.dart b/packages/flutter/test/material/slider_theme_test.dart index 74c93da..edae4e3 100644 --- a/packages/flutter/test/material/slider_theme_test.dart +++ b/packages/flutter/test/material/slider_theme_test.dart
@@ -284,7 +284,7 @@ primarySwatch: Colors.blue, ); final SliderThemeData sliderTheme = theme.sliderTheme.copyWith(thumbColor: Colors.red.shade500, showValueIndicator: ShowValueIndicator.always); - Widget buildApp(String value, {double sliderValue = 0.5, double textScale = 1.0}) { + Widget buildApp(String value, { double sliderValue = 0.5, double textScale = 1.0 }) { return Directionality( textDirection: TextDirection.ltr, child: MediaQuery(
diff --git a/packages/flutter/test/material/snack_bar_test.dart b/packages/flutter/test/material/snack_bar_test.dart index 38e403e..1a719bf 100644 --- a/packages/flutter/test/material/snack_bar_test.dart +++ b/packages/flutter/test/material/snack_bar_test.dart
@@ -659,7 +659,7 @@ }); testWidgets('SnackBar handles updates to accessibleNavigation', (WidgetTester tester) async { - Future<void> boilerplate({bool accessibleNavigation}) { + Future<void> boilerplate({ bool accessibleNavigation }) { return tester.pumpWidget(MaterialApp( home: MediaQuery( data: MediaQueryData(accessibleNavigation: accessibleNavigation),
diff --git a/packages/flutter/test/material/stepper_test.dart b/packages/flutter/test/material/stepper_test.dart index 81e9ca7..16629b4 100644 --- a/packages/flutter/test/material/stepper_test.dart +++ b/packages/flutter/test/material/stepper_test.dart
@@ -380,7 +380,7 @@ } final ControlsWidgetBuilder builder = - (BuildContext context, {VoidCallback onStepContinue, VoidCallback onStepCancel}) { + (BuildContext context, { VoidCallback onStepContinue, VoidCallback onStepCancel }) { return Container( margin: const EdgeInsets.only(top: 16.0), child: ConstrainedBox(
diff --git a/packages/flutter/test/material/tabs_test.dart b/packages/flutter/test/material/tabs_test.dart index 02063e0..83a7f4e 100644 --- a/packages/flutter/test/material/tabs_test.dart +++ b/packages/flutter/test/material/tabs_test.dart
@@ -66,12 +66,12 @@ } Widget buildFrame({ - Key tabBarKey, - List<String> tabs, - String value, - bool isScrollable = false, - Color indicatorColor, - }) { + Key tabBarKey, + List<String> tabs, + String value, + bool isScrollable = false, + Color indicatorColor, +}) { return boilerplate( child: DefaultTabController( initialIndex: tabs.indexOf(value),
diff --git a/packages/flutter/test/material/text_field_test.dart b/packages/flutter/test/material/text_field_test.dart index 3821f0e..9f49c7a 100644 --- a/packages/flutter/test/material/text_field_test.dart +++ b/packages/flutter/test/material/text_field_test.dart
@@ -2050,7 +2050,7 @@ home: Material( child: Center( child: TextField( - buildCounter: (BuildContext context, {int currentLength, int maxLength, bool isFocused}) { + buildCounter: (BuildContext context, { int currentLength, int maxLength, bool isFocused }) { return Text('${currentLength.toString()} of ${maxLength.toString()}'); }, maxLength: 10,
diff --git a/packages/flutter/test/material/text_form_field_test.dart b/packages/flutter/test/material/text_form_field_test.dart index 190486b..d6871bd 100644 --- a/packages/flutter/test/material/text_form_field_test.dart +++ b/packages/flutter/test/material/text_form_field_test.dart
@@ -196,7 +196,7 @@ home: Material( child: Center( child: TextFormField( - buildCounter: (BuildContext context, {int currentLength, int maxLength, bool isFocused}) { + buildCounter: (BuildContext context, { int currentLength, int maxLength, bool isFocused }) { return Text('${currentLength.toString()} of ${maxLength.toString()}'); }, maxLength: 10,
diff --git a/packages/flutter/test/material/theme_test.dart b/packages/flutter/test/material/theme_test.dart index 7d58fab..739edc2 100644 --- a/packages/flutter/test/material/theme_test.dart +++ b/packages/flutter/test/material/theme_test.dart
@@ -686,11 +686,11 @@ @override List<Shadow> get shadows => _delegate.shadows; @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.debug}) => + String toString({ DiagnosticLevel minLevel = DiagnosticLevel.debug }) => super.toString(); @override - DiagnosticsNode toDiagnosticsNode({String name, DiagnosticsTreeStyle style}) { + DiagnosticsNode toDiagnosticsNode({ String name, DiagnosticsTreeStyle style }) { throw UnimplementedError(); } @@ -700,7 +700,7 @@ } @override - TextStyle apply({Color color, TextDecoration decoration, Color decorationColor, TextDecorationStyle decorationStyle, String fontFamily, List<String> fontFamilyFallback, double fontSizeFactor = 1.0, double fontSizeDelta = 0.0, int fontWeightDelta = 0, double letterSpacingFactor = 1.0, double letterSpacingDelta = 0.0, double wordSpacingFactor = 1.0, double wordSpacingDelta = 0.0, double heightFactor = 1.0, double heightDelta = 0.0}) { + TextStyle apply({ Color color, TextDecoration decoration, Color decorationColor, TextDecorationStyle decorationStyle, String fontFamily, List<String> fontFamilyFallback, double fontSizeFactor = 1.0, double fontSizeDelta = 0.0, int fontWeightDelta = 0, double letterSpacingFactor = 1.0, double letterSpacingDelta = 0.0, double wordSpacingFactor = 1.0, double wordSpacingDelta = 0.0, double heightFactor = 1.0, double heightDelta = 0.0 }) { throw UnimplementedError(); } @@ -710,22 +710,22 @@ } @override - TextStyle copyWith({Color color, String fontFamily, List<String> fontFamilyFallback, double fontSize, FontWeight fontWeight, FontStyle fontStyle, double letterSpacing, double wordSpacing, TextBaseline textBaseline, double height, Locale locale, ui.Paint foreground, ui.Paint background, List<Shadow> shadows, TextDecoration decoration, Color decorationColor, TextDecorationStyle decorationStyle, String debugLabel}) { + TextStyle copyWith({ Color color, String fontFamily, List<String> fontFamilyFallback, double fontSize, FontWeight fontWeight, FontStyle fontStyle, double letterSpacing, double wordSpacing, TextBaseline textBaseline, double height, Locale locale, ui.Paint foreground, ui.Paint background, List<Shadow> shadows, TextDecoration decoration, Color decorationColor, TextDecorationStyle decorationStyle, String debugLabel }) { throw UnimplementedError(); } @override - void debugFillProperties(DiagnosticPropertiesBuilder properties, {String prefix = ''}) { + void debugFillProperties(DiagnosticPropertiesBuilder properties, { String prefix = '' }) { throw UnimplementedError(); } @override - ui.ParagraphStyle getParagraphStyle({TextAlign textAlign, TextDirection textDirection, double textScaleFactor = 1.0, String ellipsis, int maxLines, Locale locale, String fontFamily, double fontSize, FontWeight fontWeight, FontStyle fontStyle, double height, StrutStyle strutStyle}) { + ui.ParagraphStyle getParagraphStyle({ TextAlign textAlign, TextDirection textDirection, double textScaleFactor = 1.0, String ellipsis, int maxLines, Locale locale, String fontFamily, double fontSize, FontWeight fontWeight, FontStyle fontStyle, double height, StrutStyle strutStyle }) { throw UnimplementedError(); } @override - ui.TextStyle getTextStyle({double textScaleFactor = 1.0}) { + ui.TextStyle getTextStyle({ double textScaleFactor = 1.0 }) { throw UnimplementedError(); }
diff --git a/packages/flutter/test/material/time_picker_test.dart b/packages/flutter/test/material/time_picker_test.dart index 520884e..55a9cea 100644 --- a/packages/flutter/test/material/time_picker_test.dart +++ b/packages/flutter/test/material/time_picker_test.dart
@@ -223,8 +223,11 @@ const List<String> labels12To11TwoDigit = <String>['12', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11']; const List<String> labels00To23 = <String>['00', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23']; - Future<void> mediaQueryBoilerplate(WidgetTester tester, bool alwaysUse24HourFormat, - { TimeOfDay initialTime = const TimeOfDay(hour: 7, minute: 0) }) async { + Future<void> mediaQueryBoilerplate( + WidgetTester tester, + bool alwaysUse24HourFormat, { + TimeOfDay initialTime = const TimeOfDay(hour: 7, minute: 0), + }) async { await tester.pumpWidget( Localizations( locale: const Locale('en', 'US'),
diff --git a/packages/flutter/test/material/user_accounts_drawer_header_test.dart b/packages/flutter/test/material/user_accounts_drawer_header_test.dart index 58b6b74..c563272 100644 --- a/packages/flutter/test/material/user_accounts_drawer_header_test.dart +++ b/packages/flutter/test/material/user_accounts_drawer_header_test.dart
@@ -12,7 +12,8 @@ const Key avatarC = Key('C'); const Key avatarD = Key('D'); -Future<void> pumpTestWidget(WidgetTester tester, { +Future<void> pumpTestWidget( + WidgetTester tester, { bool withName = true, bool withEmail = true, bool withOnDetailsPressedHandler = true,
diff --git a/packages/flutter/test/painting/decoration_test.dart b/packages/flutter/test/painting/decoration_test.dart index 7a7b0a3..7583358 100644 --- a/packages/flutter/test/painting/decoration_test.dart +++ b/packages/flutter/test/painting/decoration_test.dart
@@ -85,7 +85,7 @@ void dispose() { } @override - Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { + Future<ByteData> toByteData({ ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba }) async { throw UnsupportedError('Cannot encode test image'); } } @@ -150,7 +150,7 @@ // Regression test for https://github.com/flutter/flutter/issues/7289. // A reference test would be better. test('BoxDecoration backgroundImage clip', () { - void testDecoration({ BoxShape shape = BoxShape.rectangle, BorderRadius borderRadius, bool expectClip}) { + void testDecoration({ BoxShape shape = BoxShape.rectangle, BorderRadius borderRadius, bool expectClip }) { assert(shape != null); FakeAsync().run((FakeAsync async) { final DelayedImageProvider imageProvider = DelayedImageProvider();
diff --git a/packages/flutter/test/painting/image_resolution_test.dart b/packages/flutter/test/painting/image_resolution_test.dart index 75a62c7..606e473 100644 --- a/packages/flutter/test/painting/image_resolution_test.dart +++ b/packages/flutter/test/painting/image_resolution_test.dart
@@ -167,14 +167,16 @@ }); }); - group( - 'Regression - When assets available are 1.0 and 3.0 check devices with a range of scales', () { + group('Regression - When assets available are 1.0 and 3.0 check devices with a range of scales', () { const String mainAssetPath = 'assets/normalFolder/normalFile.png'; const String variantPath = 'assets/normalFolder/3.0x/normalFile.png'; - void _buildBundleAndTestVariantLogic(double deviceRatio, double chosenAssetRatio, - String expectedAssetPath) { + void _buildBundleAndTestVariantLogic( + double deviceRatio, + double chosenAssetRatio, + String expectedAssetPath, + ) { final Map<String, List<String>> assetBundleMap = <String, List<String>>{};
diff --git a/packages/flutter/test/painting/image_stream_test.dart b/packages/flutter/test/painting/image_stream_test.dart index e78843a..35531f9 100644 --- a/packages/flutter/test/painting/image_stream_test.dart +++ b/packages/flutter/test/painting/image_stream_test.dart
@@ -40,7 +40,7 @@ void dispose() {} @override - Future<ByteData> toByteData({ImageByteFormat format = ImageByteFormat.rawRgba}) async { + Future<ByteData> toByteData({ ImageByteFormat format = ImageByteFormat.rawRgba }) async { throw UnsupportedError('Cannot encode test image'); } }
diff --git a/packages/flutter/test/painting/mocks_for_image_cache.dart b/packages/flutter/test/painting/mocks_for_image_cache.dart index e0353d3..db24a3e 100644 --- a/packages/flutter/test/painting/mocks_for_image_cache.dart +++ b/packages/flutter/test/painting/mocks_for_image_cache.dart
@@ -77,7 +77,7 @@ void dispose() {} @override - Future<ByteData> toByteData({ImageByteFormat format = ImageByteFormat.rawRgba}) { + Future<ByteData> toByteData({ ImageByteFormat format = ImageByteFormat.rawRgba }) { throw UnimplementedError(); } }
diff --git a/packages/flutter/test/painting/paint_image_test.dart b/packages/flutter/test/painting/paint_image_test.dart index 5451867..ae38741 100644 --- a/packages/flutter/test/painting/paint_image_test.dart +++ b/packages/flutter/test/painting/paint_image_test.dart
@@ -23,7 +23,7 @@ void dispose() { } @override - Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { + Future<ByteData> toByteData({ ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba }) async { throw UnsupportedError('Cannot encode test image'); } }
diff --git a/packages/flutter/test/painting/shape_decoration_test.dart b/packages/flutter/test/painting/shape_decoration_test.dart index 13c0a5d..784c290 100644 --- a/packages/flutter/test/painting/shape_decoration_test.dart +++ b/packages/flutter/test/painting/shape_decoration_test.dart
@@ -125,7 +125,7 @@ void dispose() { } @override - Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { + Future<ByteData> toByteData({ ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba }) async { throw UnsupportedError('Cannot encode test image'); } }
diff --git a/packages/flutter/test/rendering/image_test.dart b/packages/flutter/test/rendering/image_test.dart index c365c6e..7248240 100644 --- a/packages/flutter/test/rendering/image_test.dart +++ b/packages/flutter/test/rendering/image_test.dart
@@ -19,7 +19,7 @@ int get height => 10; @override - Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { + Future<ByteData> toByteData({ ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba }) async { throw UnsupportedError('Cannot encode test image'); } @@ -38,7 +38,7 @@ int get height => 10; @override - Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { + Future<ByteData> toByteData({ ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba }) async { throw UnsupportedError('Cannot encode test image'); } @@ -57,7 +57,7 @@ int get height => 20; @override - Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { + Future<ByteData> toByteData({ ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba }) async { throw UnsupportedError('Cannot encode test image'); }
diff --git a/packages/flutter/test/rendering/mock_canvas.dart b/packages/flutter/test/rendering/mock_canvas.dart index d513780..8cbac03 100644 --- a/packages/flutter/test/rendering/mock_canvas.dart +++ b/packages/flutter/test/rendering/mock_canvas.dart
@@ -164,7 +164,7 @@ /// /// Any calls made between the last matched call (if any) and the /// [Canvas.clipPath] call are ignored. - void clipPath({Matcher pathMatcher}); + void clipPath({ Matcher pathMatcher }); /// Indicates that a rectangle is expected next. /// @@ -571,8 +571,7 @@ } @override - bool _evaluatePredicates(Iterable<RecordedInvocation> calls, - StringBuffer description) { + bool _evaluatePredicates(Iterable<RecordedInvocation> calls, StringBuffer description) { int count = 0; for(RecordedInvocation call in calls) { if (call.invocation.isMethod && call.invocation.memberName == _methodName) { @@ -710,7 +709,7 @@ } @override - void clipPath({Matcher pathMatcher}) { + void clipPath({ Matcher pathMatcher }) { _predicates.add(_FunctionPaintPredicate(#clipPath, <dynamic>[pathMatcher])); }
diff --git a/packages/flutter/test/rendering/proxy_box_test.dart b/packages/flutter/test/rendering/proxy_box_test.dart index 8e62c45..fe900a2 100644 --- a/packages/flutter/test/rendering/proxy_box_test.dart +++ b/packages/flutter/test/rendering/proxy_box_test.dart
@@ -277,7 +277,7 @@ class _FakeTickerProvider implements TickerProvider { @override - Ticker createTicker(TickerCallback onTick, [bool disableAnimations = false]) { + Ticker createTicker(TickerCallback onTick, [ bool disableAnimations = false ]) { return _FakeTicker(); } } @@ -308,7 +308,7 @@ void dispose() {} @override - void scheduleTick({bool rescheduling = false}) {} + void scheduleTick({ bool rescheduling = false }) {} @override TickerFuture start() { @@ -316,11 +316,11 @@ } @override - void stop({bool canceled = false}) {} + void stop({ bool canceled = false }) {} @override void unscheduleTick() {} @override - String toString({bool debugIncludeStack = false}) => super.toString(); + String toString({ bool debugIncludeStack = false }) => super.toString(); }
diff --git a/packages/flutter/test/rendering/recording_canvas.dart b/packages/flutter/test/rendering/recording_canvas.dart index da33a6d..5011d0c 100644 --- a/packages/flutter/test/rendering/recording_canvas.dart +++ b/packages/flutter/test/rendering/recording_canvas.dart
@@ -103,18 +103,18 @@ } @override - void pushClipRect(bool needsCompositing, Offset offset, Rect clipRect, PaintingContextCallback painter, {Clip clipBehavior = Clip.hardEdge}) { + void pushClipRect(bool needsCompositing, Offset offset, Rect clipRect, PaintingContextCallback painter, { Clip clipBehavior = Clip.hardEdge }) { clipRectAndPaint(clipRect.shift(offset), clipBehavior, clipRect.shift(offset), () => painter(this, offset)); } @override - void pushClipRRect(bool needsCompositing, Offset offset, Rect bounds, RRect clipRRect, PaintingContextCallback painter, {Clip clipBehavior = Clip.antiAlias}) { + void pushClipRRect(bool needsCompositing, Offset offset, Rect bounds, RRect clipRRect, PaintingContextCallback painter, { Clip clipBehavior = Clip.antiAlias }) { assert(clipBehavior != null); clipRRectAndPaint(clipRRect.shift(offset), clipBehavior, bounds.shift(offset), () => painter(this, offset)); } @override - void pushClipPath(bool needsCompositing, Offset offset, Rect bounds, Path clipPath, PaintingContextCallback painter, {Clip clipBehavior = Clip.antiAlias}) { + void pushClipPath(bool needsCompositing, Offset offset, Rect bounds, Path clipPath, PaintingContextCallback painter, { Clip clipBehavior = Clip.antiAlias }) { clipPathAndPaint(clipPath.shift(offset), clipBehavior, bounds.shift(offset), () => painter(this, offset)); } @@ -134,7 +134,7 @@ } @override - void pushLayer(Layer childLayer, PaintingContextCallback painter, Offset offset, {Rect childPaintBounds}) { + void pushLayer(Layer childLayer, PaintingContextCallback painter, Offset offset, { Rect childPaintBounds }) { painter(this, offset); }
diff --git a/packages/flutter/test/rendering/rendering_tester.dart b/packages/flutter/test/rendering/rendering_tester.dart index c2924fa..bcaf4a6 100644 --- a/packages/flutter/test/rendering/rendering_tester.dart +++ b/packages/flutter/test/rendering/rendering_tester.dart
@@ -55,7 +55,8 @@ /// /// The EnginePhase must not be [EnginePhase.build], since the rendering layer /// has no build phase. -void layout(RenderBox box, { +void layout( + RenderBox box, { BoxConstraints constraints, Alignment alignment = Alignment.center, EnginePhase phase = EnginePhase.layout,
diff --git a/packages/flutter/test/rendering/sliver_cache_test.dart b/packages/flutter/test/rendering/sliver_cache_test.dart index 0bdef3c..70617d6 100644 --- a/packages/flutter/test/rendering/sliver_cache_test.dart +++ b/packages/flutter/test/rendering/sliver_cache_test.dart
@@ -878,14 +878,14 @@ }); } -void expectSliverConstraints({RenderSliver sliver, double cacheOrigin, double remainingPaintExtent, double remainingCacheExtent, double scrollOffset}) { +void expectSliverConstraints({ RenderSliver sliver, double cacheOrigin, double remainingPaintExtent, double remainingCacheExtent, double scrollOffset }) { expect(sliver.constraints.cacheOrigin, cacheOrigin, reason: 'cacheOrigin'); expect(sliver.constraints.remainingPaintExtent, remainingPaintExtent, reason: 'remainingPaintExtent'); expect(sliver.constraints.remainingCacheExtent, remainingCacheExtent, reason: 'remainingCacheExtent'); expect(sliver.constraints.scrollOffset, scrollOffset, reason: 'scrollOffset'); } -void expectSliverGeometry({RenderSliver sliver, double paintExtent, double cacheExtent, bool visible}) { +void expectSliverGeometry({ RenderSliver sliver, double paintExtent, double cacheExtent, bool visible }) { expect(sliver.geometry.paintExtent, paintExtent, reason: 'paintExtent'); expect(sliver.geometry.cacheExtent, cacheExtent, reason: 'cacheExtent'); expect(sliver.geometry.visible, visible, reason: 'visible'); @@ -946,7 +946,8 @@ } @override - double estimateMaxScrollOffset(SliverConstraints constraints, { + double estimateMaxScrollOffset( + SliverConstraints constraints, { int firstIndex, int lastIndex, double leadingScrollOffset,
diff --git a/packages/flutter/test/rendering/slivers_block_test.dart b/packages/flutter/test/rendering/slivers_block_test.dart index 2ce9154..95c6900 100644 --- a/packages/flutter/test/rendering/slivers_block_test.dart +++ b/packages/flutter/test/rendering/slivers_block_test.dart
@@ -42,7 +42,8 @@ } @override - double estimateMaxScrollOffset(SliverConstraints constraints, { + double estimateMaxScrollOffset( + SliverConstraints constraints, { int firstIndex, int lastIndex, double leadingScrollOffset,
diff --git a/packages/flutter/test/rendering/viewport_test.dart b/packages/flutter/test/rendering/viewport_test.dart index b51a675..36fe089 100644 --- a/packages/flutter/test/rendering/viewport_test.dart +++ b/packages/flutter/test/rendering/viewport_test.dart
@@ -517,7 +517,7 @@ group('Nested viewports (same orientation) showOnScreen', () { List<Widget> children; - Future<void> buildNestedScroller({WidgetTester tester, ScrollController inner, ScrollController outer}) { + Future<void> buildNestedScroller({ WidgetTester tester, ScrollController inner, ScrollController outer }) { return tester.pumpWidget( Directionality( textDirection: TextDirection.ltr,
diff --git a/packages/flutter/test/widgets/animated_cross_fade_test.dart b/packages/flutter/test/widgets/animated_cross_fade_test.dart index 280fd90..1500ae0 100644 --- a/packages/flutter/test/widgets/animated_cross_fade_test.dart +++ b/packages/flutter/test/widgets/animated_cross_fade_test.dart
@@ -263,7 +263,7 @@ expect(box2.localToGlobal(Offset.zero), const Offset(325.0, 175.0)); }); - Widget crossFadeWithWatcher({bool towardsSecond = false}) { + Widget crossFadeWithWatcher({ bool towardsSecond = false }) { return Directionality( textDirection: TextDirection.ltr, child: AnimatedCrossFade(
diff --git a/packages/flutter/test/widgets/animated_size_test.dart b/packages/flutter/test/widgets/animated_size_test.dart index 4a02530..7d508fe 100644 --- a/packages/flutter/test/widgets/animated_size_test.dart +++ b/packages/flutter/test/widgets/animated_size_test.dart
@@ -142,7 +142,7 @@ await tester.pump(Duration(milliseconds: millis)); } - void verify({double size, RenderAnimatedSizeState state}) { + void verify({ double size, RenderAnimatedSizeState state }) { assert(size != null || state != null); final RenderAnimatedSize box = tester.renderObject(find.byType(AnimatedSize)); if (size != null) {
diff --git a/packages/flutter/test/widgets/clamp_overscrolls_test.dart b/packages/flutter/test/widgets/clamp_overscrolls_test.dart index 2d97aa3..a1c2c05 100644 --- a/packages/flutter/test/widgets/clamp_overscrolls_test.dart +++ b/packages/flutter/test/widgets/clamp_overscrolls_test.dart
@@ -11,7 +11,7 @@ // The top of the bottom widget is at 550 (the top of the top widget // is at 0). The top of the bottom widget is 500 when it has been // scrolled completely into view. -Widget buildFrame(ScrollPhysics physics, {ScrollController scrollController}) { +Widget buildFrame(ScrollPhysics physics, { ScrollController scrollController }) { return SingleChildScrollView( key: UniqueKey(), physics: physics,
diff --git a/packages/flutter/test/widgets/custom_painter_test.dart b/packages/flutter/test/widgets/custom_painter_test.dart index e0cfeaf..2f73063 100644 --- a/packages/flutter/test/widgets/custom_painter_test.dart +++ b/packages/flutter/test/widgets/custom_painter_test.dart
@@ -700,7 +700,7 @@ /// /// - checks that initial and final configurations are in the desired states. /// - checks that keyed nodes have stable IDs. - Future<void> diff({List<String> from, List<String> to}) async { + Future<void> diff({ List<String> from, List<String> to }) async { final SemanticsTester semanticsTester = SemanticsTester(tester); TestSemantics createExpectations(List<String> labels) {
diff --git a/packages/flutter/test/widgets/dismissible_test.dart b/packages/flutter/test/widgets/dismissible_test.dart index d552341..cc1feb6 100644 --- a/packages/flutter/test/widgets/dismissible_test.dart +++ b/packages/flutter/test/widgets/dismissible_test.dart
@@ -137,7 +137,9 @@ await flingElement(tester, finder, gestureDirection: gestureDirection, initialOffsetFactor: -1.0); } -Future<void> dismissItem(WidgetTester tester, int item, { +Future<void> dismissItem( + WidgetTester tester, + int item, { @required AxisDirection gestureDirection, DismissMethod mechanism = dismissElement, }) async { @@ -154,7 +156,9 @@ await tester.pump(); // rebuild after the callback removes the entry } -Future<void> checkFlingItemBeforeMovementEnd(WidgetTester tester, int item, { +Future<void> checkFlingItemBeforeMovementEnd( + WidgetTester tester, + int item, { @required AxisDirection gestureDirection, DismissMethod mechanism = rollbackElement }) async { @@ -168,7 +172,9 @@ await tester.pump(const Duration(milliseconds: 100)); } -Future<void> checkFlingItemAfterMovement(WidgetTester tester, int item, { +Future<void> checkFlingItemAfterMovement( + WidgetTester tester, + int item, { @required AxisDirection gestureDirection, DismissMethod mechanism = rollbackElement }) async {
diff --git a/packages/flutter/test/widgets/draggable_test.dart b/packages/flutter/test/widgets/draggable_test.dart index ef8e964..8592050 100644 --- a/packages/flutter/test/widgets/draggable_test.dart +++ b/packages/flutter/test/widgets/draggable_test.dart
@@ -2089,7 +2089,7 @@ } -Future<void> _testLongPressDraggableHapticFeedback({WidgetTester tester, bool hapticFeedbackOnStart, int expectedHapticFeedbackCount}) async { +Future<void> _testLongPressDraggableHapticFeedback({ WidgetTester tester, bool hapticFeedbackOnStart, int expectedHapticFeedbackCount }) async { bool onDragStartedCalled = false; int hapticFeedbackCalls = 0; @@ -2131,7 +2131,7 @@ expect(hapticFeedbackCalls, expectedHapticFeedbackCount); } -Future<void> _testChildAnchorFeedbackPosition({WidgetTester tester, double top = 0.0, double left = 0.0}) async { +Future<void> _testChildAnchorFeedbackPosition({ WidgetTester tester, double top = 0.0, double left = 0.0 }) async { final List<int> accepted = <int>[]; int dragStartedCount = 0;
diff --git a/packages/flutter/test/widgets/editable_text_test.dart b/packages/flutter/test/widgets/editable_text_test.dart index 73841fb..2772703 100644 --- a/packages/flutter/test/widgets/editable_text_test.dart +++ b/packages/flutter/test/widgets/editable_text_test.dart
@@ -1634,8 +1634,7 @@ }); group('a11y copy/cut/paste', () { - Future<void> _buildApp( - MockTextSelectionControls controls, WidgetTester tester) { + Future<void> _buildApp(MockTextSelectionControls controls, WidgetTester tester) { return tester.pumpWidget(MaterialApp( home: EditableText( backgroundCursorColor: Colors.grey,
diff --git a/packages/flutter/test/widgets/image_headers_test.dart b/packages/flutter/test/widgets/image_headers_test.dart index c7f8de1..e7b70e4 100644 --- a/packages/flutter/test/widgets/image_headers_test.dart +++ b/packages/flutter/test/widgets/image_headers_test.dart
@@ -35,7 +35,7 @@ when(response.listen(any)).thenAnswer((Invocation invocation) { final void Function(List<int>) onData = invocation.positionalArguments[0]; final void Function() onDone = invocation.namedArguments[#onDone]; - final void Function(Object, [StackTrace]) onError = invocation.namedArguments[#onError]; + final void Function(Object, [ StackTrace ]) onError = invocation.namedArguments[#onError]; final bool cancelOnError = invocation.namedArguments[#cancelOnError]; return Stream<List<int>>.fromIterable(<List<int>>[kTransparentImage]).listen(onData, onDone: onDone, onError: onError, cancelOnError: cancelOnError); });
diff --git a/packages/flutter/test/widgets/image_resolution_test.dart b/packages/flutter/test/widgets/image_resolution_test.dart index 123cf79..b342585 100644 --- a/packages/flutter/test/widgets/image_resolution_test.dart +++ b/packages/flutter/test/widgets/image_resolution_test.dart
@@ -26,7 +26,7 @@ void dispose() { } @override - Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { + Future<ByteData> toByteData({ ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba }) async { throw UnsupportedError('Cannot encode test image'); } } @@ -117,7 +117,7 @@ } } -Widget buildImageAtRatio(String image, Key key, double ratio, bool inferSize, [AssetBundle bundle]) { +Widget buildImageAtRatio(String image, Key key, double ratio, bool inferSize, [ AssetBundle bundle ]) { const double windowSize = 500.0; // 500 logical pixels const double imageSize = 200.0; // 200 logical pixels
diff --git a/packages/flutter/test/widgets/image_rtl_test.dart b/packages/flutter/test/widgets/image_rtl_test.dart index 511c742..f338f18 100644 --- a/packages/flutter/test/widgets/image_rtl_test.dart +++ b/packages/flutter/test/widgets/image_rtl_test.dart
@@ -37,7 +37,7 @@ void dispose() { } @override - Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { + Future<ByteData> toByteData({ ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba }) async { throw UnsupportedError('Cannot encode test image'); } }
diff --git a/packages/flutter/test/widgets/image_test.dart b/packages/flutter/test/widgets/image_test.dart index 6ffc035..943c9b1 100644 --- a/packages/flutter/test/widgets/image_test.dart +++ b/packages/flutter/test/widgets/image_test.dart
@@ -926,7 +926,7 @@ void dispose() { } @override - Future<ByteData> toByteData({ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba}) async { + Future<ByteData> toByteData({ ui.ImageByteFormat format = ui.ImageByteFormat.rawRgba }) async { throw UnsupportedError('Cannot encode test image'); }
diff --git a/packages/flutter/test/widgets/list_view_builder_test.dart b/packages/flutter/test/widgets/list_view_builder_test.dart index fc1907f..d50e3e2 100644 --- a/packages/flutter/test/widgets/list_view_builder_test.dart +++ b/packages/flutter/test/widgets/list_view_builder_test.dart
@@ -306,7 +306,7 @@ }); } -void check({List<int> visible = const <int>[], List<int> hidden = const <int>[]}) { +void check({ List<int> visible = const <int>[], List<int> hidden = const <int>[] }) { for (int i in visible) { expect(find.text('$i'), findsOneWidget); }
diff --git a/packages/flutter/test/widgets/list_view_test.dart b/packages/flutter/test/widgets/list_view_test.dart index d6b5a18..5c1c420 100644 --- a/packages/flutter/test/widgets/list_view_test.dart +++ b/packages/flutter/test/widgets/list_view_test.dart
@@ -27,7 +27,7 @@ AliveState createState() => AliveState(); @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.debug}) => '$index $alive'; + String toString({ DiagnosticLevel minLevel = DiagnosticLevel.debug }) => '$index $alive'; } class AliveState extends State<Alive> with AutomaticKeepAliveClientMixin { @@ -176,7 +176,7 @@ }); testWidgets('ListView large scroll jump and keepAlive first child not keepAlive', (WidgetTester tester) async { - Future<void> checkAndScroll([String zero = '0:false']) async { + Future<void> checkAndScroll([ String zero = '0:false' ]) async { expect(find.text(zero), findsOneWidget); expect(find.text('1:false'), findsOneWidget); expect(find.text('2:false'), findsOneWidget);
diff --git a/packages/flutter/test/widgets/nested_scroll_view_test.dart b/packages/flutter/test/widgets/nested_scroll_view_test.dart index 354126d..5d40073 100644 --- a/packages/flutter/test/widgets/nested_scroll_view_test.dart +++ b/packages/flutter/test/widgets/nested_scroll_view_test.dart
@@ -23,7 +23,7 @@ } } -Widget buildTest({ ScrollController controller, String title ='TTTTTTTT' }) { +Widget buildTest({ ScrollController controller, String title = 'TTTTTTTT' }) { return Localizations( locale: const Locale('en', 'US'), delegates: const <LocalizationsDelegate<dynamic>>[
diff --git a/packages/flutter/test/widgets/page_view_test.dart b/packages/flutter/test/widgets/page_view_test.dart index 4c858ad..59574de 100644 --- a/packages/flutter/test/widgets/page_view_test.dart +++ b/packages/flutter/test/widgets/page_view_test.dart
@@ -332,7 +332,7 @@ final List<int> log = <int>[]; final PageController controller = PageController(viewportFraction: 0.9); - Widget build(PageController controller, {Size size}) { + Widget build(PageController controller, { Size size }) { final Widget pageView = Directionality( textDirection: TextDirection.ltr, child: PageView(
diff --git a/packages/flutter/test/widgets/platform_view_test.dart b/packages/flutter/test/widgets/platform_view_test.dart index d017f68..ba64212 100644 --- a/packages/flutter/test/widgets/platform_view_test.dart +++ b/packages/flutter/test/widgets/platform_view_test.dart
@@ -418,8 +418,7 @@ ); }); - testWidgets('Android view touch events are in virtual display\'s coordinate system', ( - WidgetTester tester) async { + testWidgets('Android view touch events are in virtual display\'s coordinate system', (WidgetTester tester) async { final int currentViewId = platformViewsRegistry.getNextPlatformViewId(); final FakeAndroidPlatformViewsController viewsController = FakeAndroidPlatformViewsController(); viewsController.registerViewType('webview'); @@ -755,8 +754,7 @@ ); }); - testWidgets('RenderAndroidView reconstructed with same gestureRecognizers', ( - WidgetTester tester) async { + testWidgets('RenderAndroidView reconstructed with same gestureRecognizers', (WidgetTester tester) async { final FakeAndroidPlatformViewsController viewsController = FakeAndroidPlatformViewsController(); viewsController.registerViewType('webview');
diff --git a/packages/flutter/test/widgets/semantics_10_test.dart b/packages/flutter/test/widgets/semantics_10_test.dart index 31457e2..afed3c6 100644 --- a/packages/flutter/test/widgets/semantics_10_test.dart +++ b/packages/flutter/test/widgets/semantics_10_test.dart
@@ -34,7 +34,7 @@ }); } -Widget buildTestWidgets({bool excludeSemantics, String label, bool isSemanticsBoundary}) { +Widget buildTestWidgets({ bool excludeSemantics, String label, bool isSemanticsBoundary }) { return Directionality( textDirection: TextDirection.ltr, child: Semantics(
diff --git a/packages/flutter/test/widgets/semantics_keep_alive_offstage_test.dart b/packages/flutter/test/widgets/semantics_keep_alive_offstage_test.dart index 92d0736..1dfbebf 100644 --- a/packages/flutter/test/widgets/semantics_keep_alive_offstage_test.dart +++ b/packages/flutter/test/widgets/semantics_keep_alive_offstage_test.dart
@@ -81,7 +81,7 @@ final Key paddingWidget = GlobalKey(); -Widget _buildTestWidget({bool extraPadding, String text, ScrollController controller}) { +Widget _buildTestWidget({ bool extraPadding, String text, ScrollController controller }) { return MaterialApp( home: Scaffold( body: Column(
diff --git a/packages/flutter/test/widgets/semantics_tester.dart b/packages/flutter/test/widgets/semantics_tester.dart index 8b2b48f..09185ca 100644 --- a/packages/flutter/test/widgets/semantics_tester.dart +++ b/packages/flutter/test/widgets/semantics_tester.dart
@@ -250,14 +250,12 @@ bool _matches( SemanticsNode node, - Map<dynamic, dynamic> matchState, - { - bool ignoreRect = false, - bool ignoreTransform = false, - bool ignoreId = false, - DebugSemanticsDumpOrder childOrder = DebugSemanticsDumpOrder.inverseHitTest, - } - ) { + Map<dynamic, dynamic> matchState, { + bool ignoreRect = false, + bool ignoreTransform = false, + bool ignoreId = false, + DebugSemanticsDumpOrder childOrder = DebugSemanticsDumpOrder.inverseHitTest, + }) { bool fail(String message) { matchState[TestSemantics] = '$message'; return false; @@ -343,7 +341,7 @@ } @override - String toString([int indentAmount = 0]) { + String toString([ int indentAmount = 0 ]) { final String indent = ' ' * indentAmount; final StringBuffer buf = StringBuffer(); buf.writeln('$indent$runtimeType('); @@ -688,7 +686,8 @@ } /// Asserts that a [SemanticsTester] has a semantics tree that exactly matches the given semantics. -Matcher hasSemantics(TestSemantics semantics, { +Matcher hasSemantics( + TestSemantics semantics, { bool ignoreRect = false, bool ignoreTransform = false, bool ignoreId = false,
diff --git a/packages/flutter/test/widgets/single_child_scroll_view_test.dart b/packages/flutter/test/widgets/single_child_scroll_view_test.dart index 816644e..f28cfb8 100644 --- a/packages/flutter/test/widgets/single_child_scroll_view_test.dart +++ b/packages/flutter/test/widgets/single_child_scroll_view_test.dart
@@ -706,7 +706,7 @@ group('Nested SingleChildScrollView (same orientation) showOnScreen', () { List<Widget> children; - Future<void> buildNestedScroller({WidgetTester tester, ScrollController inner, ScrollController outer}) { + Future<void> buildNestedScroller({ WidgetTester tester, ScrollController inner, ScrollController outer }) { return tester.pumpWidget( Directionality( textDirection: TextDirection.ltr,
diff --git a/packages/flutter_driver/lib/src/driver/driver.dart b/packages/flutter_driver/lib/src/driver/driver.dart index 96edc27..528ecd7 100644 --- a/packages/flutter_driver/lib/src/driver/driver.dart +++ b/packages/flutter_driver/lib/src/driver/driver.dart
@@ -427,27 +427,27 @@ } /// Checks the status of the Flutter Driver extension. - Future<Health> checkHealth({Duration timeout}) async { + Future<Health> checkHealth({ Duration timeout }) async { return Health.fromJson(await _sendCommand(GetHealth(timeout: timeout))); } /// Returns a dump of the render tree. - Future<RenderTree> getRenderTree({Duration timeout}) async { + Future<RenderTree> getRenderTree({ Duration timeout }) async { return RenderTree.fromJson(await _sendCommand(GetRenderTree(timeout: timeout))); } /// Taps at the center of the widget located by [finder]. - Future<void> tap(SerializableFinder finder, {Duration timeout}) async { + Future<void> tap(SerializableFinder finder, { Duration timeout }) async { await _sendCommand(Tap(finder, timeout: timeout)); } /// Waits until [finder] locates the target. - Future<void> waitFor(SerializableFinder finder, {Duration timeout}) async { + Future<void> waitFor(SerializableFinder finder, { Duration timeout }) async { await _sendCommand(WaitFor(finder, timeout: timeout)); } /// Waits until [finder] can no longer locate the target. - Future<void> waitForAbsent(SerializableFinder finder, {Duration timeout}) async { + Future<void> waitForAbsent(SerializableFinder finder, { Duration timeout }) async { await _sendCommand(WaitForAbsent(finder, timeout: timeout)); } @@ -455,7 +455,7 @@ /// /// Use this method when you need to wait for the moment when the application /// becomes "stable", for example, prior to taking a [screenshot]. - Future<void> waitUntilNoTransientCallbacks({Duration timeout}) async { + Future<void> waitUntilNoTransientCallbacks({ Duration timeout }) async { await _sendCommand(WaitUntilNoTransientCallbacks(timeout: timeout)); } @@ -509,7 +509,9 @@ /// /// The [timeout] value should be long enough to accommodate as many scrolls /// as needed to bring an item into view. The default is to not time out. - Future<void> scrollUntilVisible(SerializableFinder scrollable, SerializableFinder item, { + Future<void> scrollUntilVisible( + SerializableFinder scrollable, + SerializableFinder item, { double alignment = 0.0, double dxScroll = 0.0, double dyScroll = 0.0,
diff --git a/packages/flutter_driver/lib/src/driver/timeline_summary.dart b/packages/flutter_driver/lib/src/driver/timeline_summary.dart index 9a3d30d..95060fb 100644 --- a/packages/flutter_driver/lib/src/driver/timeline_summary.dart +++ b/packages/flutter_driver/lib/src/driver/timeline_summary.dart
@@ -49,7 +49,7 @@ /// The number of frames that missed the [kBuildBudget] and therefore are /// in the danger of missing frames. - int computeMissedFrameBuildBudgetCount([Duration frameBuildBudget = kBuildBudget]) => _extractFrameDurations() + int computeMissedFrameBuildBudgetCount([ Duration frameBuildBudget = kBuildBudget ]) => _extractFrameDurations() .where((Duration duration) => duration > kBuildBudget) .length; @@ -76,7 +76,7 @@ /// The number of frames that missed the [kBuildBudget] on the GPU and /// therefore are in the danger of missing frames. - int computeMissedFrameRasterizerBudgetCount([Duration frameBuildBudget = kBuildBudget]) => _extractGpuRasterizerDrawEvents() + int computeMissedFrameRasterizerBudgetCount([ Duration frameBuildBudget = kBuildBudget ]) => _extractGpuRasterizerDrawEvents() .where((TimedEvent event) => event.duration > kBuildBudget) .length;
diff --git a/packages/flutter_driver/lib/src/extension/extension.dart b/packages/flutter_driver/lib/src/extension/extension.dart index 01857be..7008f39 100644 --- a/packages/flutter_driver/lib/src/extension/extension.dart +++ b/packages/flutter_driver/lib/src/extension/extension.dart
@@ -194,7 +194,7 @@ } } - Map<String, dynamic> _makeResponse(dynamic response, {bool isError = false}) { + Map<String, dynamic> _makeResponse(dynamic response, { bool isError = false }) { return <String, dynamic>{ 'isError': isError, 'response': response, @@ -208,7 +208,7 @@ } // Waits until at the end of a frame the provided [condition] is [true]. - Future<void> _waitUntilFrame(bool condition(), [Completer<void> completer]) { + Future<void> _waitUntilFrame(bool condition(), [ Completer<void> completer ]) { completer ??= Completer<void>(); if (!condition()) { SchedulerBinding.instance.addPostFrameCallback((Duration timestamp) {
diff --git a/packages/flutter_driver/test/flutter_driver_test.dart b/packages/flutter_driver/test/flutter_driver_test.dart index 6bf1302..c5e23ca 100644 --- a/packages/flutter_driver/test/flutter_driver_test.dart +++ b/packages/flutter_driver/test/flutter_driver_test.dart
@@ -427,7 +427,9 @@ } Future<Map<String, dynamic>> makeMockResponse( - Map<String, dynamic> response, {bool isError = false}) { + Map<String, dynamic> response, { + bool isError = false, +}) { return Future<Map<String, dynamic>>.value(<String, dynamic>{ 'isError': isError, 'response': response
diff --git a/packages/flutter_localizations/lib/src/material_localizations.dart b/packages/flutter_localizations/lib/src/material_localizations.dart index 33beb31..53690d0 100644 --- a/packages/flutter_localizations/lib/src/material_localizations.dart +++ b/packages/flutter_localizations/lib/src/material_localizations.dart
@@ -248,7 +248,7 @@ String get tabLabelRaw; @override - String tabLabel({int tabIndex, int tabCount}) { + String tabLabel({ int tabIndex, int tabCount }) { assert(tabIndex >= 1); assert(tabCount >= 1); final String template = tabLabelRaw;
diff --git a/packages/flutter_localizations/test/time_picker_test.dart b/packages/flutter_localizations/test/time_picker_test.dart index 56b733f..c7c8207 100644 --- a/packages/flutter_localizations/test/time_picker_test.dart +++ b/packages/flutter_localizations/test/time_picker_test.dart
@@ -40,8 +40,11 @@ } } -Future<Offset> startPicker(WidgetTester tester, ValueChanged<TimeOfDay> onChanged, - { Locale locale = const Locale('en', 'US') }) async { +Future<Offset> startPicker( + WidgetTester tester, + ValueChanged<TimeOfDay> onChanged, { + Locale locale = const Locale('en', 'US'), +}) async { await tester.pumpWidget(_TimePickerLauncher(onChanged: onChanged, locale: locale,)); await tester.tap(find.text('X')); await tester.pumpAndSettle(const Duration(seconds: 1));
diff --git a/packages/flutter_test/lib/src/all_elements.dart b/packages/flutter_test/lib/src/all_elements.dart index 019648f..b308a15 100644 --- a/packages/flutter_test/lib/src/all_elements.dart +++ b/packages/flutter_test/lib/src/all_elements.dart
@@ -16,7 +16,8 @@ /// The same applies to any iterable obtained indirectly through this /// one, for example the results of calling `where` on this iterable /// are also cached. -Iterable<Element> collectAllElementsFrom(Element rootElement, { +Iterable<Element> collectAllElementsFrom( + Element rootElement, { @required bool skipOffstage, }) { return CachingIterable<Element>(_DepthFirstChildIterator(rootElement, skipOffstage));
diff --git a/packages/flutter_test/lib/src/binding.dart b/packages/flutter_test/lib/src/binding.dart index a7261b9..05fc840 100644 --- a/packages/flutter_test/lib/src/binding.dart +++ b/packages/flutter_test/lib/src/binding.dart
@@ -308,7 +308,9 @@ Offset localToGlobal(Offset point) => point; @override - void dispatchEvent(PointerEvent event, HitTestResult hitTestResult, { + void dispatchEvent( + PointerEvent event, + HitTestResult hitTestResult, { TestBindingEventSource source = TestBindingEventSource.device }) { assert(source == TestBindingEventSource.test); @@ -441,7 +443,10 @@ // The LiveTestWidgetsFlutterBinding overrides this to report the exception to the console. } - Future<void> _runTest(Future<void> testBody(), VoidCallback invariantTester, String description, { + Future<void> _runTest( + Future<void> testBody(), + VoidCallback invariantTester, + String description, { Future<void> timeout, }) { assert(description != null); @@ -874,7 +879,9 @@ } @override - Future<void> runTest(Future<void> testBody(), VoidCallback invariantTester, { + Future<void> runTest( + Future<void> testBody(), + VoidCallback invariantTester, { String description = '', Duration timeout = const Duration(seconds: 2), }) { @@ -1183,7 +1190,9 @@ HitTestDispatcher deviceEventDispatcher; @override - void dispatchEvent(PointerEvent event, HitTestResult hitTestResult, { + void dispatchEvent( + PointerEvent event, + HitTestResult hitTestResult, { TestBindingEventSource source = TestBindingEventSource.device }) { switch (source) { @@ -1524,7 +1533,7 @@ set badCertificateCallback(bool Function(X509Certificate cert, String host, int port) callback) {} @override - void close({bool force = false}) {} + void close({ bool force = false }) {} @override Future<HttpClientRequest> delete(String host, int port, String path) { @@ -1612,7 +1621,7 @@ void add(List<int> data) {} @override - void addError(Object error, [StackTrace stackTrace]) {} + void addError(Object error, [ StackTrace stackTrace ]) {} @override Future<void> addStream(Stream<List<int>> stream) { @@ -1648,13 +1657,13 @@ void write(Object obj) {} @override - void writeAll(Iterable<Object> objects, [String separator = '']) {} + void writeAll(Iterable<Object> objects, [ String separator = '' ]) {} @override void writeCharCode(int charCode) {} @override - void writeln([Object obj = '']) {} + void writeln([ Object obj = '' ]) {} } /// A mocked [HttpClientResponse] which is empty and has a [statusCode] of 400. @@ -1683,7 +1692,7 @@ bool get isRedirect => false; @override - StreamSubscription<List<int>> listen(void Function(List<int> event) onData, {Function onError, void Function() onDone, bool cancelOnError}) { + StreamSubscription<List<int>> listen(void Function(List<int> event) onData, { Function onError, void Function() onDone, bool cancelOnError }) { return const Stream<List<int>>.empty().listen(onData, onError: onError, onDone: onDone, cancelOnError: cancelOnError); } @@ -1694,7 +1703,7 @@ String get reasonPhrase => null; @override - Future<HttpClientResponse> redirect([String method, Uri url, bool followLoops]) { + Future<HttpClientResponse> redirect([ String method, Uri url, bool followLoops ]) { return Future<HttpClientResponse>.error(UnsupportedError('Mocked response')); }
diff --git a/packages/flutter_test/lib/src/finders.dart b/packages/flutter_test/lib/src/finders.dart index a2fda53..1b2339b 100644 --- a/packages/flutter_test/lib/src/finders.dart +++ b/packages/flutter_test/lib/src/finders.dart
@@ -269,7 +269,7 @@ /// /// If the [matchRoot] argument is true then the widget(s) specified by [of] /// will be matched along with the ancestors. - Finder ancestor({ Finder of, Finder matching, bool matchRoot = false}) { + Finder ancestor({ Finder of, Finder matching, bool matchRoot = false }) { return _AncestorFinder(of, matching, matchRoot: matchRoot); } }
diff --git a/packages/flutter_test/lib/src/matchers.dart b/packages/flutter_test/lib/src/matchers.dart index b5b0f64..5e557fc 100644 --- a/packages/flutter_test/lib/src/matchers.dart +++ b/packages/flutter_test/lib/src/matchers.dart
@@ -243,7 +243,7 @@ /// method [name] and [arguments]. /// /// Arguments checking implements deep equality for [List] and [Map] types. -Matcher isMethodCall(String name, {@required dynamic arguments}) { +Matcher isMethodCall(String name, { @required dynamic arguments }) { return _IsMethodCall(name, arguments); } @@ -256,7 +256,7 @@ /// When using this matcher you typically want to use a rectangle larger than /// the area you expect to paint in for [areaToCompare] to catch errors where /// the path draws outside the expected area. -Matcher coversSameAreaAs(Path expectedPath, {@required Rect areaToCompare, int sampleSize = 20}) +Matcher coversSameAreaAs(Path expectedPath, { @required Rect areaToCompare, int sampleSize = 20 }) => _CoversSameAreaAs(expectedPath, areaToCompare: areaToCompare, sampleSize: sampleSize); /// Asserts that a [Finder], [Future<ui.Image>], or [ui.Image] matches the @@ -1148,14 +1148,14 @@ /// Asserts that a [Finder] locates a single object whose root RenderObject /// is a [RenderClipRRect] with no clipper set, and border radius equals to /// [borderRadius], or an equivalent [RenderClipPath]. -Matcher clipsWithBoundingRRect({@required BorderRadius borderRadius}) { +Matcher clipsWithBoundingRRect({ @required BorderRadius borderRadius }) { return _ClipsWithBoundingRRect(borderRadius: borderRadius); } /// Asserts that a [Finder] locates a single object whose root RenderObject /// is a [RenderClipPath] with a [ShapeBorderClipper] that clips to /// [shape]. -Matcher clipsWithShapeBorder({@required ShapeBorder shape}) { +Matcher clipsWithShapeBorder({ @required ShapeBorder shape }) { return _ClipsWithShapeBorder(shape: shape); } @@ -1213,10 +1213,10 @@ @override Description describeMismatch( - dynamic item, - Description mismatchDescription, - Map<dynamic, dynamic> matchState, - bool verbose + dynamic item, + Description mismatchDescription, + Map<dynamic, dynamic> matchState, + bool verbose ) { return mismatchDescription.add(matchState['failure']); } @@ -1852,11 +1852,11 @@ @override Description describeMismatch( - dynamic item, - Description mismatchDescription, - Map<dynamic, dynamic> matchState, - bool verbose - ) { + dynamic item, + Description mismatchDescription, + Map<dynamic, dynamic> matchState, + bool verbose + ) { return mismatchDescription.add(matchState['failure']); } }
diff --git a/packages/flutter_test/lib/src/test_compat.dart b/packages/flutter_test/lib/src/test_compat.dart index 2c9b091..e2e83fc 100644 --- a/packages/flutter_test/lib/src/test_compat.dart +++ b/packages/flutter_test/lib/src/test_compat.dart
@@ -75,7 +75,7 @@ } } -Future<void> _runLiveTest(Suite suiteConfig, LiveTest liveTest, _Reporter reporter, {bool countSuccess = true}) async { +Future<void> _runLiveTest(Suite suiteConfig, LiveTest liveTest, _Reporter reporter, { bool countSuccess = true }) async { reporter._onTestStarted(liveTest); // Schedule a microtask to ensure that [onTestStarted] fires before the // first [LiveTest.onStateChange] event. @@ -157,14 +157,16 @@ /// avoid this flag if possible and instead use the test runner flag `-n` to /// filter tests by name. @isTest -void test(Object description, Function body, { +void test( + Object description, + Function body, { String testOn, Timeout timeout, dynamic skip, dynamic tags, Map<String, dynamic> onPlatform, int retry, - }) { +}) { _declarer.test( description.toString(), body, testOn: testOn, @@ -423,7 +425,7 @@ /// [message] goes after the progress report. If [color] is passed, it's used /// as the color for [message]. If [suffix] is passed, it's added to the end /// of [message]. - void _progressLine(String message, {String color, String suffix}) { + void _progressLine(String message, { String color, String suffix }) { // Print nothing if nothing has changed since the last progress line. if (passed.length == _lastProgressPassed && skipped.length == _lastProgressSkipped && @@ -495,12 +497,12 @@ } } -String _indent(String string, {int size, String first}) { +String _indent(String string, { int size, String first }) { size ??= first == null ? 2 : first.length; return _prefixLines(string, ' ' * size, first: first); } -String _prefixLines(String text, String prefix, {String first, String last, String single}) { +String _prefixLines(String text, String prefix, { String first, String last, String single }) { first ??= prefix; last ??= prefix; single ??= first ?? last ?? prefix;
diff --git a/packages/flutter_test/lib/src/widget_tester.dart b/packages/flutter_test/lib/src/widget_tester.dart index 49a2ab2..b930b10 100644 --- a/packages/flutter_test/lib/src/widget_tester.dart +++ b/packages/flutter_test/lib/src/widget_tester.dart
@@ -66,7 +66,9 @@ /// }); /// ``` @isTest -void testWidgets(String description, WidgetTesterCallback callback, { +void testWidgets( + String description, + WidgetTesterCallback callback, { bool skip = false, test_package.Timeout timeout }) { @@ -158,7 +160,9 @@ /// See also: /// /// * [expectLater] for use with asynchronous matchers. -void expect(dynamic actual, dynamic matcher, { +void expect( + dynamic actual, + dynamic matcher, { String reason, dynamic skip, // true or a String }) { @@ -175,7 +179,9 @@ /// /// Generally, it is better to use [expect], which does include checks to ensure /// that asynchronous APIs are not being called. -void expectSync(dynamic actual, dynamic matcher, { +void expectSync( + dynamic actual, + dynamic matcher, { String reason, }) { test_package.expect(actual, matcher, reason: reason); @@ -189,7 +195,9 @@ /// If the matcher fails asynchronously, that failure is piped to the returned /// future where it can be handled by user code. If it is not handled by user /// code, the test will fail. -Future<void> expectLater(dynamic actual, dynamic matcher, { +Future<void> expectLater( + dynamic actual, + dynamic matcher, { String reason, dynamic skip, // true or a String }) { @@ -240,7 +248,8 @@ /// /// See also [LiveTestWidgetsFlutterBindingFramePolicy], which affects how /// this method works when the test is run with `flutter run`. - Future<void> pumpWidget(Widget widget, [ + Future<void> pumpWidget( + Widget widget, [ Duration duration, EnginePhase phase = EnginePhase.sendSemanticsUpdate, ]) { @@ -323,10 +332,10 @@ /// Alternatively, one can check that the return value from this function /// matches the expected number of pumps. Future<int> pumpAndSettle([ - Duration duration = const Duration(milliseconds: 100), - EnginePhase phase = EnginePhase.sendSemanticsUpdate, - Duration timeout = const Duration(minutes: 10), - ]) { + Duration duration = const Duration(milliseconds: 100), + EnginePhase phase = EnginePhase.sendSemanticsUpdate, + Duration timeout = const Duration(minutes: 10), + ]) { assert(duration != null); assert(duration > Duration.zero); assert(timeout != null);
diff --git a/packages/flutter_test/test/goldens_test.dart b/packages/flutter_test/test/goldens_test.dart index 0c084ad..5d03642 100644 --- a/packages/flutter_test/test/goldens_test.dart +++ b/packages/flutter_test/test/goldens_test.dart
@@ -82,7 +82,7 @@ }); group('compare', () { - Future<bool> doComparison([String golden = 'golden.png']) { + Future<bool> doComparison([ String golden = 'golden.png' ]) { final Uri uri = fs.file(fix(golden)).uri; return comparator.compare( Uint8List.fromList(_kExpectedBytes),
diff --git a/packages/flutter_tools/lib/runner.dart b/packages/flutter_tools/lib/runner.dart index fdcca4b..621cf63 100644 --- a/packages/flutter_tools/lib/runner.dart +++ b/packages/flutter_tools/lib/runner.dart
@@ -68,13 +68,13 @@ } Future<int> _handleToolError( - dynamic error, - StackTrace stackTrace, - bool verbose, - List<String> args, - bool reportCrashes, - String getFlutterVersion(), - ) async { + dynamic error, + StackTrace stackTrace, + bool verbose, + List<String> args, + bool reportCrashes, + String getFlutterVersion(), +) async { if (error is UsageException) { printError('${error.message}\n'); printError("Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.");
diff --git a/packages/flutter_tools/lib/src/android/android_device.dart b/packages/flutter_tools/lib/src/android/android_device.dart index 88214bd..73aa44b 100644 --- a/packages/flutter_tools/lib/src/android/android_device.dart +++ b/packages/flutter_tools/lib/src/android/android_device.dart
@@ -490,7 +490,7 @@ } @override - DeviceLogReader getLogReader({ApplicationPackage app}) { + DeviceLogReader getLogReader({ ApplicationPackage app }) { // The Android log reader isn't app-specific. _logReader ??= _AdbLogReader(this); return _logReader; @@ -576,7 +576,8 @@ /// of devices and possible device issue diagnostics. Either argument can be null, /// in which case information for that parameter won't be populated. @visibleForTesting -void parseADBDeviceOutput(String text, { +void parseADBDeviceOutput( + String text, { List<AndroidDevice> devices, List<String> diagnostics }) { @@ -849,7 +850,7 @@ } @override - Future<int> forward(int devicePort, {int hostPort}) async { + Future<int> forward(int devicePort, { int hostPort }) async { hostPort ??= 0; final RunResult process = await runCheckedAsync(device.adbCommandForDevice( <String>['forward', 'tcp:$hostPort', 'tcp:$devicePort']
diff --git a/packages/flutter_tools/lib/src/android/android_sdk.dart b/packages/flutter_tools/lib/src/android/android_sdk.dart index f97cc5b..0bb5823 100644 --- a/packages/flutter_tools/lib/src/android/android_sdk.dart +++ b/packages/flutter_tools/lib/src/android/android_sdk.dart
@@ -46,7 +46,7 @@ /// This should be used over accessing androidSdk.adbPath directly because it /// will work for those users who have Android Platform Tools installed but /// not the full SDK. -String getAdbPath([AndroidSdk existingSdk]) { +String getAdbPath([ AndroidSdk existingSdk ]) { if (existingSdk?.adbPath != null) return existingSdk.adbPath; @@ -63,7 +63,7 @@ /// This should be used over accessing androidSdk.emulatorPath directly because it /// will work for those users who have Android Tools installed but /// not the full SDK. -String getEmulatorPath([AndroidSdk existingSdk]) { +String getEmulatorPath([ AndroidSdk existingSdk ]) { return existingSdk?.emulatorPath ?? AndroidSdk.locateAndroidSdk()?.emulatorPath; } @@ -100,7 +100,7 @@ /// This should be used over accessing androidSdk.avdManagerPath directly because it /// will work for those users who have Android Tools installed but /// not the full SDK. -String getAvdManagerPath([AndroidSdk existingSdk]) { +String getAvdManagerPath([ AndroidSdk existingSdk ]) { return existingSdk?.avdManagerPath ?? AndroidSdk.locateAndroidSdk()?.avdManagerPath; }
diff --git a/packages/flutter_tools/lib/src/android/android_studio.dart b/packages/flutter_tools/lib/src/android/android_studio.dart index a94b200..58c7ca0 100644 --- a/packages/flutter_tools/lib/src/android/android_studio.dart +++ b/packages/flutter_tools/lib/src/android/android_studio.dart
@@ -219,7 +219,7 @@ static List<AndroidStudio> _allLinuxOrWindows() { final List<AndroidStudio> studios = <AndroidStudio>[]; - bool _hasStudioAt(String path, {Version newerThan}) { + bool _hasStudioAt(String path, { Version newerThan }) { return studios.any((AndroidStudio studio) { if (studio.directory != path) return false;
diff --git a/packages/flutter_tools/lib/src/android/gradle.dart b/packages/flutter_tools/lib/src/android/gradle.dart index fbde2ed..ae2b9fb 100644 --- a/packages/flutter_tools/lib/src/android/gradle.dart +++ b/packages/flutter_tools/lib/src/android/gradle.dart
@@ -353,11 +353,12 @@ } Future<void> _buildGradleProjectV2( - FlutterProject flutterProject, - String gradle, - BuildInfo buildInfo, - String target, - bool isBuildingBundle) async { + FlutterProject flutterProject, + String gradle, + BuildInfo buildInfo, + String target, + bool isBuildingBundle, +) async { final GradleProject project = await _gradleProject(); String assembleTask;
diff --git a/packages/flutter_tools/lib/src/application_package.dart b/packages/flutter_tools/lib/src/application_package.dart index 989ca6f..e274519 100644 --- a/packages/flutter_tools/lib/src/application_package.dart +++ b/packages/flutter_tools/lib/src/application_package.dart
@@ -26,8 +26,9 @@ static ApplicationPackageFactory get instance => context[ApplicationPackageFactory]; Future<ApplicationPackage> getPackageForPlatform( - TargetPlatform platform, - {File applicationBinary}) async { + TargetPlatform platform, { + File applicationBinary, + }) async { switch (platform) { case TargetPlatform.android_arm: case TargetPlatform.android_arm64:
diff --git a/packages/flutter_tools/lib/src/artifacts.dart b/packages/flutter_tools/lib/src/artifacts.dart index 9bf9280..fad2228 100644 --- a/packages/flutter_tools/lib/src/artifacts.dart +++ b/packages/flutter_tools/lib/src/artifacts.dart
@@ -30,7 +30,7 @@ kernelWorkerSnapshot, } -String _artifactToFileName(Artifact artifact, [TargetPlatform platform, BuildMode mode]) { +String _artifactToFileName(Artifact artifact, [ TargetPlatform platform, BuildMode mode ]) { switch (artifact) { case Artifact.genSnapshot: return 'gen_snapshot'; @@ -101,18 +101,18 @@ } // Returns the requested [artifact] for the [platform] and [mode] combination. - String getArtifactPath(Artifact artifact, [TargetPlatform platform, BuildMode mode]); + String getArtifactPath(Artifact artifact, [ TargetPlatform platform, BuildMode mode ]); // Returns which set of engine artifacts is currently used for the [platform] // and [mode] combination. - String getEngineType(TargetPlatform platform, [BuildMode mode]); + String getEngineType(TargetPlatform platform, [ BuildMode mode ]); } /// Manages the engine artifacts downloaded to the local cache. class CachedArtifacts extends Artifacts { @override - String getArtifactPath(Artifact artifact, [TargetPlatform platform, BuildMode mode]) { + String getArtifactPath(Artifact artifact, [ TargetPlatform platform, BuildMode mode ]) { platform ??= _currentHostPlatform; switch (platform) { case TargetPlatform.android_arm: @@ -135,7 +135,7 @@ } @override - String getEngineType(TargetPlatform platform, [BuildMode mode]) { + String getEngineType(TargetPlatform platform, [ BuildMode mode ]) { return fs.path.basename(_getEngineArtifactsPath(platform, mode)); } @@ -207,7 +207,7 @@ } } - String _getEngineArtifactsPath(TargetPlatform platform, [BuildMode mode]) { + String _getEngineArtifactsPath(TargetPlatform platform, [ BuildMode mode ]) { final String engineDir = cache.getArtifactDirectory('engine').path; final String platformName = getNameForTargetPlatform(platform); switch (platform) { @@ -252,7 +252,7 @@ String _hostEngineOutPath; @override - String getArtifactPath(Artifact artifact, [TargetPlatform platform, BuildMode mode]) { + String getArtifactPath(Artifact artifact, [ TargetPlatform platform, BuildMode mode ]) { switch (artifact) { case Artifact.snapshotDart: return fs.path.join(_engineSrcPath, 'flutter', 'lib', 'snapshot', _artifactToFileName(artifact)); @@ -287,7 +287,7 @@ } @override - String getEngineType(TargetPlatform platform, [BuildMode mode]) { + String getEngineType(TargetPlatform platform, [ BuildMode mode ]) { return fs.path.basename(engineOutPath); } @@ -340,7 +340,7 @@ final File flutterPatchedSdk; @override - String getArtifactPath(Artifact artifact, [TargetPlatform platform, BuildMode mode]) { + String getArtifactPath(Artifact artifact, [ TargetPlatform platform, BuildMode mode ]) { if (artifact == Artifact.frontendServerSnapshotForEngineDartSdk && frontendServer != null) { return frontendServer.path; } @@ -357,5 +357,5 @@ } @override - String getEngineType(TargetPlatform platform, [BuildMode mode]) => parent.getEngineType(platform, mode); + String getEngineType(TargetPlatform platform, [ BuildMode mode ]) => parent.getEngineType(platform, mode); }
diff --git a/packages/flutter_tools/lib/src/asset.dart b/packages/flutter_tools/lib/src/asset.dart index d97d81b..574e92d 100644 --- a/packages/flutter_tools/lib/src/asset.dart +++ b/packages/flutter_tools/lib/src/asset.dart
@@ -36,7 +36,7 @@ bool wasBuiltOnce(); - bool needsBuild({String manifestPath = _ManifestAssetBundle.defaultManifestPath}); + bool needsBuild({ String manifestPath = _ManifestAssetBundle.defaultManifestPath }); /// Returns 0 for success; non-zero for failure. Future<int> build({ @@ -75,7 +75,7 @@ bool wasBuiltOnce() => _lastBuildTimestamp != null; @override - bool needsBuild({String manifestPath = defaultManifestPath}) { + bool needsBuild({ String manifestPath = defaultManifestPath }) { if (_lastBuildTimestamp == null) return true; @@ -303,9 +303,9 @@ /// Returns a DevFSContent representing the license file. Future<DevFSContent> _obtainLicenses( PackageMap packageMap, - String assetBase, - { bool reportPackages } -) async { + String assetBase, { + bool reportPackages, +}) async { // Read the LICENSE file from each package in the .packages file, splitting // each one into each component license (so that we can de-dupe if possible). // @@ -564,7 +564,8 @@ return result; } -void _parseAssetsFromFolder(PackageMap packageMap, +void _parseAssetsFromFolder( + PackageMap packageMap, FlutterManifest flutterManifest, String assetBase, _AssetDirectoryCache cache, @@ -595,7 +596,8 @@ } } -void _parseAssetFromFile(PackageMap packageMap, +void _parseAssetFromFile( + PackageMap packageMap, FlutterManifest flutterManifest, String assetBase, _AssetDirectoryCache cache,
diff --git a/packages/flutter_tools/lib/src/base/file_system.dart b/packages/flutter_tools/lib/src/base/file_system.dart index 3123e35..5bb23ab 100644 --- a/packages/flutter_tools/lib/src/base/file_system.dart +++ b/packages/flutter_tools/lib/src/base/file_system.dart
@@ -68,7 +68,7 @@ /// specified for each source/destination file pair. /// /// Creates `destDir` if needed. -void copyDirectorySync(Directory srcDir, Directory destDir, [void onFileCopied(File srcFile, File destFile)]) { +void copyDirectorySync(Directory srcDir, Directory destDir, [ void onFileCopied(File srcFile, File destFile) ]) { if (!srcDir.existsSync()) throw Exception('Source directory "${srcDir.path}" does not exist, nothing to copy'); @@ -151,7 +151,7 @@ /// Returns true, if [entity] does not exist. /// /// Returns false, if [entity] exists, but [referenceFile] does not. -bool isOlderThanReference({@required FileSystemEntity entity, @required File referenceFile}) { +bool isOlderThanReference({ @required FileSystemEntity entity, @required File referenceFile }) { if (!entity.existsSync()) return true; return referenceFile.existsSync()
diff --git a/packages/flutter_tools/lib/src/base/io.dart b/packages/flutter_tools/lib/src/base/io.dart index a3de883..862f43b 100644 --- a/packages/flutter_tools/lib/src/base/io.dart +++ b/packages/flutter_tools/lib/src/base/io.dart
@@ -95,7 +95,7 @@ /// Sets the [exit] function to a function that throws an exception rather /// than exiting the process; this is intended for testing purposes. @visibleForTesting -void setExitFunctionForTests([ExitFunction exitFunction]) { +void setExitFunctionForTests([ ExitFunction exitFunction ]) { _exitFunction = exitFunction ?? (int exitCode) { throw ProcessExit(exitCode, immediate: true); };
diff --git a/packages/flutter_tools/lib/src/base/logger.dart b/packages/flutter_tools/lib/src/base/logger.dart index f0585de..dc8fca3 100644 --- a/packages/flutter_tools/lib/src/base/logger.dart +++ b/packages/flutter_tools/lib/src/base/logger.dart
@@ -389,7 +389,7 @@ )..start(); } - void _emit(_LogType type, String message, [StackTrace stackTrace]) { + void _emit(_LogType type, String message, [ StackTrace stackTrace ]) { if (message.trim().isEmpty) return;
diff --git a/packages/flutter_tools/lib/src/base/net.dart b/packages/flutter_tools/lib/src/base/net.dart index 5196fc79..742bd8b 100644 --- a/packages/flutter_tools/lib/src/base/net.dart +++ b/packages/flutter_tools/lib/src/base/net.dart
@@ -33,7 +33,7 @@ Future<bool> doesRemoteFileExist(Uri url) async => (await _attempt(url, onlyHeaders: true)) != null; -Future<List<int>> _attempt(Uri url, {bool onlyHeaders = false}) async { +Future<List<int>> _attempt(Uri url, { bool onlyHeaders = false }) async { printTrace('Downloading: $url'); HttpClient httpClient; if (context[HttpClientFactory] != null) {
diff --git a/packages/flutter_tools/lib/src/base/os.dart b/packages/flutter_tools/lib/src/base/os.dart index 54f5964..4cb0e5c 100644 --- a/packages/flutter_tools/lib/src/base/os.dart +++ b/packages/flutter_tools/lib/src/base/os.dart
@@ -68,7 +68,7 @@ return osNames.containsKey(osName) ? osNames[osName] : osName; } - List<File> _which(String execName, {bool all = false}); + List<File> _which(String execName, { bool all = false }); /// Returns the separator between items in the PATH environment variable. String get pathVarSeparator; @@ -83,7 +83,7 @@ } @override - List<File> _which(String execName, {bool all = false}) { + List<File> _which(String execName, { bool all = false }) { final List<String> command = <String>['which']; if (all) command.add('-a'); @@ -159,7 +159,7 @@ } @override - List<File> _which(String execName, {bool all = false}) { + List<File> _which(String execName, { bool all = false }) { // `where` always returns all matches, not just the first one. final ProcessResult result = processManager.runSync(<String>['where', execName]); if (result.exitCode != 0) @@ -264,7 +264,7 @@ /// directory or the current working directory if none specified. /// Return null if the project root could not be found /// or if the project root is the flutter repository root. -String findProjectRoot([String directory]) { +String findProjectRoot([ String directory ]) { const String kProjectRootSentinel = 'pubspec.yaml'; directory ??= fs.currentDirectory.path; while (true) {
diff --git a/packages/flutter_tools/lib/src/base/process.dart b/packages/flutter_tools/lib/src/base/process.dart index 0e18d38..fff1252 100644 --- a/packages/flutter_tools/lib/src/base/process.dart +++ b/packages/flutter_tools/lib/src/base/process.dart
@@ -94,7 +94,7 @@ printTrace('Shutdown hooks complete'); } -Map<String, String> _environment(bool allowReentrantFlutter, [Map<String, String> environment]) { +Map<String, String> _environment(bool allowReentrantFlutter, [ Map<String, String> environment ]) { if (allowReentrantFlutter) { if (environment == null) environment = <String, String>{ 'FLUTTER_ALREADY_LOCKED': 'true' }; @@ -107,7 +107,8 @@ /// This runs the command in the background from the specified working /// directory. Completes when the process has been started. -Future<Process> runCommand(List<String> cmd, { +Future<Process> runCommand( + List<String> cmd, { String workingDirectory, bool allowReentrantFlutter = false, Map<String, String> environment @@ -128,7 +129,8 @@ /// If [filter] is non-null, all lines that do not match it are removed. If /// [mapFunction] is present, all lines that match [filter] are also forwarded /// to [mapFunction] for further processing. -Future<int> runCommandAndStreamOutput(List<String> cmd, { +Future<int> runCommandAndStreamOutput( + List<String> cmd, { String workingDirectory, bool allowReentrantFlutter = false, String prefix = '', @@ -187,7 +189,8 @@ /// Runs the [command] interactively, connecting the stdin/stdout/stderr /// streams of this process to those of the child process. Completes with /// the exit code of the child process. -Future<int> runInteractively(List<String> command, { +Future<int> runInteractively( + List<String> command, { String workingDirectory, bool allowReentrantFlutter = false, Map<String, String> environment @@ -219,7 +222,8 @@ return proc; } -Future<RunResult> runAsync(List<String> cmd, { +Future<RunResult> runAsync( + List<String> cmd, { String workingDirectory, bool allowReentrantFlutter = false, Map<String, String> environment @@ -235,7 +239,8 @@ return runResults; } -Future<RunResult> runCheckedAsync(List<String> cmd, { +Future<RunResult> runCheckedAsync( + List<String> cmd, { String workingDirectory, bool allowReentrantFlutter = false, Map<String, String> environment @@ -274,7 +279,8 @@ /// Run cmd and return stdout. /// /// Throws an error if cmd exits with a non-zero value. -String runCheckedSync(List<String> cmd, { +String runCheckedSync( + List<String> cmd, { String workingDirectory, bool allowReentrantFlutter = false, bool hideStdout = false, @@ -292,7 +298,8 @@ } /// Run cmd and return stdout. -String runSync(List<String> cmd, { +String runSync( + List<String> cmd, { String workingDirectory, bool allowReentrantFlutter = false }) { @@ -312,7 +319,8 @@ } } -String _runWithLoggingSync(List<String> cmd, { +String _runWithLoggingSync( + List<String> cmd, { bool checked = false, bool noisyErrors = false, bool throwStandardErrorOnError = false,
diff --git a/packages/flutter_tools/lib/src/base/utils.dart b/packages/flutter_tools/lib/src/base/utils.dart index 2062631..a309293 100644 --- a/packages/flutter_tools/lib/src/base/utils.dart +++ b/packages/flutter_tools/lib/src/base/utils.dart
@@ -79,7 +79,7 @@ final RegExp _upperRegex = RegExp(r'[A-Z]'); /// Convert `fooBar` to `foo_bar`. -String snakeCase(String str, [String sep = '_']) { +String snakeCase(String str, [ String sep = '_' ]) { return str.replaceAllMapped(_upperRegex, (Match m) => '${m.start == 0 ? '' : sep}${m[0].toLowerCase()}'); } @@ -343,7 +343,7 @@ /// /// The [indent] and [hangingIndent] must be smaller than [columnWidth] when /// added together. -String wrapText(String text, {int columnWidth, int hangingIndent, int indent, bool shouldWrap}) { +String wrapText(String text, { int columnWidth, int hangingIndent, int indent, bool shouldWrap }) { if (text == null || text.isEmpty) { return ''; } @@ -431,7 +431,7 @@ /// If [outputPreferences.wrapText] is false, then the text will be returned /// simply split at the newlines, but not wrapped. If [shouldWrap] is specified, /// then it overrides the [outputPreferences.wrapText] setting. -List<String> _wrapTextAsLines(String text, {int start = 0, int columnWidth, bool shouldWrap}) { +List<String> _wrapTextAsLines(String text, { int start = 0, int columnWidth, bool shouldWrap }) { if (text == null || text.isEmpty) { return <String>['']; } @@ -491,7 +491,7 @@ return result; } - String joinRun(List<_AnsiRun> list, int start, [int end]) { + String joinRun(List<_AnsiRun> list, int start, [ int end ]) { return list.sublist(start, end).map<String>((_AnsiRun run) => run.original).join().trim(); }
diff --git a/packages/flutter_tools/lib/src/bundle.dart b/packages/flutter_tools/lib/src/bundle.dart index 2d810a8..ac3d219 100644 --- a/packages/flutter_tools/lib/src/bundle.dart +++ b/packages/flutter_tools/lib/src/bundle.dart
@@ -22,7 +22,7 @@ const String defaultManifestPath = 'pubspec.yaml'; String get defaultDepfilePath => fs.path.join(getBuildDirectory(), 'snapshot_blob.bin.d'); -String getDefaultApplicationKernelPath({@required bool trackWidgetCreation}) { +String getDefaultApplicationKernelPath({ @required bool trackWidgetCreation }) { return getKernelPathForTransformerOptions( fs.path.join(getBuildDirectory(), 'app.dill'), trackWidgetCreation: trackWidgetCreation, @@ -222,7 +222,9 @@ } Future<void> writeBundle( - Directory bundleDir, Map<String, DevFSContent> assetEntries) async { + Directory bundleDir, + Map<String, DevFSContent> assetEntries, +) async { if (bundleDir.existsSync()) bundleDir.deleteSync(recursive: true); bundleDir.createSync(recursive: true);
diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart index fe5089e..e1c1641 100644 --- a/packages/flutter_tools/lib/src/cache.dart +++ b/packages/flutter_tools/lib/src/cache.dart
@@ -524,8 +524,10 @@ } } - Future<bool> areRemoteArtifactsAvailable({String engineVersion, - bool includeAllPlatforms = true}) async { + Future<bool> areRemoteArtifactsAvailable({ + String engineVersion, + bool includeAllPlatforms = true, + }) async { final bool includeAllPlatformsState = cache.includeAllPlatforms; cache.includeAllPlatforms = includeAllPlatforms;
diff --git a/packages/flutter_tools/lib/src/commands/attach.dart b/packages/flutter_tools/lib/src/commands/attach.dart index 81cfd2b..6f4dc41 100644 --- a/packages/flutter_tools/lib/src/commands/attach.dart +++ b/packages/flutter_tools/lib/src/commands/attach.dart
@@ -275,18 +275,19 @@ } class HotRunnerFactory { - HotRunner build(List<FlutterDevice> devices, { - String target, - DebuggingOptions debuggingOptions, - bool usesTerminalUI = true, - bool benchmarkMode = false, - File applicationBinary, - bool hostIsIde = false, - String projectRootPath, - String packagesFilePath, - String dillOutputPath, - bool stayResident = true, - bool ipv6 = false, + HotRunner build( + List<FlutterDevice> devices, { + String target, + DebuggingOptions debuggingOptions, + bool usesTerminalUI = true, + bool benchmarkMode = false, + File applicationBinary, + bool hostIsIde = false, + String projectRootPath, + String packagesFilePath, + String dillOutputPath, + bool stayResident = true, + bool ipv6 = false, }) => HotRunner( devices, target: target,
diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart index 2a13c4c..53fdd7b 100644 --- a/packages/flutter_tools/lib/src/commands/create.dart +++ b/packages/flutter_tools/lib/src/commands/create.dart
@@ -395,7 +395,7 @@ return null; } - Future<int> _generateModule(Directory directory, Map<String, dynamic> templateContext, {bool overwrite = false}) async { + Future<int> _generateModule(Directory directory, Map<String, dynamic> templateContext, { bool overwrite = false }) async { int generatedCount = 0; final String description = argResults.wasParsed('description') ? argResults['description'] @@ -414,7 +414,7 @@ return generatedCount; } - Future<int> _generatePackage(Directory directory, Map<String, dynamic> templateContext, {bool overwrite = false}) async { + Future<int> _generatePackage(Directory directory, Map<String, dynamic> templateContext, { bool overwrite = false }) async { int generatedCount = 0; final String description = argResults.wasParsed('description') ? argResults['description'] @@ -431,7 +431,7 @@ return generatedCount; } - Future<int> _generatePlugin(Directory directory, Map<String, dynamic> templateContext, {bool overwrite = false}) async { + Future<int> _generatePlugin(Directory directory, Map<String, dynamic> templateContext, { bool overwrite = false }) async { int generatedCount = 0; final String description = argResults.wasParsed('description') ? argResults['description'] @@ -463,7 +463,7 @@ return generatedCount; } - Future<int> _generateApp(Directory directory, Map<String, dynamic> templateContext, {bool overwrite = false}) async { + Future<int> _generateApp(Directory directory, Map<String, dynamic> templateContext, { bool overwrite = false }) async { int generatedCount = 0; generatedCount += _renderTemplate('app', directory, templateContext, overwrite: overwrite); final FlutterProject project = await FlutterProject.fromDirectory(directory); @@ -536,7 +536,7 @@ }; } - int _renderTemplate(String templateName, Directory directory, Map<String, dynamic> context, {bool overwrite = false}) { + int _renderTemplate(String templateName, Directory directory, Map<String, dynamic> context, { bool overwrite = false }) { final Template template = Template.fromName(templateName); return template.render(directory, context, overwriteExisting: overwrite); }
diff --git a/packages/flutter_tools/lib/src/commands/daemon.dart b/packages/flutter_tools/lib/src/commands/daemon.dart index a632028..3e522a8 100644 --- a/packages/flutter_tools/lib/src/commands/daemon.dart +++ b/packages/flutter_tools/lib/src/commands/daemon.dart
@@ -161,7 +161,7 @@ void _send(Map<String, dynamic> map) => sendCommand(map); - void shutdown({dynamic error}) { + void shutdown({ dynamic error }) { _commandSubscription?.cancel(); for (Domain domain in _domainMap.values) domain.dispose(); @@ -210,7 +210,7 @@ }); } - void sendEvent(String name, [dynamic args]) { + void sendEvent(String name, [ dynamic args ]) { final Map<String, dynamic> map = <String, dynamic>{ 'event': name }; if (args != null) map['params'] = _toJsonable(args); @@ -333,8 +333,12 @@ final List<AppInstance> _apps = <AppInstance>[]; Future<AppInstance> startApp( - Device device, String projectDirectory, String target, String route, - DebuggingOptions options, bool enableHotReload, { + Device device, + String projectDirectory, + String target, + String route, + DebuggingOptions options, + bool enableHotReload, { File applicationBinary, @required bool trackWidgetCreation, String projectRootPath, @@ -405,13 +409,14 @@ } Future<AppInstance> launch( - ResidentRunner runner, - _RunOrAttach runOrAttach, - Device device, - String projectDirectory, - bool enableHotReload, - Directory cwd, - LaunchMode launchMode) async { + ResidentRunner runner, + _RunOrAttach runOrAttach, + Device device, + String projectDirectory, + bool enableHotReload, + Directory cwd, + LaunchMode launchMode, + ) async { final AppInstance app = AppInstance(_getNewAppId(), runner: runner, logToStdout: daemon.logToStdout); _apps.add(app); @@ -562,7 +567,7 @@ return _apps.firstWhere((AppInstance app) => app.id == id, orElse: () => null); } - void _sendAppEvent(AppInstance app, String name, [Map<String, dynamic> args]) { + void _sendAppEvent(AppInstance app, String name, [ Map<String, dynamic> args ]) { final Map<String, dynamic> eventArgs = <String, dynamic> { 'appId': app.id }; if (args != null) eventArgs.addAll(args); @@ -620,7 +625,7 @@ /// Return a list of the current devices, with each device represented as a map /// of properties (id, name, platform, ...). - Future<List<Map<String, dynamic>>> getDevices([Map<String, dynamic> args]) async { + Future<List<Map<String, dynamic>>> getDevices([ Map<String, dynamic> args ]) async { final List<Map<String, dynamic>> devicesInfo = <Map<String, dynamic>>[]; for (PollingDeviceDiscovery discoverer in _discoverers) { @@ -761,27 +766,27 @@ @override void printError( - String message, { - StackTrace stackTrace, - bool emphasis = false, - TerminalColor color, - int indent, - int hangingIndent, - bool wrap, - }) { + String message, { + StackTrace stackTrace, + bool emphasis = false, + TerminalColor color, + int indent, + int hangingIndent, + bool wrap, + }) { _messageController.add(LogMessage('error', message, stackTrace)); } @override void printStatus( - String message, { - bool emphasis = false, - TerminalColor color, - bool newline = true, - int indent, - int hangingIndent, - bool wrap, - }) { + String message, { + bool emphasis = false, + TerminalColor color, + bool newline = true, + int indent, + int hangingIndent, + bool wrap, + }) { _messageController.add(LogMessage('status', message)); } @@ -851,7 +856,7 @@ EmulatorManager emulators = EmulatorManager(); - Future<List<Map<String, dynamic>>> getEmulators([Map<String, dynamic> args]) async { + Future<List<Map<String, dynamic>>> getEmulators([ Map<String, dynamic> args ]) async { final List<Emulator> list = await emulators.getAllAvailableEmulators(); return list.map<Map<String, dynamic>>(_emulatorToMap).toList(); } @@ -898,14 +903,14 @@ @override void printError( - String message, { - StackTrace stackTrace, - bool emphasis, - TerminalColor color, - int indent, - int hangingIndent, - bool wrap, - }) { + String message, { + StackTrace stackTrace, + bool emphasis, + TerminalColor color, + int indent, + int hangingIndent, + bool wrap, + }) { if (parent != null) { parent.printError( message, @@ -933,14 +938,14 @@ @override void printStatus( - String message, { - bool emphasis = false, - TerminalColor color, - bool newline = true, - int indent, - int hangingIndent, - bool wrap, - }) { + String message, { + bool emphasis = false, + TerminalColor color, + bool newline = true, + int indent, + int hangingIndent, + bool wrap, + }) { if (parent != null) { parent.printStatus( message,
diff --git a/packages/flutter_tools/lib/src/commands/emulators.dart b/packages/flutter_tools/lib/src/commands/emulators.dart index 4821519..471a26d 100644 --- a/packages/flutter_tools/lib/src/commands/emulators.dart +++ b/packages/flutter_tools/lib/src/commands/emulators.dart
@@ -83,7 +83,7 @@ } } - Future<void> _createEmulator({String name}) async { + Future<void> _createEmulator({ String name }) async { final CreateEmulatorResult createResult = await emulatorManager.createEmulator(name: name); @@ -118,8 +118,10 @@ _printAdditionalInfo(showCreateInstruction: true, showRunInstruction: true); } - void _printAdditionalInfo({ bool showRunInstruction = false, - bool showCreateInstruction = false }) { + void _printAdditionalInfo({ + bool showRunInstruction = false, + bool showCreateInstruction = false, + }) { printStatus(''); if (showRunInstruction) { printStatus(
diff --git a/packages/flutter_tools/lib/src/commands/ide_config.dart b/packages/flutter_tools/lib/src/commands/ide_config.dart index f153b3b..e977779 100644 --- a/packages/flutter_tools/lib/src/commands/ide_config.dart +++ b/packages/flutter_tools/lib/src/commands/ide_config.dart
@@ -266,7 +266,7 @@ /// Return null if the flutter root directory is a valid destination. Return a /// validation message if we should disallow the directory. -String _validateFlutterDir(String dirPath, {String flutterRoot}) { +String _validateFlutterDir(String dirPath, { String flutterRoot }) { final FileSystemEntityType type = fs.typeSync(dirPath); if (type != FileSystemEntityType.notFound) {
diff --git a/packages/flutter_tools/lib/src/commands/update_packages.dart b/packages/flutter_tools/lib/src/commands/update_packages.dart index 5f7c5d8..cfd678a 100644 --- a/packages/flutter_tools/lib/src/commands/update_packages.dart +++ b/packages/flutter_tools/lib/src/commands/update_packages.dart
@@ -1187,7 +1187,8 @@ /// The transitive closure of all the dependencies for the given package, /// excluding any listen in `seen`. - Iterable<String> getTransitiveDependenciesFor(String package, { + Iterable<String> getTransitiveDependenciesFor( + String package, { @required Set<String> seen, @required Set<String> exclude, }) sync* {
diff --git a/packages/flutter_tools/lib/src/compile.dart b/packages/flutter_tools/lib/src/compile.dart index 8fa4ed7..4b69371 100644 --- a/packages/flutter_tools/lib/src/compile.dart +++ b/packages/flutter_tools/lib/src/compile.dart
@@ -22,7 +22,7 @@ KernelCompiler get kernelCompiler => context[KernelCompiler]; -typedef CompilerMessageConsumer = void Function(String message, {bool emphasis, TerminalColor color}); +typedef CompilerMessageConsumer = void Function(String message, { bool emphasis, TerminalColor color }); /// The target model describes the set of core libraries that are availible within /// the SDK. @@ -101,7 +101,7 @@ // This is needed to get ready to process next compilation result output, // with its own boundary key and new completer. - void reset({bool suppressCompilerMessages = false}) { + void reset({ bool suppressCompilerMessages = false }) { boundaryKey = null; compilerMessageReceived = false; compilerOutput = Completer<CompilerOutput>(); @@ -397,8 +397,12 @@ /// point that is used for recompilation. /// Binary file name is returned if compilation was successful, otherwise /// null is returned. - Future<CompilerOutput> recompile(String mainPath, List<String> invalidatedFiles, - {@required String outputPath, String packagesFilePath}) async { + Future<CompilerOutput> recompile( + String mainPath, + List<String> invalidatedFiles, { + @required String outputPath, + String packagesFilePath, + }) async { assert (outputPath != null); if (!_controller.hasListener) { _controller.stream.listen(_handleCompilationRequest); @@ -466,8 +470,11 @@ } } - Future<CompilerOutput> _compile(String scriptUri, String outputPath, - String packagesFilePath) async { + Future<CompilerOutput> _compile( + String scriptUri, + String outputPath, + String packagesFilePath, + ) async { final String frontendServer = artifacts.getArtifactPath( Artifact.frontendServerSnapshotForEngineDartSdk ); @@ -535,8 +542,14 @@ return _stdoutHandler.compilerOutput.future; } - Future<CompilerOutput> compileExpression(String expression, List<String> definitions, - List<String> typeDefinitions, String libraryUri, String klass, bool isStatic) { + Future<CompilerOutput> compileExpression( + String expression, + List<String> definitions, + List<String> typeDefinitions, + String libraryUri, + String klass, + bool isStatic, + ) { if (!_controller.hasListener) { _controller.stream.listen(_handleCompilationRequest); } @@ -549,8 +562,7 @@ return completer.future; } - Future<CompilerOutput> _compileExpression( - _CompileExpressionRequest request) async { + Future<CompilerOutput> _compileExpression(_CompileExpressionRequest request) async { _stdoutHandler.reset(suppressCompilerMessages: true); // 'compile-expression' should be invoked after compiler has been started,
diff --git a/packages/flutter_tools/lib/src/convert.dart b/packages/flutter_tools/lib/src/convert.dart index 83c8d7d..2aedb81 100644 --- a/packages/flutter_tools/lib/src/convert.dart +++ b/packages/flutter_tools/lib/src/convert.dart
@@ -33,7 +33,7 @@ final bool reportErrors; @override - String convert(List<int> codeUnits, [int start = 0, int end]) { + String convert(List<int> codeUnits, [ int start = 0, int end ]) { final String result = super.convert(codeUnits, start, end); // Finding a unicode replacement character indicates that the input // was malformed.
diff --git a/packages/flutter_tools/lib/src/dart/pub.dart b/packages/flutter_tools/lib/src/dart/pub.dart index ce61edac..4de54f8 100644 --- a/packages/flutter_tools/lib/src/dart/pub.dart +++ b/packages/flutter_tools/lib/src/dart/pub.dart
@@ -135,7 +135,8 @@ /// /// [context] provides extra information to package server requests to /// understand usage. -Future<void> pub(List<String> arguments, { +Future<void> pub( + List<String> arguments, { @required PubContext context, String directory, MessageFilter filter, @@ -173,7 +174,8 @@ /// Runs pub in 'interactive' mode, directly piping the stdin stream of this /// process to that of pub, and the stdout/stderr stream of pub to the corresponding /// streams of this process. -Future<void> pubInteractively(List<String> arguments, { +Future<void> pubInteractively( + List<String> arguments, { String directory, }) async { Cache.releaseLockEarly();
diff --git a/packages/flutter_tools/lib/src/devfs.dart b/packages/flutter_tools/lib/src/devfs.dart index 95fc213..66b473a 100644 --- a/packages/flutter_tools/lib/src/devfs.dart +++ b/packages/flutter_tools/lib/src/devfs.dart
@@ -634,11 +634,12 @@ return false; } - bool _shouldSkip(FileSystemEntity file, - String relativePath, - Uri directoryUriOnDevice, { - bool ignoreDotFiles = true, - }) { + bool _shouldSkip( + FileSystemEntity file, + String relativePath, + Uri directoryUriOnDevice, { + bool ignoreDotFiles = true, + }) { if (file is Directory) { // Skip non-files. return true; @@ -653,8 +654,7 @@ return false; } - Uri _directoryUriOnDevice(Uri directoryUriOnDevice, - Directory directory) { + Uri _directoryUriOnDevice(Uri directoryUriOnDevice, Directory directory) { if (directoryUriOnDevice == null) { final String relativeRootPath = fs.path.relative(directory.path, from: rootDirectory.path); if (relativeRootPath == '.') { @@ -668,10 +668,12 @@ /// Scan all files from the [fileFilter] that are contained in [directory] and /// pass various filters (e.g. ignoreDotFiles). - Future<bool> _scanFilteredDirectory(Set<String> fileFilter, - Directory directory, - {Uri directoryUriOnDevice, - bool ignoreDotFiles = true}) async { + Future<bool> _scanFilteredDirectory( + Set<String> fileFilter, + Directory directory, { + Uri directoryUriOnDevice, + bool ignoreDotFiles = true, + }) async { directoryUriOnDevice = _directoryUriOnDevice(directoryUriOnDevice, directory); try { @@ -700,11 +702,13 @@ } /// Scan all files in [directory] that pass various filters (e.g. ignoreDotFiles). - Future<bool> _scanDirectory(Directory directory, - {Uri directoryUriOnDevice, - bool recursive = false, - bool ignoreDotFiles = true, - Set<String> fileFilter}) async { + Future<bool> _scanDirectory( + Directory directory, { + Uri directoryUriOnDevice, + bool recursive = false, + bool ignoreDotFiles = true, + Set<String> fileFilter, + }) async { directoryUriOnDevice = _directoryUriOnDevice(directoryUriOnDevice, directory); if ((fileFilter != null) && fileFilter.isNotEmpty) { // When the fileFilter isn't empty, we can skip crawling the directory
diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart index dc2a844..65c46ca 100644 --- a/packages/flutter_tools/lib/src/device.dart +++ b/packages/flutter_tools/lib/src/device.dart
@@ -247,7 +247,7 @@ /// Get a log reader for this device. /// If [app] is specified, this will return a log reader specific to that /// application. Otherwise, a global log reader will be returned. - DeviceLogReader getLogReader({ApplicationPackage app}); + DeviceLogReader getLogReader({ ApplicationPackage app }); /// Get the port forwarder for this device. DevicePortForwarder get portForwarder; @@ -425,7 +425,7 @@ /// Forward [hostPort] on the host to [devicePort] on the device. /// If [hostPort] is null or zero, will auto select a host port. /// Returns a Future that completes with the host port. - Future<int> forward(int devicePort, {int hostPort}); + Future<int> forward(int devicePort, { int hostPort }); /// Stops forwarding [forwardedPort]. Future<void> unforward(ForwardedPort forwardedPort); @@ -471,7 +471,7 @@ const NoOpDevicePortForwarder(); @override - Future<int> forward(int devicePort, {int hostPort}) async => devicePort; + Future<int> forward(int devicePort, { int hostPort }) async => devicePort; @override List<ForwardedPort> get forwardedPorts => <ForwardedPort>[];
diff --git a/packages/flutter_tools/lib/src/emulator.dart b/packages/flutter_tools/lib/src/emulator.dart index 51d0706..3672d44 100644 --- a/packages/flutter_tools/lib/src/emulator.dart +++ b/packages/flutter_tools/lib/src/emulator.dart
@@ -61,7 +61,7 @@ } /// Return the list of all available emulators. - Future<CreateEmulatorResult> createEmulator({String name}) async { + Future<CreateEmulatorResult> createEmulator({ String name }) async { if (name == null || name == '') { const String autoName = 'flutter_emulator'; // Don't use getEmulatorsMatching here, as it will only return one
diff --git a/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart b/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart index e874d6b..bb27e0c 100644 --- a/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart +++ b/packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
@@ -92,7 +92,7 @@ } @override - void addError(Object error, [StackTrace stackTrace]) { + void addError(Object error, [ StackTrace stackTrace ]) { _outputSink.addError(error, stackTrace); } @@ -205,7 +205,7 @@ Future<String> get sdkNameAndVersion async => 'Fuchsia'; @override - DeviceLogReader getLogReader({ApplicationPackage app}) => _logReader ??= _FuchsiaLogReader(this, app); + DeviceLogReader getLogReader({ ApplicationPackage app }) => _logReader ??= _FuchsiaLogReader(this, app); _FuchsiaLogReader _logReader; @override @@ -397,7 +397,7 @@ final Map<int, Process> _processes = <int, Process>{}; @override - Future<int> forward(int devicePort, {int hostPort}) async { + Future<int> forward(int devicePort, { int hostPort }) async { hostPort ??= await _findPort(); // Note: the provided command works around a bug in -N, see US-515 // for more explanation.
diff --git a/packages/flutter_tools/lib/src/intellij/intellij.dart b/packages/flutter_tools/lib/src/intellij/intellij.dart index 7bed197..4976613 100644 --- a/packages/flutter_tools/lib/src/intellij/intellij.dart +++ b/packages/flutter_tools/lib/src/intellij/intellij.dart
@@ -17,8 +17,11 @@ static final Version kMinFlutterPluginVersion = Version(16, 0, 0); void validatePackage( - List<ValidationMessage> messages, List<String> packageNames, String title, - {Version minVersion}) { + List<ValidationMessage> messages, + List<String> packageNames, + String title, { + Version minVersion, + }) { for (String packageName in packageNames) { if (!_hasPackage(packageName)) { continue;
diff --git a/packages/flutter_tools/lib/src/ios/devices.dart b/packages/flutter_tools/lib/src/ios/devices.dart index 43efdf3..c4e092e 100644 --- a/packages/flutter_tools/lib/src/ios/devices.dart +++ b/packages/flutter_tools/lib/src/ios/devices.dart
@@ -374,7 +374,7 @@ Future<String> get sdkNameAndVersion async => 'iOS $_sdkVersion'; @override - DeviceLogReader getLogReader({ApplicationPackage app}) { + DeviceLogReader getLogReader({ ApplicationPackage app }) { _logReaders ??= <ApplicationPackage, _IOSDeviceLogReader>{}; return _logReaders.putIfAbsent(app, () => _IOSDeviceLogReader(this, app)); } @@ -551,7 +551,7 @@ static const Duration _kiProxyPortForwardTimeout = Duration(seconds: 1); @override - Future<int> forward(int devicePort, {int hostPort}) async { + Future<int> forward(int devicePort, { int hostPort }) async { final bool autoselect = hostPort == null || hostPort == 0; if (autoselect) hostPort = 1024;
diff --git a/packages/flutter_tools/lib/src/ios/simulators.dart b/packages/flutter_tools/lib/src/ios/simulators.dart index 90c2d67..525a1da 100644 --- a/packages/flutter_tools/lib/src/ios/simulators.dart +++ b/packages/flutter_tools/lib/src/ios/simulators.dart
@@ -139,7 +139,7 @@ return result; } - Future<RunResult> launch(String deviceId, String appIdentifier, [List<String> launchArgs]) { + Future<RunResult> launch(String deviceId, String appIdentifier, [ List<String> launchArgs ]) { final List<String> args = <String>[_xcrunPath, 'simctl', 'launch', deviceId, appIdentifier]; if (launchArgs != null) args.addAll(launchArgs); @@ -434,7 +434,7 @@ } @override - DeviceLogReader getLogReader({ApplicationPackage app}) { + DeviceLogReader getLogReader({ ApplicationPackage app }) { assert(app is IOSApp); _logReaders ??= <ApplicationPackage, _IOSSimulatorLogReader>{}; return _logReaders.putIfAbsent(app, () => _IOSSimulatorLogReader(this, app)); @@ -700,7 +700,7 @@ } @override - Future<int> forward(int devicePort, {int hostPort}) async { + Future<int> forward(int devicePort, { int hostPort }) async { if (hostPort == null || hostPort == 0) { hostPort = devicePort; }
diff --git a/packages/flutter_tools/lib/src/linux/linux_device.dart b/packages/flutter_tools/lib/src/linux/linux_device.dart index 18637d1..c9c991a 100644 --- a/packages/flutter_tools/lib/src/linux/linux_device.dart +++ b/packages/flutter_tools/lib/src/linux/linux_device.dart
@@ -17,7 +17,7 @@ void clearLogs() {} @override - DeviceLogReader getLogReader({ApplicationPackage app}) => NoOpDeviceLogReader('linux'); + DeviceLogReader getLogReader({ ApplicationPackage app }) => NoOpDeviceLogReader('linux'); @override Future<bool> installApp(ApplicationPackage app) { @@ -50,7 +50,8 @@ Future<String> get sdkNameAndVersion async => os.name; @override - Future<LaunchResult> startApp(ApplicationPackage package, { + Future<LaunchResult> startApp( + ApplicationPackage package, { String mainPath, String route, DebuggingOptions debuggingOptions,
diff --git a/packages/flutter_tools/lib/src/macos/macos_device.dart b/packages/flutter_tools/lib/src/macos/macos_device.dart index 7ba605b..ac4c7bf 100644 --- a/packages/flutter_tools/lib/src/macos/macos_device.dart +++ b/packages/flutter_tools/lib/src/macos/macos_device.dart
@@ -23,7 +23,7 @@ void clearLogs() {} @override - DeviceLogReader getLogReader({ApplicationPackage app}) => NoOpDeviceLogReader('macos'); + DeviceLogReader getLogReader({ ApplicationPackage app }) => NoOpDeviceLogReader('macos'); // Since the host and target devices are the same, no work needs to be done // to install the application. @@ -56,7 +56,8 @@ Future<String> get sdkNameAndVersion async => os.name; @override - Future<LaunchResult> startApp(covariant MacOSApp package, { + Future<LaunchResult> startApp( + covariant MacOSApp package, { String mainPath, String route, DebuggingOptions debuggingOptions,
diff --git a/packages/flutter_tools/lib/src/resident_runner.dart b/packages/flutter_tools/lib/src/resident_runner.dart index 576240d..8db4102 100644 --- a/packages/flutter_tools/lib/src/resident_runner.dart +++ b/packages/flutter_tools/lib/src/resident_runner.dart
@@ -141,7 +141,8 @@ await Future.wait(futures).timeout(const Duration(seconds: 2), onTimeout: () { }); } - Future<Uri> setupDevFS(String fsName, + Future<Uri> setupDevFS( + String fsName, Directory rootDirectory, { String packagesFilePath }) { @@ -472,7 +473,7 @@ String get projectRootPath => _projectRootPath; String _mainPath; String get mainPath => _mainPath; - String getReloadPath({bool fullRestart}) => mainPath + (fullRestart ? '' : '.incremental') + '.dill'; + String getReloadPath({ bool fullRestart }) => mainPath + (fullRestart ? '' : '.incremental') + '.dill'; AssetBundle _assetBundle; AssetBundle get assetBundle => _assetBundle; @@ -980,7 +981,7 @@ /// Given the value of the --target option, return the path of the Dart file /// where the app's main function should be. -String findMainDartFile([String target]) { +String findMainDartFile([ String target ]) { target ??= ''; final String targetPath = fs.path.absolute(target); if (fs.isDirectorySync(targetPath))
diff --git a/packages/flutter_tools/lib/src/run_hot.dart b/packages/flutter_tools/lib/src/run_hot.dart index 116768a..cae7e4f 100644 --- a/packages/flutter_tools/lib/src/run_hot.dart +++ b/packages/flutter_tools/lib/src/run_hot.dart
@@ -141,8 +141,11 @@ return true; } - Future<void> _reloadSourcesService(String isolateId, - { bool force = false, bool pause = false }) async { + Future<void> _reloadSourcesService( + String isolateId, { + bool force = false, + bool pause = false, + }) async { // TODO(cbernaschina): check that isolateId is the id of the UI isolate. final OperationResult result = await restart(pauseAfterRestart: pause); if (!result.isOk) { @@ -164,10 +167,15 @@ } } - Future<String> _compileExpressionService(String isolateId, String expression, - List<String> definitions, List<String> typeDefinitions, - String libraryUri, String klass, bool isStatic, - ) async { + Future<String> _compileExpressionService( + String isolateId, + String expression, + List<String> definitions, + List<String> typeDefinitions, + String libraryUri, + String klass, + bool isStatic, + ) async { for (FlutterDevice device in flutterDevices) { if (device.generator != null) { final CompilerOutput compilerOutput = @@ -433,10 +441,12 @@ await Future.wait(futures); } - Future<void> _launchInView(FlutterDevice device, - Uri entryUri, - Uri packagesUri, - Uri assetsDirectoryUri) { + Future<void> _launchInView( + FlutterDevice device, + Uri entryUri, + Uri packagesUri, + Uri assetsDirectoryUri, + ) { final List<Future<void>> futures = <Future<void>>[]; for (FlutterView view in device.views) futures.add(view.runFromSource(entryUri, packagesUri, assetsDirectoryUri)); @@ -538,8 +548,10 @@ /// Returns [true] if the reload was successful. /// Prints errors if [printErrors] is [true]. - static bool validateReloadReport(Map<String, dynamic> reloadReport, - { bool printErrors = true }) { + static bool validateReloadReport( + Map<String, dynamic> reloadReport, { + bool printErrors = true, + }) { if (reloadReport == null) { if (printErrors) printError('Hot reload did not receive reload report.');
diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart index f3c903d..fc93ba6 100644 --- a/packages/flutter_tools/lib/src/runner/flutter_command.dart +++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart
@@ -139,7 +139,7 @@ /// /// [hide] indicates whether or not to hide these options when the user asks /// for help. - void usesFilesystemOptions({@required bool hide}) { + void usesFilesystemOptions({ @required bool hide }) { argParser ..addOption('output-dill', hide: hide, @@ -216,7 +216,7 @@ valueHelp: 'x.y.z'); } - void usesIsolateFilterOption({@required bool hide}) { + void usesIsolateFilterOption({ @required bool hide }) { argParser.addOption('isolate-filter', defaultsTo: null, hide: hide, @@ -224,7 +224,7 @@ 'Normally there\'s only one, but when adding Flutter to a pre-existing app it\'s possible to create multiple.'); } - void addBuildModeFlags({bool defaultToRelease = true, bool verboseHelp = false}) { + void addBuildModeFlags({ bool defaultToRelease = true, bool verboseHelp = false }) { defaultBuildMode = defaultToRelease ? BuildMode.release : BuildMode.debug; argParser.addFlag('debug', @@ -242,7 +242,7 @@ help: 'Enable dynamic code. Only allowed with --release or --profile.'); } - void addDynamicModeFlags({bool verboseHelp = false}) { + void addDynamicModeFlags({ bool verboseHelp = false }) { argParser.addOption('compilation-trace-file', defaultsTo: 'compilation.txt', hide: !verboseHelp, @@ -260,7 +260,7 @@ ); } - void addDynamicPatchingFlags({bool verboseHelp = false}) { + void addDynamicPatchingFlags({ bool verboseHelp = false }) { argParser.addOption('patch-number', hide: !verboseHelp, help: 'An integer used as an internal version number for dynamic patch.\n' @@ -291,7 +291,7 @@ addDynamicBaselineFlags(verboseHelp: verboseHelp); } - void addDynamicBaselineFlags({bool verboseHelp = false}) { + void addDynamicBaselineFlags({ bool verboseHelp = false }) { argParser.addOption('baseline-dir', defaultsTo: '.baseline', hide: !verboseHelp, @@ -301,7 +301,7 @@ ); } - void usesFuchsiaOptions({bool hide = false}) { + void usesFuchsiaOptions({ bool hide = false }) { argParser.addOption( 'target-model', help: 'Target model that determines what core libraries are available',
diff --git a/packages/flutter_tools/lib/src/services.dart b/packages/flutter_tools/lib/src/services.dart index fee5383..2eb5560 100644 --- a/packages/flutter_tools/lib/src/services.dart +++ b/packages/flutter_tools/lib/src/services.dart
@@ -26,8 +26,9 @@ /// Loads all services specified in `pubspec.yaml`. Parses each service config file, /// storing meta data in [services] and the list of jar files in [jars]. Future<void> parseServiceConfigs( - List<Map<String, String>> services, { List<File> jars } -) async { + List<Map<String, String>> services, { + List<File> jars, +}) async { Map<String, Uri> packageMap; try { packageMap = PackageMap(PackageMap.globalPackagesPath).map; @@ -95,7 +96,8 @@ /// ] /// } File generateServiceDefinitions( - String dir, List<Map<String, String>> servicesIn + String dir, + List<Map<String, String>> servicesIn, ) { final List<Map<String, String>> services = servicesIn.map<Map<String, String>>((Map<String, String> service) => <String, String>{
diff --git a/packages/flutter_tools/lib/src/test/event_printer.dart b/packages/flutter_tools/lib/src/test/event_printer.dart index e672f20..81fd5798 100644 --- a/packages/flutter_tools/lib/src/test/event_printer.dart +++ b/packages/flutter_tools/lib/src/test/event_printer.dart
@@ -18,7 +18,7 @@ <String, dynamic>{'observatoryUri': event.observatoryUri.toString()}); } - void _sendEvent(String name, [dynamic params]) { + void _sendEvent(String name, [ dynamic params ]) { final Map<String, dynamic> map = <String, dynamic>{ 'event': name}; if (params != null) { map['params'] = params;
diff --git a/packages/flutter_tools/lib/src/test/flutter_platform.dart b/packages/flutter_tools/lib/src/test/flutter_platform.dart index f93900f..451cf1a 100644 --- a/packages/flutter_tools/lib/src/test/flutter_platform.dart +++ b/packages/flutter_tools/lib/src/test/flutter_platform.dart
@@ -463,10 +463,15 @@ return remoteChannel; } - Future<String> _compileExpressionService(String isolateId, String expression, - List<String> definitions, List<String> typeDefinitions, - String libraryUri, String klass, bool isStatic, - ) async { + Future<String> _compileExpressionService( + String isolateId, + String expression, + List<String> definitions, + List<String> typeDefinitions, + String libraryUri, + String klass, + bool isStatic, + ) async { if (compiler == null || compiler.compiler == null) { throw 'Compiler is not set up properly to compile $expression'; } @@ -807,8 +812,12 @@ return outOfBandError; } - String _createListenerDart(List<_Finalizer> finalizers, int ourTestCount, - String testPath, HttpServer server) { + String _createListenerDart( + List<_Finalizer> finalizers, + int ourTestCount, + String testPath, + HttpServer server, + ) { // Prepare a temporary directory to store the Dart file that will talk to us. final Directory tempDir = fs.systemTempDirectory.createTempSync('flutter_test_listener.'); finalizers.add(() async { @@ -1061,7 +1070,7 @@ @override void add(S event) => _parent.add(event); @override - void addError(dynamic errorEvent, [StackTrace stackTrace]) => _parent.addError(errorEvent, stackTrace); + void addError(dynamic errorEvent, [ StackTrace stackTrace ]) => _parent.addError(errorEvent, stackTrace); @override Future<dynamic> addStream(Stream<S> stream) => _parent.addStream(stream); }
diff --git a/packages/flutter_tools/lib/src/tester/flutter_tester.dart b/packages/flutter_tools/lib/src/tester/flutter_tester.dart index ea52c54..463d84c 100644 --- a/packages/flutter_tools/lib/src/tester/flutter_tester.dart +++ b/packages/flutter_tools/lib/src/tester/flutter_tester.dart
@@ -71,7 +71,7 @@ _FlutterTesterDeviceLogReader(); @override - DeviceLogReader getLogReader({ApplicationPackage app}) => _logReader; + DeviceLogReader getLogReader({ ApplicationPackage app }) => _logReader; @override Future<bool> installApp(ApplicationPackage app) async => true; @@ -235,7 +235,7 @@ /// where the VM is running on the same machine and does not need ports forwarding. class _NoopPortForwarder extends DevicePortForwarder { @override - Future<int> forward(int devicePort, {int hostPort}) { + Future<int> forward(int devicePort, { int hostPort }) { if (hostPort != null && hostPort != devicePort) throw 'Forwarding to a different port is not supported by flutter tester'; return Future<int>.value(devicePort);
diff --git a/packages/flutter_tools/lib/src/usage.dart b/packages/flutter_tools/lib/src/usage.dart index 72d5857..3cd6c63 100644 --- a/packages/flutter_tools/lib/src/usage.dart +++ b/packages/flutter_tools/lib/src/usage.dart
@@ -91,8 +91,11 @@ _analytics.sendScreenView(command, parameters: parameters); } - void sendEvent(String category, String parameter, - { Map<String, String> parameters }) { + void sendEvent( + String category, + String parameter, { + Map<String, String> parameters, + }) { if (suppressAnalytics) return; @@ -106,7 +109,7 @@ String variableName, Duration duration, { String label, - }) { + }) { if (!suppressAnalytics) { _analytics.sendTiming( variableName,
diff --git a/packages/flutter_tools/lib/src/version.dart b/packages/flutter_tools/lib/src/version.dart index bd65cc3..e196816 100644 --- a/packages/flutter_tools/lib/src/version.dart +++ b/packages/flutter_tools/lib/src/version.dart
@@ -120,7 +120,7 @@ /// A date String describing the last framework commit. String get frameworkCommitDate => _latestGitCommitDate(); - static String _latestGitCommitDate([String branch]) { + static String _latestGitCommitDate([ String branch ]) { final List<String> args = <String>['git', 'log']; if (branch != null) @@ -171,7 +171,7 @@ static FlutterVersion get instance => context[FlutterVersion]; /// Return a short string for the version (e.g. `master/0.0.59-pre.92`, `scroll_refactor/a76bc8e22b`). - String getVersionString({bool redactUnknownBranches = false}) { + String getVersionString({ bool redactUnknownBranches = false }) { if (frameworkVersion != 'unknown') return '${getBranchName(redactUnknownBranches: redactUnknownBranches)}/$frameworkVersion'; return '${getBranchName(redactUnknownBranches: redactUnknownBranches)}/$frameworkRevisionShort'; @@ -496,7 +496,7 @@ /// /// If [lenient] is true and the command fails, returns an empty string. /// Otherwise, throws a [ToolExit] exception. -String _runSync(List<String> command, {bool lenient = true}) { +String _runSync(List<String> command, { bool lenient = true }) { final ProcessResult results = processManager.runSync(command, workingDirectory: Cache.flutterRoot); if (results.exitCode == 0)
diff --git a/packages/flutter_tools/lib/src/vmservice.dart b/packages/flutter_tools/lib/src/vmservice.dart index 2585c50..545443e 100644 --- a/packages/flutter_tools/lib/src/vmservice.dart +++ b/packages/flutter_tools/lib/src/vmservice.dart
@@ -379,8 +379,10 @@ /// recursively walk the response and replace values that are service maps with /// actual [ServiceObject]s. During the upgrade the owner is given a chance /// to return a cached / canonicalized object. -void _upgradeCollection(dynamic collection, - ServiceObjectOwner owner) { +void _upgradeCollection( + dynamic collection, + ServiceObjectOwner owner, +) { if (collection is ServiceMap) return; if (collection is Map<String, dynamic>) { @@ -827,7 +829,8 @@ } /// Invoke the RPC and return the raw response. - Future<Map<String, dynamic>> invokeRpcRaw(String method, { + Future<Map<String, dynamic>> invokeRpcRaw( + String method, { Map<String, dynamic> params = const <String, dynamic>{}, }) async { printTrace('Sending to VM service: $method($params)'); @@ -847,7 +850,8 @@ } /// Invoke the RPC and return a [ServiceObject] response. - Future<T> invokeRpc<T extends ServiceObject>(String method, { + Future<T> invokeRpc<T extends ServiceObject>( + String method, { Map<String, dynamic> params = const <String, dynamic>{}, }) async { final Map<String, dynamic> response = await invokeRpcRaw( @@ -873,7 +877,8 @@ } // Write one file into a file system. - Future<Map<String, dynamic>> writeDevFSFile(String fsName, { + Future<Map<String, dynamic>> writeDevFSFile( + String fsName, { @required String path, @required List<int> fileContents }) { @@ -911,10 +916,12 @@ return invokeRpcRaw('_deleteDevFS', params: <String, dynamic>{ 'fsName': fsName }); } - Future<ServiceMap> runInView(String viewId, - Uri main, - Uri packages, - Uri assetsDirectory) { + Future<ServiceMap> runInView( + String viewId, + Uri main, + Uri packages, + Uri assetsDirectory, + ) { return invokeRpc<ServiceMap>('_flutter.runInView', params: <String, dynamic> { 'viewId': viewId, @@ -1090,7 +1097,8 @@ Future<Map<String, dynamic>> _fetchDirect() => invokeRpcRaw('getIsolate'); /// Invoke the RPC and return the raw response. - Future<Map<String, dynamic>> invokeRpcRaw(String method, { + Future<Map<String, dynamic>> invokeRpcRaw( + String method, { Map<String, dynamic> params, }) { // Inject the 'isolateId' parameter. @@ -1134,10 +1142,11 @@ static const int kIsolateReloadBarred = 1005; - Future<Map<String, dynamic>> reloadSources( - { bool pause = false, - Uri rootLibUri, - Uri packagesUri}) async { + Future<Map<String, dynamic>> reloadSources({ + bool pause = false, + Uri rootLibUri, + Uri packagesUri, + }) async { try { final Map<String, dynamic> arguments = <String, dynamic>{ 'pause': pause @@ -1222,9 +1231,8 @@ // available, returns null. Future<Map<String, dynamic>> invokeFlutterExtensionRpcRaw( String method, { - Map<String, dynamic> params, - } - ) async { + Map<String, dynamic> params, + }) async { try { return await invokeRpcRaw(method, params: params); } on rpc.RpcException catch (e) { @@ -1314,7 +1322,7 @@ return invokeFlutterExtensionRpcRaw('ext.flutter.exit'); } - Future<String> flutterPlatformOverride([String platform]) async { + Future<String> flutterPlatformOverride([ String platform ]) async { final Map<String, dynamic> result = await invokeFlutterExtensionRpcRaw( 'ext.flutter.platformOverride', params: platform != null ? <String, dynamic>{ 'value': platform } : <String, String>{}, @@ -1386,7 +1394,7 @@ void updateAll(dynamic update(String key, dynamic value)) => _map.updateAll(update); Map<RK, RV> retype<RK, RV>() => _map.cast<RK, RV>(); @override - dynamic update(String key, dynamic update(dynamic value), {dynamic ifAbsent()}) => _map.update(key, update, ifAbsent: ifAbsent); + dynamic update(String key, dynamic update(dynamic value), { dynamic ifAbsent() }) => _map.update(key, update, ifAbsent: ifAbsent); } /// Peered to an Android/iOS FlutterView widget on a device. @@ -1404,9 +1412,11 @@ } // TODO(johnmccutchan): Report errors when running failed. - Future<void> runFromSource(Uri entryUri, - Uri packagesUri, - Uri assetsDirectoryUri) async { + Future<void> runFromSource( + Uri entryUri, + Uri packagesUri, + Uri assetsDirectoryUri, + ) async { final String viewId = id; // When this completer completes the isolate is running. final Completer<void> completer = Completer<void>();
diff --git a/packages/flutter_tools/lib/src/vmservice_record_replay.dart b/packages/flutter_tools/lib/src/vmservice_record_replay.dart index 0868682..9da5bf4 100644 --- a/packages/flutter_tools/lib/src/vmservice_record_replay.dart +++ b/packages/flutter_tools/lib/src/vmservice_record_replay.dart
@@ -180,7 +180,7 @@ } @override - void addError(dynamic errorEvent, [StackTrace stackTrace]) { + void addError(dynamic errorEvent, [ StackTrace stackTrace ]) { throw UnimplementedError('Add support for this if the need ever arises'); } @@ -272,7 +272,7 @@ } @override - void addError(dynamic errorEvent, [StackTrace stackTrace]) { + void addError(dynamic errorEvent, [ StackTrace stackTrace ]) { throw UnimplementedError('Add support for this if the need ever arises'); }
diff --git a/packages/flutter_tools/lib/src/vscode/vscode.dart b/packages/flutter_tools/lib/src/vscode/vscode.dart index c9503fd..94c9a04 100644 --- a/packages/flutter_tools/lib/src/vscode/vscode.dart +++ b/packages/flutter_tools/lib/src/vscode/vscode.dart
@@ -189,8 +189,7 @@ ]); } - static List<VsCode> _findInstalled( - List<_VsCodeInstallLocation> allLocations) { + static List<VsCode> _findInstalled(List<_VsCodeInstallLocation> allLocations) { final Iterable<_VsCodeInstallLocation> searchLocations = _includeInsiders ? allLocations
diff --git a/packages/flutter_tools/lib/src/windows/windows_device.dart b/packages/flutter_tools/lib/src/windows/windows_device.dart index 954efec..005e100 100644 --- a/packages/flutter_tools/lib/src/windows/windows_device.dart +++ b/packages/flutter_tools/lib/src/windows/windows_device.dart
@@ -17,7 +17,7 @@ void clearLogs() {} @override - DeviceLogReader getLogReader({ApplicationPackage app}) => NoOpDeviceLogReader('windows'); + DeviceLogReader getLogReader({ ApplicationPackage app }) => NoOpDeviceLogReader('windows'); @override Future<bool> installApp(ApplicationPackage app) { @@ -50,7 +50,8 @@ Future<String> get sdkNameAndVersion async => os.name; @override - Future<LaunchResult> startApp(ApplicationPackage package, { + Future<LaunchResult> startApp( + ApplicationPackage package, { String mainPath, String route, DebuggingOptions debuggingOptions,
diff --git a/packages/flutter_tools/test/asset_bundle_package_fonts_test.dart b/packages/flutter_tools/test/asset_bundle_package_fonts_test.dart index a30b8cb..648a092 100644 --- a/packages/flutter_tools/test/asset_bundle_package_fonts_test.dart +++ b/packages/flutter_tools/test/asset_bundle_package_fonts_test.dart
@@ -26,7 +26,7 @@ // rolls into Flutter. return path?.replaceAll('/', fs.path.separator); } - void writePubspecFile(String path, String name, {String fontsSection}) { + void writePubspecFile(String path, String name, { String fontsSection }) { if (fontsSection == null) { fontsSection = ''; } else {
diff --git a/packages/flutter_tools/test/asset_bundle_package_test.dart b/packages/flutter_tools/test/asset_bundle_package_test.dart index 9ed6f03..2ea7946 100644 --- a/packages/flutter_tools/test/asset_bundle_package_test.dart +++ b/packages/flutter_tools/test/asset_bundle_package_test.dart
@@ -26,7 +26,7 @@ // rolls into Flutter. return path?.replaceAll('/', fs.path.separator); } - void writePubspecFile(String path, String name, {List<String> assets}) { + void writePubspecFile(String path, String name, { List<String> assets }) { String assetsSection; if (assets == null) { assetsSection = '';
diff --git a/packages/flutter_tools/test/base/net_test.dart b/packages/flutter_tools/test/base/net_test.dart index c99182c..dd867ed 100644 --- a/packages/flutter_tools/test/base/net_test.dart +++ b/packages/flutter_tools/test/base/net_test.dart
@@ -192,8 +192,11 @@ String get reasonPhrase => '<reason phrase>'; @override - StreamSubscription<List<int>> listen(void onData(List<int> event), { - Function onError, void onDone(), bool cancelOnError + StreamSubscription<List<int>> listen( + void onData(List<int> event), { + Function onError, + void onDone(), + bool cancelOnError, }) { return Stream<List<int>>.fromFuture(Future<List<int>>.error(const io.SocketException('test'))) .listen(onData, onError: onError, onDone: onDone, cancelOnError: cancelOnError);
diff --git a/packages/flutter_tools/test/base/process_test.dart b/packages/flutter_tools/test/base/process_test.dart index f897690..2139a54 100644 --- a/packages/flutter_tools/test/base/process_test.dart +++ b/packages/flutter_tools/test/base/process_test.dart
@@ -69,7 +69,7 @@ mockLogger = BufferLogger(); }); - MockProcess Function(List<String>) processMetaFactory(List<String> stdout, {List<String> stderr = const <String>[]}) { + MockProcess Function(List<String>) processMetaFactory(List<String> stdout, { List<String> stderr = const <String>[] }) { final Stream<List<int>> stdoutStream = Stream<List<int>>.fromIterable(stdout.map<List<int>>((String s) => s.codeUnits)); final Stream<List<int>> stderrStream =
diff --git a/packages/flutter_tools/test/cache_test.dart b/packages/flutter_tools/test/cache_test.dart index 03912cb..41840a3 100644 --- a/packages/flutter_tools/test/cache_test.dart +++ b/packages/flutter_tools/test/cache_test.dart
@@ -154,7 +154,7 @@ class MockFile extends Mock implements File { @override - Future<RandomAccessFile> open({FileMode mode = FileMode.read}) async { + Future<RandomAccessFile> open({ FileMode mode = FileMode.read }) async { return MockRandomAccessFile(); } }
diff --git a/packages/flutter_tools/test/channel_test.dart b/packages/flutter_tools/test/channel_test.dart index 1e6ea10..6e985c9 100644 --- a/packages/flutter_tools/test/channel_test.dart +++ b/packages/flutter_tools/test/channel_test.dart
@@ -18,7 +18,7 @@ import 'src/common.dart'; import 'src/context.dart'; -Process createMockProcess({int exitCode = 0, String stdout = '', String stderr = ''}) { +Process createMockProcess({ int exitCode = 0, String stdout = '', String stderr = '' }) { final Stream<List<int>> stdoutStream = Stream<List<int>>.fromIterable(<List<int>>[ utf8.encode(stdout), ]);
diff --git a/packages/flutter_tools/test/commands/create_test.dart b/packages/flutter_tools/test/commands/create_test.dart index 70ad746..21fa293 100644 --- a/packages/flutter_tools/test/commands/create_test.dart +++ b/packages/flutter_tools/test/commands/create_test.dart
@@ -956,7 +956,7 @@ expect(exec.exitCode, 0); } -Future<void> _runFlutterTest(Directory workingDir, {String target}) async { +Future<void> _runFlutterTest(Directory workingDir, { String target }) async { final String flutterToolsPath = fs.path.absolute(fs.path.join( 'bin', 'flutter_tools.dart', @@ -1057,8 +1057,11 @@ String get reasonPhrase => '<reason phrase>'; @override - StreamSubscription<List<int>> listen(void onData(List<int> event), { - Function onError, void onDone(), bool cancelOnError + StreamSubscription<List<int>> listen( + void onData(List<int> event), { + Function onError, + void onDone(), + bool cancelOnError }) { return Stream<List<int>>.fromIterable(<List<int>>[result.codeUnits]) .listen(onData, onError: onError, onDone: onDone, cancelOnError: cancelOnError);
diff --git a/packages/flutter_tools/test/commands/devices_test.dart b/packages/flutter_tools/test/commands/devices_test.dart index f3fa126..a63f19b 100644 --- a/packages/flutter_tools/test/commands/devices_test.dart +++ b/packages/flutter_tools/test/commands/devices_test.dart
@@ -42,27 +42,27 @@ class MockProcessManager extends Mock implements ProcessManager { @override Future<ProcessResult> run( - List<dynamic> command, { - String workingDirectory, - Map<String, String> environment, - bool includeParentEnvironment = true, - bool runInShell = false, - Encoding stdoutEncoding = systemEncoding, - Encoding stderrEncoding = systemEncoding, - }) async { + List<dynamic> command, { + String workingDirectory, + Map<String, String> environment, + bool includeParentEnvironment = true, + bool runInShell = false, + Encoding stdoutEncoding = systemEncoding, + Encoding stderrEncoding = systemEncoding, + }) async { return ProcessResult(0, 0, '', ''); } @override ProcessResult runSync( - List<dynamic> command, { - String workingDirectory, - Map<String, String> environment, - bool includeParentEnvironment = true, - bool runInShell = false, - Encoding stdoutEncoding = systemEncoding, - Encoding stderrEncoding = systemEncoding, - }) { + List<dynamic> command, { + String workingDirectory, + Map<String, String> environment, + bool includeParentEnvironment = true, + bool runInShell = false, + Encoding stdoutEncoding = systemEncoding, + Encoding stderrEncoding = systemEncoding, + }) { return ProcessResult(0, 0, '', ''); } }
diff --git a/packages/flutter_tools/test/commands/drive_test.dart b/packages/flutter_tools/test/commands/drive_test.dart index bf61d20..81a435c 100644 --- a/packages/flutter_tools/test/commands/drive_test.dart +++ b/packages/flutter_tools/test/commands/drive_test.dart
@@ -26,7 +26,7 @@ MemoryFileSystem fs; Directory tempDir; - void withMockDevice([Device mock]) { + void withMockDevice([ Device mock ]) { mockDevice = mock ?? MockDevice(); targetDeviceFinder = () async => mockDevice; testDeviceManager.addDevice(mockDevice);
diff --git a/packages/flutter_tools/test/commands/ide_config_test.dart b/packages/flutter_tools/test/commands/ide_config_test.dart index f3959a1..4f4bf24 100644 --- a/packages/flutter_tools/test/commands/ide_config_test.dart +++ b/packages/flutter_tools/test/commands/ide_config_test.dart
@@ -20,7 +20,7 @@ Directory intellijDir; Directory toolsDir; - Map<String, String> _getFilesystemContents([Directory root]) { + Map<String, String> _getFilesystemContents([ Directory root ]) { final String tempPath = tempDir.absolute.path; final List<String> paths = (root ?? tempDir).listSync(recursive: true).map((FileSystemEntity entity) { @@ -39,7 +39,7 @@ return contents; } - Map<String, String> _getManifest(Directory base, String marker, {bool isTemplate = false}) { + Map<String, String> _getManifest(Directory base, String marker, { bool isTemplate = false }) { final String basePath = fs.path.relative(base.path, from: tempDir.absolute.path); final String suffix = isTemplate ? Template.copyTemplateExtension : ''; return <String, String>{
diff --git a/packages/flutter_tools/test/commands/packages_test.dart b/packages/flutter_tools/test/commands/packages_test.dart index 051bd39..d7a4718 100644 --- a/packages/flutter_tools/test/commands/packages_test.dart +++ b/packages/flutter_tools/test/commands/packages_test.dart
@@ -45,7 +45,7 @@ tryToDelete(tempDir); }); - Future<String> createProjectWithPlugin(String plugin, {List<String> arguments}) async { + Future<String> createProjectWithPlugin(String plugin, { List<String> arguments }) async { final String projectPath = await createProject(tempDir, arguments: arguments); final File pubspec = fs.file(fs.path.join(projectPath, 'pubspec.yaml')); String content = await pubspec.readAsString();
diff --git a/packages/flutter_tools/test/commands/test_test.dart b/packages/flutter_tools/test/commands/test_test.dart index 4c05295..cefe0bd 100644 --- a/packages/flutter_tools/test/commands/test_test.dart +++ b/packages/flutter_tools/test/commands/test_test.dart
@@ -90,7 +90,7 @@ }); } -Future<void> _testFile(String testName, String workingDirectory, String testDirectory, {Matcher exitCode}) async { +Future<void> _testFile(String testName, String workingDirectory, String testDirectory, { Matcher exitCode }) async { exitCode ??= isNonZero; final String fullTestExpectation = fs.path.join(testDirectory, '${testName}_expectation.txt'); final File expectationFile = fs.file(fullTestExpectation);
diff --git a/packages/flutter_tools/test/compile_test.dart b/packages/flutter_tools/test/compile_test.dart index ba7ae68..5bef8cc 100644 --- a/packages/flutter_tools/test/compile_test.dart +++ b/packages/flutter_tools/test/compile_test.dart
@@ -502,9 +502,12 @@ }); } -Future<void> _recompile(StreamController<List<int>> streamController, - ResidentCompiler generator, MockStdIn mockFrontendServerStdIn, - String mockCompilerOutput) async { +Future<void> _recompile( + StreamController<List<int>> streamController, + ResidentCompiler generator, + MockStdIn mockFrontendServerStdIn, + String mockCompilerOutput, +) async { // Put content into the output stream after generator.recompile gets // going few lines below, resets completer. scheduleMicrotask(() { @@ -565,12 +568,12 @@ } @override - void write([Object o = '']) { + void write([ Object o = '' ]) { _stdInWrites.write(o); } @override - void writeln([Object o = '']) { + void writeln([ Object o = '' ]) { _stdInWrites.writeln(o); } }
diff --git a/packages/flutter_tools/test/crash_reporting_test.dart b/packages/flutter_tools/test/crash_reporting_test.dart index f3255c6..cac269e 100644 --- a/packages/flutter_tools/test/crash_reporting_test.dart +++ b/packages/flutter_tools/test/crash_reporting_test.dart
@@ -216,16 +216,16 @@ void write(_) {} @override - void writeAll(_, [__ = '']) {} + void writeAll(_, [ __ = '' ]) {} @override - void writeln([_ = '']) {} + void writeln([ _ = '' ]) {} @override void writeCharCode(_) {} @override - void addError(_, [__]) {} + void addError(_, [ __ ]) {} @override Future<dynamic> addStream(_) async {}
diff --git a/packages/flutter_tools/test/dart/pub_get_test.dart b/packages/flutter_tools/test/dart/pub_get_test.dart index abd5d8b..f3552c2 100644 --- a/packages/flutter_tools/test/dart/pub_get_test.dart +++ b/packages/flutter_tools/test/dart/pub_get_test.dart
@@ -200,7 +200,7 @@ Stream<T> where(bool test(T event)) => MockStream<T>(); @override - StreamSubscription<T> listen(void onData(T event), {Function onError, void onDone(), bool cancelOnError}) { + StreamSubscription<T> listen(void onData(T event), { Function onError, void onDone(), bool cancelOnError }) { return MockStreamSubscription<T>(); } @@ -210,7 +210,7 @@ class MockStreamSubscription<T> implements StreamSubscription<T> { @override - Future<E> asFuture<E>([E futureValue]) => Future<E>.value(); + Future<E> asFuture<E>([ E futureValue ]) => Future<E>.value(); @override Future<void> cancel() async { } @@ -236,7 +236,7 @@ class MockFile implements File { @override - Future<RandomAccessFile> open({FileMode mode = FileMode.read}) async { + Future<RandomAccessFile> open({ FileMode mode = FileMode.read }) async { return MockRandomAccessFile(); }
diff --git a/packages/flutter_tools/test/devfs_test.dart b/packages/flutter_tools/test/devfs_test.dart index 5a96c7d..16ccf40 100644 --- a/packages/flutter_tools/test/devfs_test.dart +++ b/packages/flutter_tools/test/devfs_test.dart
@@ -604,7 +604,8 @@ } @override - Future<Map<String, dynamic>> invokeRpcRaw(String method, { + Future<Map<String, dynamic>> invokeRpcRaw( + String method, { Map<String, dynamic> params = const <String, dynamic>{}, Duration timeout, bool timeoutFatal = true,
diff --git a/packages/flutter_tools/test/flutter_manifest_test.dart b/packages/flutter_tools/test/flutter_manifest_test.dart index 424c9da..b4f4508 100644 --- a/packages/flutter_tools/test/flutter_manifest_test.dart +++ b/packages/flutter_tools/test/flutter_manifest_test.dart
@@ -494,8 +494,11 @@ expect(flutterManifest.isEmpty, false); } - void testUsingContextAndFs(String description, FileSystem filesystem, - dynamic testMethod()) { + void testUsingContextAndFs( + String description, + FileSystem filesystem, + dynamic testMethod(), + ) { testUsingContext(description, () async { writeEmptySchemaFile(filesystem);
diff --git a/packages/flutter_tools/test/integration/test_driver.dart b/packages/flutter_tools/test/integration/test_driver.dart index 952f227..dcb011d 100644 --- a/packages/flutter_tools/test/integration/test_driver.dart +++ b/packages/flutter_tools/test/integration/test_driver.dart
@@ -120,7 +120,7 @@ _stderr.stream.listen((String message) => _debugPrint(message, topic: '<=stderr=')); } - Future<void> connectToVmService({bool pauseOnExceptions = false}) async { + Future<void> connectToVmService({ bool pauseOnExceptions = false }) async { _vmService = await vmServiceConnectUri('$_vmServiceWsUri'); _vmService.onSend.listen((String s) => _debugPrint(s, topic: '=vm=>')); _vmService.onReceive.listen((String s) => _debugPrint(s, topic: '<=vm=')); @@ -240,11 +240,11 @@ ); } - Future<Isolate> resume({bool waitForNextPause = false}) => _resume(null, waitForNextPause); - Future<Isolate> stepOver({bool waitForNextPause = true}) => _resume(StepOption.kOver, waitForNextPause); + Future<Isolate> resume({ bool waitForNextPause = false }) => _resume(null, waitForNextPause); + Future<Isolate> stepOver({ bool waitForNextPause = true }) => _resume(StepOption.kOver, waitForNextPause); Future<Isolate> stepOverAsync({ bool waitForNextPause = true }) => _resume(StepOption.kOverAsyncSuspension, waitForNextPause); - Future<Isolate> stepInto({bool waitForNextPause = true}) => _resume(StepOption.kInto, waitForNextPause); - Future<Isolate> stepOut({bool waitForNextPause = true}) => _resume(StepOption.kOut, waitForNextPause); + Future<Isolate> stepInto({ bool waitForNextPause = true }) => _resume(StepOption.kInto, waitForNextPause); + Future<Isolate> stepOut({ bool waitForNextPause = true }) => _resume(StepOption.kOut, waitForNextPause); Future<bool> isAtAsyncSuspension() async { final Isolate isolate = await _getFlutterIsolate(); @@ -354,7 +354,8 @@ ).whenComplete(subscription.cancel); } - Future<T> _timeoutWithMessages<T>(Future<T> Function() callback, { + Future<T> _timeoutWithMessages<T>( + Future<T> Function() callback, { @required String task, Duration timeout = defaultTimeout, }) { @@ -491,10 +492,10 @@ _currentRunningAppId = (await started)['params']['appId']; } - Future<void> hotRestart({bool pause = false}) => _restart(fullRestart: true, pause: pause); + Future<void> hotRestart({ bool pause = false }) => _restart(fullRestart: true, pause: pause); Future<void> hotReload() => _restart(fullRestart: false); - Future<void> _restart({bool fullRestart = false, bool pause = false}) async { + Future<void> _restart({ bool fullRestart = false, bool pause = false }) async { if (_currentRunningAppId == null) throw Exception('App has not started yet');
diff --git a/packages/flutter_tools/test/ios/cocoapods_test.dart b/packages/flutter_tools/test/ios/cocoapods_test.dart index 3a8384c..78454d7 100644 --- a/packages/flutter_tools/test/ios/cocoapods_test.dart +++ b/packages/flutter_tools/test/ios/cocoapods_test.dart
@@ -572,5 +572,5 @@ class MockProcessManager extends Mock implements ProcessManager {} class MockXcodeProjectInterpreter extends Mock implements XcodeProjectInterpreter {} -ProcessResult exitsWithError([String stdout = '']) => ProcessResult(1, 1, stdout, ''); -ProcessResult exitsHappy([String stdout = '']) => ProcessResult(1, 0, stdout, ''); +ProcessResult exitsWithError([ String stdout = '' ]) => ProcessResult(1, 1, stdout, ''); +ProcessResult exitsHappy([ String stdout = '' ]) => ProcessResult(1, 0, stdout, '');
diff --git a/packages/flutter_tools/test/protocol_discovery_test.dart b/packages/flutter_tools/test/protocol_discovery_test.dart index c4e9050..4c71291 100644 --- a/packages/flutter_tools/test/protocol_discovery_test.dart +++ b/packages/flutter_tools/test/protocol_discovery_test.dart
@@ -228,7 +228,7 @@ final int availablePort; @override - Future<int> forward(int devicePort, {int hostPort}) async { + Future<int> forward(int devicePort, { int hostPort }) async { hostPort ??= 0; if (hostPort == 0) { return availablePort;
diff --git a/packages/flutter_tools/test/src/common.dart b/packages/flutter_tools/test/src/common.dart index c672e98..44f6556 100644 --- a/packages/flutter_tools/test/src/common.dart +++ b/packages/flutter_tools/test/src/common.dart
@@ -68,7 +68,7 @@ return fs.path.normalize(fs.path.join(toolsPath, '..', '..')); } -CommandRunner<void> createTestCommandRunner([FlutterCommand command]) { +CommandRunner<void> createTestCommandRunner([ FlutterCommand command ]) { final FlutterCommandRunner runner = FlutterCommandRunner(); if (command != null) runner.addCommand(command); @@ -76,15 +76,17 @@ } /// Updates [path] to have a modification time [seconds] from now. -void updateFileModificationTime(String path, - DateTime baseTime, - int seconds) { +void updateFileModificationTime( + String path, + DateTime baseTime, + int seconds, +) { final DateTime modificationTime = baseTime.add(Duration(seconds: seconds)); fs.file(path).setLastModifiedSync(modificationTime); } /// Matcher for functions that throw [ToolExit]. -Matcher throwsToolExit({int exitCode, Pattern message}) { +Matcher throwsToolExit({ int exitCode, Pattern message }) { Matcher matcher = isToolExit; if (exitCode != null) matcher = allOf(matcher, (ToolExit e) => e.exitCode == exitCode); @@ -97,7 +99,7 @@ final Matcher isToolExit = isInstanceOf<ToolExit>(); /// Matcher for functions that throw [ProcessExit]. -Matcher throwsProcessExit([dynamic exitCode]) { +Matcher throwsProcessExit([ dynamic exitCode ]) { return exitCode == null ? throwsA(isProcessExit) : throwsA(allOf(isProcessExit, (ProcessExit e) => e.exitCode == exitCode)); @@ -109,7 +111,7 @@ /// Creates a flutter project in the [temp] directory using the /// [arguments] list if specified, or `--no-pub` if not. /// Returns the path to the flutter project. -Future<String> createProject(Directory temp, {List<String> arguments}) async { +Future<String> createProject(Directory temp, { List<String> arguments }) async { arguments ??= <String>['--no-pub']; final String projectPath = fs.path.join(temp.path, 'flutter_project'); final CreateCommand command = CreateCommand();
diff --git a/packages/flutter_tools/test/src/context.dart b/packages/flutter_tools/test/src/context.dart index 92ae65e..143a791 100644 --- a/packages/flutter_tools/test/src/context.dart +++ b/packages/flutter_tools/test/src/context.dart
@@ -38,7 +38,9 @@ typedef ContextInitializer = void Function(AppContext testContext); @isTest -void testUsingContext(String description, dynamic testMethod(), { +void testUsingContext( + String description, + dynamic testMethod(), { Timeout timeout, Map<Type, Generator> overrides = const <Type, Generator>{}, bool initializeFlutterRoot = true,
diff --git a/packages/flutter_tools/test/src/mocks.dart b/packages/flutter_tools/test/src/mocks.dart index 3dcc063..015b96e 100644 --- a/packages/flutter_tools/test/src/mocks.dart +++ b/packages/flutter_tools/test/src/mocks.dart
@@ -268,12 +268,12 @@ } @override - void writeln([Object obj = '']) { + void writeln([ Object obj = '' ]) { add(encoding.encode('$obj\n')); } @override - void writeAll(Iterable<dynamic> objects, [String separator = '']) { + void writeAll(Iterable<dynamic> objects, [ String separator = '' ]) { bool addSeparator = false; for (dynamic object in objects) { if (addSeparator) { @@ -285,7 +285,7 @@ } @override - void addError(dynamic error, [StackTrace stackTrace]) { + void addError(dynamic error, [ StackTrace stackTrace ]) { throw UnimplementedError(); } @@ -482,7 +482,7 @@ return null; } @override - Future<CompilerOutput> recompile(String mainPath, List<String> invalidatedFiles, {String outputPath, String packagesFilePath}) async { + Future<CompilerOutput> recompile(String mainPath, List<String> invalidatedFiles, { String outputPath, String packagesFilePath }) async { fs.file(outputPath).createSync(recursive: true); fs.file(outputPath).writeAsStringSync('compiled_kernel_output'); return CompilerOutput(outputPath, 0);
diff --git a/packages/flutter_tools/test/version_test.dart b/packages/flutter_tools/test/version_test.dart index 17963e3..d25c57c 100644 --- a/packages/flutter_tools/test/version_test.dart +++ b/packages/flutter_tools/test/version_test.dart
@@ -442,7 +442,7 @@ }); final Answering<ProcessResult> syncAnswer = (Invocation invocation) { - bool argsAre(String a1, [String a2, String a3, String a4, String a5, String a6, String a7, String a8]) { + bool argsAre(String a1, [ String a2, String a3, String a4, String a5, String a6, String a7, String a8 ]) { const ListEquality<String> equality = ListEquality<String>(); final List<String> args = invocation.positionalArguments.single; final List<String> expectedArgs = <String>[a1, a2, a3, a4, a5, a6, a7, a8].where((String arg) => arg != null).toList();
diff --git a/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart b/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart index d44308c..adcd157 100644 --- a/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart +++ b/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart
@@ -32,8 +32,11 @@ /// `interface` and `configFile`. The config file is used primarily for the /// default SSH port forwarding configuration. typedef PortForwardingFunction = Future<PortForwarder> Function( - String address, int remotePort, - [String interface, String configFile]); + String address, + int remotePort, [ + String interface, + String configFile, +]); /// The function for forwarding the local machine's ports to a remote Fuchsia /// device. @@ -128,8 +131,7 @@ /// Same as [FuchsiaRemoteConnection.connect] albeit with a provided /// [SshCommandRunner] instance. - static Future<FuchsiaRemoteConnection> connectWithSshCommandRunner( - SshCommandRunner commandRunner) async { + static Future<FuchsiaRemoteConnection> connectWithSshCommandRunner(SshCommandRunner commandRunner) async { final FuchsiaRemoteConnection connection = FuchsiaRemoteConnection._( isIpV6Address(commandRunner.address), commandRunner); await connection._forwardLocalPortsToDeviceServicePorts(); @@ -474,7 +476,7 @@ /// Runs a dummy heartbeat command on all Dart VM instances. /// /// Removes any failing ports from the cache. - Future<void> _checkPorts([bool queueEvents = true]) async { + Future<void> _checkPorts([ bool queueEvents = true ]) async { // Filters out stale ports after connecting. Ignores results. await _invokeForAllVms<Map<String, dynamic>>( (DartVm vmService) async { @@ -591,8 +593,12 @@ /// Starts SSH forwarding through a subprocess, and returns an instance of /// [_SshPortForwarder]. - static Future<_SshPortForwarder> start(String address, int remotePort, - [String interface, String sshConfigPath]) async { + static Future<_SshPortForwarder> start( + String address, + int remotePort, [ + String interface, + String sshConfigPath, + ]) async { final bool isIpV6 = isIpV6Address(address); final ServerSocket localSocket = await _createLocalSocket(); if (localSocket == null || localSocket.port == 0) {
diff --git a/packages/fuchsia_remote_debug_protocol/test/fuchsia_remote_connection_test.dart b/packages/fuchsia_remote_debug_protocol/test/fuchsia_remote_connection_test.dart index c7444af..4204e66c 100644 --- a/packages/fuchsia_remote_debug_protocol/test/fuchsia_remote_connection_test.dart +++ b/packages/fuchsia_remote_debug_protocol/test/fuchsia_remote_connection_test.dart
@@ -34,8 +34,11 @@ forwardedPorts = <MockPortForwarder>[]; int port = 0; Future<PortForwarder> mockPortForwardingFunction( - String address, int remotePort, - [String interface = '', String configFile]) { + String address, + int remotePort, [ + String interface = '', + String configFile, + ]) { return Future<PortForwarder>(() { final MockPortForwarder pf = MockPortForwarder(); forwardedPorts.add(pf);