format initializer list of constructors (#27111)
diff --git a/packages/flutter/lib/src/animation/animation_controller.dart b/packages/flutter/lib/src/animation/animation_controller.dart
index c279f32..a3b7d06 100644
--- a/packages/flutter/lib/src/animation/animation_controller.dart
+++ b/packages/flutter/lib/src/animation/animation_controller.dart
@@ -797,8 +797,8 @@
class _RepeatingSimulation extends Simulation {
_RepeatingSimulation(double initialValue, this.min, this.max, this.reverse, Duration period)
- : _periodInSeconds = period.inMicroseconds / Duration.microsecondsPerSecond,
- _initialT = (max == min) ? 0.0 : (initialValue / (max - min)) * (period.inMicroseconds / Duration.microsecondsPerSecond) {
+ : _periodInSeconds = period.inMicroseconds / Duration.microsecondsPerSecond,
+ _initialT = (max == min) ? 0.0 : (initialValue / (max - min)) * (period.inMicroseconds / Duration.microsecondsPerSecond) {
assert(_periodInSeconds > 0.0);
assert(_initialT >= 0.0);
}
diff --git a/packages/flutter/lib/src/animation/animations.dart b/packages/flutter/lib/src/animation/animations.dart
index 531bfba..2187219 100644
--- a/packages/flutter/lib/src/animation/animations.dart
+++ b/packages/flutter/lib/src/animation/animations.dart
@@ -493,7 +493,7 @@
/// can be null. If the next train is null, then this object will just proxy
/// the first animation and never hop.
TrainHoppingAnimation(this._currentTrain, this._nextTrain, { this.onSwitchedTrain })
- : assert(_currentTrain != null) {
+ : assert(_currentTrain != null) {
if (_nextTrain != null) {
if (_currentTrain.value == _nextTrain.value) {
_currentTrain = _nextTrain;
@@ -701,7 +701,7 @@
///
/// Both arguments must be non-null. Either can be an [AnimationMax] itself
/// to combine multiple animations.
- AnimationMax(Animation<T> first, Animation<T> next): super(first: first, next: next);
+ AnimationMax(Animation<T> first, Animation<T> next) : super(first: first, next: next);
@override
T get value => math.max(first.value, next.value);
@@ -716,7 +716,7 @@
///
/// Both arguments must be non-null. Either can be an [AnimationMin] itself
/// to combine multiple animations.
- AnimationMin(Animation<T> first, Animation<T> next): super(first: first, next: next);
+ AnimationMin(Animation<T> first, Animation<T> next) : super(first: first, next: next);
@override
T get value => math.min(first.value, next.value);
diff --git a/packages/flutter/lib/src/animation/curves.dart b/packages/flutter/lib/src/animation/curves.dart
index 237833b..d5aac3d 100644
--- a/packages/flutter/lib/src/animation/curves.dart
+++ b/packages/flutter/lib/src/animation/curves.dart
@@ -110,9 +110,9 @@
///
/// The arguments must not be null.
const Interval(this.begin, this.end, { this.curve = Curves.linear })
- : assert(begin != null),
- assert(end != null),
- assert(curve != null);
+ : assert(begin != null),
+ assert(end != null),
+ assert(curve != null);
/// The largest value for which this interval is 0.0.
///
@@ -199,10 +199,10 @@
///
/// The [a], [b], [c], and [d] arguments must not be null.
const Cubic(this.a, this.b, this.c, this.d)
- : assert(a != null),
- assert(b != null),
- assert(c != null),
- assert(d != null);
+ : assert(a != null),
+ assert(b != null),
+ assert(c != null),
+ assert(d != null);
/// The x coordinate of the first control point.
///
diff --git a/packages/flutter/lib/src/animation/tween.dart b/packages/flutter/lib/src/animation/tween.dart
index dc37823..37274d8 100644
--- a/packages/flutter/lib/src/animation/tween.dart
+++ b/packages/flutter/lib/src/animation/tween.dart
@@ -267,7 +267,9 @@
/// A [Tween] that evaluates its [parent] in reverse.
class ReverseTween<T> extends Tween<T> {
/// Construct a [Tween] that evaluates its [parent] in reverse.
- ReverseTween(this.parent) : assert(parent != null), super(begin: parent.end, end: parent.begin);
+ ReverseTween(this.parent)
+ : assert(parent != null),
+ super(begin: parent.end, end: parent.begin);
/// This tween's value is the same as the parent's value evaluated in reverse.
///
diff --git a/packages/flutter/lib/src/animation/tween_sequence.dart b/packages/flutter/lib/src/animation/tween_sequence.dart
index 83aef41..79ed0eb 100644
--- a/packages/flutter/lib/src/animation/tween_sequence.dart
+++ b/packages/flutter/lib/src/animation/tween_sequence.dart
@@ -44,7 +44,9 @@
/// There's a small cost associated with building a `TweenSequence` so
/// it's best to reuse one, rather than rebuilding it on every frame,
/// when that's possible.
- TweenSequence(List<TweenSequenceItem<T>> items) : assert(items != null), assert(items.isNotEmpty) {
+ TweenSequence(List<TweenSequenceItem<T>> items)
+ : assert(items != null),
+ assert(items.isNotEmpty) {
_items.addAll(items);
double totalWeight = 0.0;
@@ -95,7 +97,9 @@
const TweenSequenceItem({
@required this.tween,
@required this.weight,
- }) : assert(tween != null), assert(weight != null), assert(weight > 0.0);
+ }) : assert(tween != null),
+ assert(weight != null),
+ assert(weight > 0.0);
/// Defines the value of the [TweenSequence] for the interval within the
/// animation's duration indicated by [weight] and this item's position
diff --git a/packages/flutter/lib/src/cupertino/action_sheet.dart b/packages/flutter/lib/src/cupertino/action_sheet.dart
index 2cbbfc0..1158dbe 100644
--- a/packages/flutter/lib/src/cupertino/action_sheet.dart
+++ b/packages/flutter/lib/src/cupertino/action_sheet.dart
@@ -107,10 +107,10 @@
this.messageScrollController,
this.actionScrollController,
this.cancelButton,
- }) : assert(actions != null || title != null || message != null || cancelButton != null,
+ }) : assert(actions != null || title != null || message != null || cancelButton != null,
'An action sheet must have a non-null value for at least one of the following arguments: '
'actions, title, message, or cancelButton'),
- super(key: key);
+ super(key: key);
/// An optional title of the action sheet. When the [message] is non-null,
/// the font of the [title] is bold.
@@ -266,8 +266,8 @@
this.isDefaultAction = false,
this.isDestructiveAction = false,
@required this.child,
- }) : assert(child != null),
- assert(onPressed != null);
+ }) : assert(child != null),
+ assert(onPressed != null);
/// The callback that is called when the button is tapped.
///
@@ -514,9 +514,9 @@
RenderBox contentSection,
RenderBox actionsSection,
double dividerThickness = 0.0,
- }) : _contentSection = contentSection,
- _actionsSection = actionsSection,
- _dividerThickness = dividerThickness;
+ }) : _contentSection = contentSection,
+ _actionsSection = actionsSection,
+ _dividerThickness = dividerThickness;
RenderBox get contentSection => _contentSection;
RenderBox _contentSection;
@@ -843,8 +843,8 @@
@required this.children,
this.scrollController,
this.hasCancelButton,
- }) : assert(children != null),
- super(key: key);
+ }) : assert(children != null),
+ super(key: key);
final List<Widget> children;
@@ -975,9 +975,9 @@
@required List<Widget> actionButtons,
double dividerThickness = 0.0,
bool hasCancelButton = false,
- }) : _dividerThickness = dividerThickness,
- _hasCancelButton = hasCancelButton,
- super(key: key, children: actionButtons);
+ }) : _dividerThickness = dividerThickness,
+ _hasCancelButton = hasCancelButton,
+ super(key: key, children: actionButtons);
final double _dividerThickness;
final bool _hasCancelButton;
@@ -1022,8 +1022,8 @@
List<RenderBox> children,
double dividerThickness = 0.0,
bool hasCancelButton = false,
- }) : _dividerThickness = dividerThickness,
- _hasCancelButton = hasCancelButton {
+ }) : _dividerThickness = dividerThickness,
+ _hasCancelButton = hasCancelButton {
addAll(children);
}
diff --git a/packages/flutter/lib/src/cupertino/dialog.dart b/packages/flutter/lib/src/cupertino/dialog.dart
index 9ed6a70..a9d40fb 100644
--- a/packages/flutter/lib/src/cupertino/dialog.dart
+++ b/packages/flutter/lib/src/cupertino/dialog.dart
@@ -137,8 +137,8 @@
this.actions = const <Widget>[],
this.scrollController,
this.actionScrollController,
- }) : assert(actions != null),
- super(key: key);
+ }) : assert(actions != null),
+ super(key: key);
/// The (optional) title of the dialog is displayed in a large font at the top
/// of the dialog.
@@ -893,8 +893,8 @@
Key key,
@required this.children,
this.scrollController,
- }) : assert(children != null),
- super(key: key);
+ }) : assert(children != null),
+ super(key: key);
final List<Widget> children;
diff --git a/packages/flutter/lib/src/cupertino/nav_bar.dart b/packages/flutter/lib/src/cupertino/nav_bar.dart
index ef352a4..e7029dd 100644
--- a/packages/flutter/lib/src/cupertino/nav_bar.dart
+++ b/packages/flutter/lib/src/cupertino/nav_bar.dart
@@ -910,13 +910,13 @@
@immutable
class _NavigationBarStaticComponentsKeys {
_NavigationBarStaticComponentsKeys()
- : navBarBoxKey = GlobalKey(debugLabel: 'Navigation bar render box'),
- leadingKey = GlobalKey(debugLabel: 'Leading'),
- backChevronKey = GlobalKey(debugLabel: 'Back chevron'),
- backLabelKey = GlobalKey(debugLabel: 'Back label'),
- middleKey = GlobalKey(debugLabel: 'Middle'),
- trailingKey = GlobalKey(debugLabel: 'Trailing'),
- largeTitleKey = GlobalKey(debugLabel: 'Large title');
+ : navBarBoxKey = GlobalKey(debugLabel: 'Navigation bar render box'),
+ leadingKey = GlobalKey(debugLabel: 'Leading'),
+ backChevronKey = GlobalKey(debugLabel: 'Back chevron'),
+ backLabelKey = GlobalKey(debugLabel: 'Back label'),
+ middleKey = GlobalKey(debugLabel: 'Middle'),
+ trailingKey = GlobalKey(debugLabel: 'Trailing'),
+ largeTitleKey = GlobalKey(debugLabel: 'Large title');
final GlobalKey navBarBoxKey;
final GlobalKey leadingKey;
diff --git a/packages/flutter/lib/src/cupertino/segmented_control.dart b/packages/flutter/lib/src/cupertino/segmented_control.dart
index 17b7321..720618e 100644
--- a/packages/flutter/lib/src/cupertino/segmented_control.dart
+++ b/packages/flutter/lib/src/cupertino/segmented_control.dart
@@ -87,14 +87,14 @@
this.selectedColor,
this.borderColor,
this.pressedColor,
- }) : assert(children != null),
- assert(children.length >= 2),
- assert(onValueChanged != null),
- assert(
- groupValue == null || children.keys.any((T child) => child == groupValue),
- 'The groupValue must be either null or one of the keys in the children map.',
- ),
- super(key: key);
+ }) : assert(children != null),
+ assert(children.length >= 2),
+ assert(onValueChanged != null),
+ assert(
+ groupValue == null || children.keys.any((T child) => child == groupValue),
+ 'The groupValue must be either null or one of the keys in the children map.',
+ ),
+ super(key: key);
/// The identifying keys and corresponding widget values in the
/// segmented control.
@@ -472,12 +472,12 @@
@required TextDirection textDirection,
@required List<Color> backgroundColors,
@required Color borderColor,
- }) : assert(textDirection != null),
- _textDirection = textDirection,
- _selectedIndex = selectedIndex,
- _pressedIndex = pressedIndex,
- _backgroundColors = backgroundColors,
- _borderColor = borderColor {
+ }) : assert(textDirection != null),
+ _textDirection = textDirection,
+ _selectedIndex = selectedIndex,
+ _pressedIndex = pressedIndex,
+ _backgroundColors = backgroundColors,
+ _borderColor = borderColor {
addAll(children);
}
diff --git a/packages/flutter/lib/src/foundation/diagnostics.dart b/packages/flutter/lib/src/foundation/diagnostics.dart
index d533f4c..8a68ff9 100644
--- a/packages/flutter/lib/src/foundation/diagnostics.dart
+++ b/packages/flutter/lib/src/foundation/diagnostics.dart
@@ -1753,7 +1753,7 @@
_valueComputed = false,
_value = null,
_computeValue = computeValue,
- _defaultLevel = level,
+ _defaultLevel = level,
ifNull = ifNull ?? (missingIfNull ? 'MISSING' : null),
super(
name: name,
diff --git a/packages/flutter/lib/src/gestures/long_press.dart b/packages/flutter/lib/src/gestures/long_press.dart
index 61de7a6..f9f7239 100644
--- a/packages/flutter/lib/src/gestures/long_press.dart
+++ b/packages/flutter/lib/src/gestures/long_press.dart
@@ -21,7 +21,7 @@
///
/// Consider assigning the [onLongPress] callback after creating this object.
LongPressGestureRecognizer({ Object debugOwner })
- : super(deadline: kLongPressTimeout, debugOwner: debugOwner);
+ : super(deadline: kLongPressTimeout, debugOwner: debugOwner);
bool _longPressAccepted = false;
diff --git a/packages/flutter/lib/src/gestures/lsq_solver.dart b/packages/flutter/lib/src/gestures/lsq_solver.dart
index 1a540c2..509d7ea 100644
--- a/packages/flutter/lib/src/gestures/lsq_solver.dart
+++ b/packages/flutter/lib/src/gestures/lsq_solver.dart
@@ -7,10 +7,15 @@
// TODO(abarth): Consider using vector_math.
class _Vector {
- _Vector(int size) : _offset = 0, _length = size, _elements = Float64List(size);
+ _Vector(int size)
+ : _offset = 0,
+ _length = size,
+ _elements = Float64List(size);
_Vector.fromVOL(List<double> values, int offset, int length)
- : _offset = offset, _length = length, _elements = values;
+ : _offset = offset,
+ _length = length,
+ _elements = values;
final int _offset;
@@ -36,8 +41,8 @@
// TODO(abarth): Consider using vector_math.
class _Matrix {
_Matrix(int rows, int cols)
- : _columns = cols,
- _elements = Float64List(rows * cols);
+ : _columns = cols,
+ _elements = Float64List(rows * cols);
final int _columns;
final List<double> _elements;
diff --git a/packages/flutter/lib/src/gestures/monodrag.dart b/packages/flutter/lib/src/gestures/monodrag.dart
index 8f7522e..494655d 100644
--- a/packages/flutter/lib/src/gestures/monodrag.dart
+++ b/packages/flutter/lib/src/gestures/monodrag.dart
@@ -330,8 +330,7 @@
/// track each touch point independently.
class HorizontalDragGestureRecognizer extends DragGestureRecognizer {
/// Create a gesture recognizer for interactions in the horizontal axis.
- HorizontalDragGestureRecognizer({ Object debugOwner }) :
- super(debugOwner: debugOwner);
+ HorizontalDragGestureRecognizer({ Object debugOwner }) : super(debugOwner: debugOwner);
@override
bool _isFlingGesture(VelocityEstimate estimate) {
diff --git a/packages/flutter/lib/src/gestures/multidrag.dart b/packages/flutter/lib/src/gestures/multidrag.dart
index 1b115f6..ca028a7 100644
--- a/packages/flutter/lib/src/gestures/multidrag.dart
+++ b/packages/flutter/lib/src/gestures/multidrag.dart
@@ -439,8 +439,8 @@
class _DelayedPointerState extends MultiDragPointerState {
_DelayedPointerState(Offset initialPosition, Duration delay)
- : assert(delay != null),
- super(initialPosition) {
+ : assert(delay != null),
+ super(initialPosition) {
_timer = Timer(delay, _delayPassed);
}
diff --git a/packages/flutter/lib/src/gestures/velocity_tracker.dart b/packages/flutter/lib/src/gestures/velocity_tracker.dart
index 4f548d4..ea84344 100644
--- a/packages/flutter/lib/src/gestures/velocity_tracker.dart
+++ b/packages/flutter/lib/src/gestures/velocity_tracker.dart
@@ -126,8 +126,8 @@
class _PointAtTime {
const _PointAtTime(this.point, this.time)
- : assert(point != null),
- assert(time != null);
+ : assert(point != null),
+ assert(time != null);
final Duration time;
final Offset point;
diff --git a/packages/flutter/lib/src/material/checkbox.dart b/packages/flutter/lib/src/material/checkbox.dart
index d471735..849ebd0 100644
--- a/packages/flutter/lib/src/material/checkbox.dart
+++ b/packages/flutter/lib/src/material/checkbox.dart
@@ -220,16 +220,16 @@
BoxConstraints additionalConstraints,
ValueChanged<bool> onChanged,
@required TickerProvider vsync,
- }): _oldValue = value,
- super(
- value: value,
- tristate: tristate,
- activeColor: activeColor,
- inactiveColor: inactiveColor,
- onChanged: onChanged,
- additionalConstraints: additionalConstraints,
- vsync: vsync,
- );
+ }) : _oldValue = value,
+ super(
+ value: value,
+ tristate: tristate,
+ activeColor: activeColor,
+ inactiveColor: inactiveColor,
+ onChanged: onChanged,
+ additionalConstraints: additionalConstraints,
+ vsync: vsync,
+ );
bool _oldValue;
diff --git a/packages/flutter/lib/src/material/chip.dart b/packages/flutter/lib/src/material/chip.dart
index af83b4e..237bd4c 100644
--- a/packages/flutter/lib/src/material/chip.dart
+++ b/packages/flutter/lib/src/material/chip.dart
@@ -476,9 +476,9 @@
this.backgroundColor,
this.padding,
this.materialTapTargetSize,
- }) : assert(label != null),
- assert(clipBehavior != null),
- super(key: key);
+ }) : assert(label != null),
+ assert(clipBehavior != null),
+ super(key: key);
@override
final Widget avatar;
@@ -613,11 +613,11 @@
this.padding,
this.materialTapTargetSize,
this.avatarBorder = const CircleBorder(),
- }) : assert(selected != null),
- assert(isEnabled != null),
- assert(label != null),
- assert(clipBehavior != null),
- super(key: key);
+ }) : assert(selected != null),
+ assert(isEnabled != null),
+ assert(label != null),
+ assert(clipBehavior != null),
+ super(key: key);
@override
final Widget avatar;
@@ -775,10 +775,10 @@
this.padding,
this.materialTapTargetSize,
this.avatarBorder = const CircleBorder(),
- }) : assert(selected != null),
- assert(label != null),
- assert(clipBehavior != null),
- super(key: key);
+ }) : assert(selected != null),
+ assert(label != null),
+ assert(clipBehavior != null),
+ super(key: key);
@override
final Widget avatar;
@@ -956,10 +956,10 @@
this.padding,
this.materialTapTargetSize,
this.avatarBorder = const CircleBorder(),
- }) : assert(selected != null),
- assert(label != null),
- assert(clipBehavior != null),
- super(key: key);
+ }) : assert(selected != null),
+ assert(label != null),
+ assert(clipBehavior != null),
+ super(key: key);
@override
final Widget avatar;
@@ -1087,13 +1087,13 @@
this.backgroundColor,
this.padding,
this.materialTapTargetSize,
- }) : assert(label != null),
- assert(
- onPressed != null,
- 'Rather than disabling an ActionChip by setting onPressed to null, '
- 'remove it from the interface entirely.',
- ),
- super(key: key);
+ }) : assert(label != null),
+ assert(
+ onPressed != null,
+ 'Rather than disabling an ActionChip by setting onPressed to null, '
+ 'remove it from the interface entirely.',
+ ),
+ super(key: key);
@override
final Widget avatar;
@@ -1211,12 +1211,12 @@
this.backgroundColor,
this.materialTapTargetSize,
this.avatarBorder = const CircleBorder(),
- }) : assert(label != null),
- assert(isEnabled != null),
- assert(clipBehavior != null),
- assert(pressElevation != null && pressElevation >= 0.0),
- deleteIcon = deleteIcon ?? _kDefaultDeleteIcon,
- super(key: key);
+ }) : assert(label != null),
+ assert(isEnabled != null),
+ assert(clipBehavior != null),
+ assert(pressElevation != null && pressElevation >= 0.0),
+ deleteIcon = deleteIcon ?? _kDefaultDeleteIcon,
+ super(key: key);
@override
final Widget avatar;
@@ -1649,8 +1649,8 @@
this.deleteDrawerAnimation,
this.enableAnimation,
this.avatarBorder,
- }) : assert(theme != null),
- super(key: key);
+ }) : assert(theme != null),
+ super(key: key);
final _ChipRenderTheme theme;
final bool value;
@@ -1878,10 +1878,10 @@
this.deleteDrawerAnimation,
this.enableAnimation,
this.avatarBorder,
- }) : assert(theme != null),
- assert(textDirection != null),
- _theme = theme,
- _textDirection = textDirection {
+ }) : assert(theme != null),
+ assert(textDirection != null),
+ _theme = theme,
+ _textDirection = textDirection {
checkmarkAnimation.addListener(markNeedsPaint);
avatarDrawerAnimation.addListener(markNeedsLayout);
deleteDrawerAnimation.addListener(markNeedsLayout);
diff --git a/packages/flutter/lib/src/material/chip_theme.dart b/packages/flutter/lib/src/material/chip_theme.dart
index 048ec3e..b4d076e 100644
--- a/packages/flutter/lib/src/material/chip_theme.dart
+++ b/packages/flutter/lib/src/material/chip_theme.dart
@@ -46,9 +46,9 @@
Key key,
@required this.data,
@required Widget child,
- }) : assert(child != null),
- assert(data != null),
- super(key: key, child: child);
+ }) : assert(child != null),
+ assert(data != null),
+ super(key: key, child: child);
/// Specifies the color, shape, and text style values for descendant chip
/// widgets.
@@ -178,16 +178,16 @@
@required this.labelStyle,
@required this.secondaryLabelStyle,
@required this.brightness,
- }) : assert(backgroundColor != null),
- assert(disabledColor != null),
- assert(selectedColor != null),
- assert(secondarySelectedColor != null),
- assert(labelPadding != null),
- assert(padding != null),
- assert(shape != null),
- assert(labelStyle != null),
- assert(secondaryLabelStyle != null),
- assert(brightness != null);
+ }) : assert(backgroundColor != null),
+ assert(disabledColor != null),
+ assert(selectedColor != null),
+ assert(secondarySelectedColor != null),
+ assert(labelPadding != null),
+ assert(padding != null),
+ assert(shape != null),
+ assert(labelStyle != null),
+ assert(secondaryLabelStyle != null),
+ assert(brightness != null);
/// Generates a ChipThemeData from a brightness, a primary color, and a text
/// style.
diff --git a/packages/flutter/lib/src/material/circle_avatar.dart b/packages/flutter/lib/src/material/circle_avatar.dart
index 7461eb1..12a60c8 100644
--- a/packages/flutter/lib/src/material/circle_avatar.dart
+++ b/packages/flutter/lib/src/material/circle_avatar.dart
@@ -61,8 +61,8 @@
this.radius,
this.minRadius,
this.maxRadius,
- }) : assert(radius == null || (minRadius == null && maxRadius == null)),
- super(key: key);
+ }) : assert(radius == null || (minRadius == null && maxRadius == null)),
+ super(key: key);
/// The widget below this widget in the tree.
///
diff --git a/packages/flutter/lib/src/material/flexible_space_bar.dart b/packages/flutter/lib/src/material/flexible_space_bar.dart
index c550f04..8fe7f5d 100644
--- a/packages/flutter/lib/src/material/flexible_space_bar.dart
+++ b/packages/flutter/lib/src/material/flexible_space_bar.dart
@@ -251,8 +251,8 @@
this.maxExtent,
@required this.currentExtent,
@required Widget child,
- }) : assert(currentExtent != null),
- super(key: key, child: child);
+ }) : assert(currentExtent != null),
+ super(key: key, child: child);
/// Affects how transparent the text within the toolbar appears.
final double toolbarOpacity;
diff --git a/packages/flutter/lib/src/material/floating_action_button.dart b/packages/flutter/lib/src/material/floating_action_button.dart
index fe28efe..9f820a9 100644
--- a/packages/flutter/lib/src/material/floating_action_button.dart
+++ b/packages/flutter/lib/src/material/floating_action_button.dart
@@ -82,15 +82,15 @@
this.clipBehavior = Clip.none,
this.materialTapTargetSize,
this.isExtended = false,
- }) : assert(elevation != null && elevation >= 0.0),
- assert(highlightElevation != null && highlightElevation >= 0.0),
- assert(disabledElevation == null || disabledElevation >= 0.0),
- assert(mini != null),
- assert(shape != null),
- assert(isExtended != null),
- _sizeConstraints = mini ? _kMiniSizeConstraints : _kSizeConstraints,
- disabledElevation = disabledElevation ?? elevation,
- super(key: key);
+ }) : assert(elevation != null && elevation >= 0.0),
+ assert(highlightElevation != null && highlightElevation >= 0.0),
+ assert(disabledElevation == null || disabledElevation >= 0.0),
+ assert(mini != null),
+ assert(shape != null),
+ assert(isExtended != null),
+ _sizeConstraints = mini ? _kMiniSizeConstraints : _kSizeConstraints,
+ disabledElevation = disabledElevation ?? elevation,
+ super(key: key);
/// Creates a wider [StadiumBorder]-shaped floating action button with both
/// an [icon] and a [label].
@@ -115,28 +115,28 @@
this.clipBehavior = Clip.none,
@required Widget icon,
@required Widget label,
- }) : assert(elevation != null && elevation >= 0.0),
- assert(highlightElevation != null && highlightElevation >= 0.0),
- assert(disabledElevation == null || disabledElevation >= 0.0),
- assert(shape != null),
- assert(isExtended != null),
- assert(clipBehavior != null),
- _sizeConstraints = _kExtendedSizeConstraints,
- disabledElevation = disabledElevation ?? elevation,
- mini = false,
- child = _ChildOverflowBox(
- child: Row(
- mainAxisSize: MainAxisSize.min,
- children: <Widget>[
- const SizedBox(width: 16.0),
- icon,
- const SizedBox(width: 8.0),
- label,
- const SizedBox(width: 20.0),
- ],
- ),
- ),
- super(key: key);
+ }) : assert(elevation != null && elevation >= 0.0),
+ assert(highlightElevation != null && highlightElevation >= 0.0),
+ assert(disabledElevation == null || disabledElevation >= 0.0),
+ assert(shape != null),
+ assert(isExtended != null),
+ assert(clipBehavior != null),
+ _sizeConstraints = _kExtendedSizeConstraints,
+ disabledElevation = disabledElevation ?? elevation,
+ mini = false,
+ child = _ChildOverflowBox(
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: <Widget>[
+ const SizedBox(width: 16.0),
+ icon,
+ const SizedBox(width: 8.0),
+ label,
+ const SizedBox(width: 20.0),
+ ],
+ ),
+ ),
+ super(key: key);
/// The widget below this widget in the tree.
///
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 188a6f4..af7a97c 100644
--- a/packages/flutter/lib/src/material/floating_action_button_location.dart
+++ b/packages/flutter/lib/src/material/floating_action_button_location.dart
@@ -470,7 +470,7 @@
///
/// Both arguments must be non-null. Either can be an [_AnimationSwap] itself
/// to combine multiple animations.
- _AnimationSwap(Animation<T> first, Animation<T> next, this.parent, this.swapThreshold): super(first: first, next: next);
+ _AnimationSwap(Animation<T> first, Animation<T> next, this.parent, this.swapThreshold) : super(first: first, next: next);
final Animation<double> parent;
final double swapThreshold;
diff --git a/packages/flutter/lib/src/material/material.dart b/packages/flutter/lib/src/material/material.dart
index 02fb410..02e6a6c 100644
--- a/packages/flutter/lib/src/material/material.dart
+++ b/packages/flutter/lib/src/material/material.dart
@@ -600,7 +600,7 @@
///
/// the [begin] and [end] properties may be null; see [ShapeBorder.lerp] for
/// the null handling semantics.
- ShapeBorderTween({ShapeBorder begin, ShapeBorder end}): super(begin: begin, end: end);
+ ShapeBorderTween({ShapeBorder begin, ShapeBorder end}) : super(begin: begin, end: end);
/// Returns the value this tween has at the given animation clock value.
@override
diff --git a/packages/flutter/lib/src/material/radio.dart b/packages/flutter/lib/src/material/radio.dart
index 5658ca1..33ca07c 100644
--- a/packages/flutter/lib/src/material/radio.dart
+++ b/packages/flutter/lib/src/material/radio.dart
@@ -200,15 +200,15 @@
ValueChanged<bool> onChanged,
BoxConstraints additionalConstraints,
@required TickerProvider vsync,
- }): super(
- value: value,
- tristate: false,
- activeColor: activeColor,
- inactiveColor: inactiveColor,
- onChanged: onChanged,
- additionalConstraints: additionalConstraints,
- vsync: vsync,
- );
+ }) : super(
+ value: value,
+ tristate: false,
+ activeColor: activeColor,
+ inactiveColor: inactiveColor,
+ onChanged: onChanged,
+ additionalConstraints: additionalConstraints,
+ vsync: vsync,
+ );
@override
void paint(PaintingContext context, Offset offset) {
diff --git a/packages/flutter/lib/src/material/reorderable_list.dart b/packages/flutter/lib/src/material/reorderable_list.dart
index 17a38ac..81dc9c3 100644
--- a/packages/flutter/lib/src/material/reorderable_list.dart
+++ b/packages/flutter/lib/src/material/reorderable_list.dart
@@ -60,13 +60,13 @@
this.scrollDirection = Axis.vertical,
this.padding,
this.reverse = false,
- }): assert(scrollDirection != null),
- assert(onReorder != null),
- assert(children != null),
- assert(
- children.every((Widget w) => w.key != null),
- 'All children of this widget must have a key.',
- );
+ }) : assert(scrollDirection != null),
+ assert(onReorder != null),
+ assert(children != null),
+ assert(
+ children.every((Widget w) => w.key != null),
+ 'All children of this widget must have a key.',
+ );
/// A non-reorderable header widget to show before the list.
///
diff --git a/packages/flutter/lib/src/material/slider_theme.dart b/packages/flutter/lib/src/material/slider_theme.dart
index aa22e6a..efa9788 100644
--- a/packages/flutter/lib/src/material/slider_theme.dart
+++ b/packages/flutter/lib/src/material/slider_theme.dart
@@ -35,9 +35,9 @@
Key key,
@required this.data,
@required Widget child,
- }) : assert(child != null),
- assert(data != null),
- super(key: key, child: child);
+ }) : assert(child != null),
+ assert(data != null),
+ super(key: key, child: child);
/// Specifies the color and shape values for descendant slider widgets.
final SliderThemeData data;
@@ -197,22 +197,22 @@
@required this.valueIndicatorShape,
@required this.showValueIndicator,
@required this.valueIndicatorTextStyle,
- }) : assert(activeTrackColor != null),
- assert(inactiveTrackColor != null),
- assert(disabledActiveTrackColor != null),
- assert(disabledInactiveTrackColor != null),
- assert(activeTickMarkColor != null),
- assert(inactiveTickMarkColor != null),
- assert(disabledActiveTickMarkColor != null),
- assert(disabledInactiveTickMarkColor != null),
- assert(thumbColor != null),
- assert(disabledThumbColor != null),
- assert(overlayColor != null),
- assert(valueIndicatorColor != null),
- assert(thumbShape != null),
- assert(valueIndicatorShape != null),
- assert(valueIndicatorTextStyle != null),
- assert(showValueIndicator != null);
+ }) : assert(activeTrackColor != null),
+ assert(inactiveTrackColor != null),
+ assert(disabledActiveTrackColor != null),
+ assert(disabledInactiveTrackColor != null),
+ assert(activeTickMarkColor != null),
+ assert(inactiveTickMarkColor != null),
+ assert(disabledActiveTickMarkColor != null),
+ assert(disabledInactiveTickMarkColor != null),
+ assert(thumbColor != null),
+ assert(disabledThumbColor != null),
+ assert(overlayColor != null),
+ assert(valueIndicatorColor != null),
+ assert(thumbShape != null),
+ assert(valueIndicatorShape != null),
+ assert(valueIndicatorTextStyle != null),
+ assert(showValueIndicator != null);
/// Generates a SliderThemeData from three main colors.
///
diff --git a/packages/flutter/lib/src/material/tab_indicator.dart b/packages/flutter/lib/src/material/tab_indicator.dart
index 51d1ee6..d0ca571 100644
--- a/packages/flutter/lib/src/material/tab_indicator.dart
+++ b/packages/flutter/lib/src/material/tab_indicator.dart
@@ -22,7 +22,8 @@
const UnderlineTabIndicator({
this.borderSide = const BorderSide(width: 2.0, color: Colors.white),
this.insets = EdgeInsets.zero,
- }) : assert(borderSide != null), assert(insets != null);
+ }) : assert(borderSide != null),
+ assert(insets != null);
/// The color and weight of the horizontal line drawn below the selected tab.
final BorderSide borderSide;
@@ -64,7 +65,8 @@
class _UnderlinePainter extends BoxPainter {
_UnderlinePainter(this.decoration, VoidCallback onChanged)
- : assert(decoration != null), super(onChanged);
+ : assert(decoration != null),
+ super(onChanged);
final UnderlineTabIndicator decoration;
diff --git a/packages/flutter/lib/src/material/tabs.dart b/packages/flutter/lib/src/material/tabs.dart
index 7c71b78..5c132ee 100644
--- a/packages/flutter/lib/src/material/tabs.dart
+++ b/packages/flutter/lib/src/material/tabs.dart
@@ -1236,7 +1236,10 @@
@required this.backgroundColor,
@required this.borderColor,
@required this.size,
- }) : assert(backgroundColor != null), assert(borderColor != null), assert(size != null), super(key: key);
+ }) : assert(backgroundColor != null),
+ assert(borderColor != null),
+ assert(size != null),
+ super(key: key);
/// The indicator circle's background color.
final Color backgroundColor;
@@ -1275,7 +1278,8 @@
this.indicatorSize = 12.0,
this.color,
this.selectedColor,
- }) : assert(indicatorSize != null && indicatorSize > 0.0), super(key: key);
+ }) : assert(indicatorSize != null && indicatorSize > 0.0),
+ super(key: key);
/// This widget's selection and animation state.
///
diff --git a/packages/flutter/lib/src/material/time.dart b/packages/flutter/lib/src/material/time.dart
index 6e82b74..ca9d1ba 100644
--- a/packages/flutter/lib/src/material/time.dart
+++ b/packages/flutter/lib/src/material/time.dart
@@ -57,7 +57,9 @@
///
/// The [hour] is set to the time's hour and the [minute] is set to the time's
/// minute in the timezone of the given [DateTime].
- TimeOfDay.fromDateTime(DateTime time) : hour = time.hour, minute = time.minute;
+ TimeOfDay.fromDateTime(DateTime time)
+ : hour = time.hour,
+ minute = time.minute;
/// Creates a time of day based on the current time.
///
diff --git a/packages/flutter/lib/src/material/time_picker.dart b/packages/flutter/lib/src/material/time_picker.dart
index 650bed5..526dd54 100644
--- a/packages/flutter/lib/src/material/time_picker.dart
+++ b/packages/flutter/lib/src/material/time_picker.dart
@@ -112,8 +112,8 @@
@required this.widget,
this.startMargin = 0.0,
}) : assert(layoutId != null),
- assert(widget != null),
- assert(startMargin != null);
+ assert(widget != null),
+ assert(startMargin != null);
/// Identifier used by the custom layout to refer to the widget.
final _TimePickerHeaderId layoutId;
@@ -140,9 +140,9 @@
/// All arguments must be non-null. If the piece does not contain a pivot
/// fragment, use the value -1 as a convention.
const _TimePickerHeaderPiece(this.pivotIndex, this.fragments, { this.bottomMargin = 0.0 })
- : assert(pivotIndex != null),
- assert(fragments != null),
- assert(bottomMargin != null);
+ : assert(pivotIndex != null),
+ assert(fragments != null),
+ assert(bottomMargin != null);
/// Index into the [fragments] list, pointing at the fragment that's centered
/// horizontally.
@@ -175,8 +175,8 @@
/// to the left or right of it.
class _TimePickerHeaderFormat {
const _TimePickerHeaderFormat(this.centrepieceIndex, this.pieces)
- : assert(centrepieceIndex != null),
- assert(pieces != null);
+ : assert(centrepieceIndex != null),
+ assert(pieces != null);
/// Index into the [pieces] list pointing at the piece that contains the
/// pivot fragment.
diff --git a/packages/flutter/lib/src/painting/colors.dart b/packages/flutter/lib/src/painting/colors.dart
index e38f1ad..4eba576 100644
--- a/packages/flutter/lib/src/painting/colors.dart
+++ b/packages/flutter/lib/src/painting/colors.dart
@@ -89,18 +89,18 @@
/// All the arguments must not be null and be in their respective ranges. See
/// the fields for each parameter for a description of their ranges.
const HSVColor.fromAHSV(this.alpha, this.hue, this.saturation, this.value)
- : assert(alpha != null),
- assert(hue != null),
- assert(saturation != null),
- assert(value != null),
- assert(alpha >= 0.0),
- assert(alpha <= 1.0),
- assert(hue >= 0.0),
- assert(hue <= 360.0),
- assert(saturation >= 0.0),
- assert(saturation <= 1.0),
- assert(value >= 0.0),
- assert(value <= 1.0);
+ : assert(alpha != null),
+ assert(hue != null),
+ assert(saturation != null),
+ assert(value != null),
+ assert(alpha >= 0.0),
+ assert(alpha <= 1.0),
+ assert(hue >= 0.0),
+ assert(hue <= 360.0),
+ assert(saturation >= 0.0),
+ assert(saturation <= 1.0),
+ assert(value >= 0.0),
+ assert(value <= 1.0);
/// Creates an [HSVColor] from an RGB [Color].
///
diff --git a/packages/flutter/lib/src/painting/edge_insets.dart b/packages/flutter/lib/src/painting/edge_insets.dart
index a485334..9ff3269 100644
--- a/packages/flutter/lib/src/painting/edge_insets.dart
+++ b/packages/flutter/lib/src/painting/edge_insets.dart
@@ -330,7 +330,10 @@
/// ```
/// {@end-tool}
const EdgeInsets.all(double value)
- : left = value, top = value, right = value, bottom = value;
+ : left = value,
+ top = value,
+ right = value,
+ bottom = value;
/// Creates insets with only the given values non-zero.
///
@@ -359,9 +362,13 @@
/// const EdgeInsets.symmetric(vertical: 8.0)
/// ```
/// {@end-tool}
- const EdgeInsets.symmetric({ double vertical = 0.0,
- double horizontal = 0.0 })
- : left = horizontal, top = vertical, right = horizontal, bottom = vertical;
+ const EdgeInsets.symmetric({
+ double vertical = 0.0,
+ double horizontal = 0.0,
+ }) : left = horizontal,
+ top = vertical,
+ right = horizontal,
+ bottom = vertical;
/// Creates insets that match the given window padding.
///
diff --git a/packages/flutter/lib/src/painting/flutter_logo.dart b/packages/flutter/lib/src/painting/flutter_logo.dart
index 44a67b6..2b7bddd 100644
--- a/packages/flutter/lib/src/painting/flutter_logo.dart
+++ b/packages/flutter/lib/src/painting/flutter_logo.dart
@@ -246,9 +246,9 @@
/// An object that paints a [BoxDecoration] into a canvas.
class _FlutterLogoPainter extends BoxPainter {
_FlutterLogoPainter(this._config)
- : assert(_config != null),
- assert(_config.debugAssertIsValid()),
- super(null) {
+ : assert(_config != null),
+ assert(_config.debugAssertIsValid()),
+ super(null) {
_prepareText();
}
diff --git a/packages/flutter/lib/src/painting/image_provider.dart b/packages/flutter/lib/src/painting/image_provider.dart
index c8564b6..161517d 100644
--- a/packages/flutter/lib/src/painting/image_provider.dart
+++ b/packages/flutter/lib/src/painting/image_provider.dart
@@ -452,8 +452,8 @@
///
/// The arguments must not be null.
const NetworkImage(this.url, { this.scale = 1.0 , this.headers })
- : assert(url != null),
- assert(scale != null);
+ : assert(url != null),
+ assert(scale != null);
/// The URL from which the image will be fetched.
final String url;
@@ -529,8 +529,8 @@
///
/// The arguments must not be null.
const FileImage(this.file, { this.scale = 1.0 })
- : assert(file != null),
- assert(scale != null);
+ : assert(file != null),
+ assert(scale != null);
/// The file to decode into an image.
final File file;
@@ -597,8 +597,8 @@
///
/// The arguments must not be null.
const MemoryImage(this.bytes, { this.scale = 1.0 })
- : assert(bytes != null),
- assert(scale != null);
+ : assert(bytes != null),
+ assert(scale != null);
/// The bytes to decode into an image.
final Uint8List bytes;
diff --git a/packages/flutter/lib/src/painting/image_stream.dart b/packages/flutter/lib/src/painting/image_stream.dart
index b529eb7..2a20a32 100644
--- a/packages/flutter/lib/src/painting/image_stream.dart
+++ b/packages/flutter/lib/src/painting/image_stream.dart
@@ -19,8 +19,8 @@
///
/// Both the image and the scale must not be null.
const ImageInfo({ @required this.image, this.scale = 1.0 })
- : assert(image != null),
- assert(scale != null);
+ : assert(image != null),
+ assert(scale != null);
/// The raw image pixels.
///
@@ -371,7 +371,7 @@
/// message is only dumped to the console in debug mode (see [new
/// FlutterErrorDetails]).
OneFrameImageStreamCompleter(Future<ImageInfo> image, { InformationCollector informationCollector })
- : assert(image != null) {
+ : assert(image != null) {
image.then<void>(setImage, onError: (dynamic error, StackTrace stack) {
reportError(
context: 'resolving a single-frame image stream',
diff --git a/packages/flutter/lib/src/physics/spring_simulation.dart b/packages/flutter/lib/src/physics/spring_simulation.dart
index d33154c..f662281 100644
--- a/packages/flutter/lib/src/physics/spring_simulation.dart
+++ b/packages/flutter/lib/src/physics/spring_simulation.dart
@@ -94,8 +94,8 @@
double velocity, {
Tolerance tolerance = Tolerance.defaultTolerance,
}) : _endPosition = end,
- _solution = _SpringSolution(spring, start - end, velocity),
- super(tolerance: tolerance);
+ _solution = _SpringSolution(spring, start - end, velocity),
+ super(tolerance: tolerance);
final double _endPosition;
final _SpringSolution _solution;
diff --git a/packages/flutter/lib/src/rendering/box.dart b/packages/flutter/lib/src/rendering/box.dart
index 89f1b5c..947ab1f 100644
--- a/packages/flutter/lib/src/rendering/box.dart
+++ b/packages/flutter/lib/src/rendering/box.dart
@@ -109,10 +109,10 @@
const BoxConstraints.tightFor({
double width,
double height
- }): minWidth = width != null ? width : 0.0,
- maxWidth = width != null ? width : double.infinity,
- minHeight = height != null ? height : 0.0,
- maxHeight = height != null ? height : double.infinity;
+ }) : minWidth = width != null ? width : 0.0,
+ maxWidth = width != null ? width : double.infinity,
+ minHeight = height != null ? height : 0.0,
+ maxHeight = height != null ? height : double.infinity;
/// Creates box constraints that require the given width or height, except if
/// they are infinite.
@@ -124,10 +124,10 @@
const BoxConstraints.tightForFinite({
double width = double.infinity,
double height = double.infinity
- }): minWidth = width != double.infinity ? width : 0.0,
- maxWidth = width != double.infinity ? width : double.infinity,
- minHeight = height != double.infinity ? height : 0.0,
- maxHeight = height != double.infinity ? height : double.infinity;
+ }) : minWidth = width != double.infinity ? width : 0.0,
+ maxWidth = width != double.infinity ? width : double.infinity,
+ minHeight = height != double.infinity ? height : 0.0,
+ maxHeight = height != double.infinity ? height : double.infinity;
/// Creates box constraints that forbid sizes larger than the given size.
BoxConstraints.loose(Size size)
@@ -143,10 +143,10 @@
const BoxConstraints.expand({
double width,
double height
- }): minWidth = width != null ? width : double.infinity,
- maxWidth = width != null ? width : double.infinity,
- minHeight = height != null ? height : double.infinity,
- maxHeight = height != null ? height : double.infinity;
+ }) : minWidth = width != null ? width : double.infinity,
+ maxWidth = width != null ? width : double.infinity,
+ minHeight = height != null ? height : double.infinity,
+ maxHeight = height != null ? height : double.infinity;
/// The minimum width that satisfies the constraints.
final double minWidth;
@@ -615,8 +615,8 @@
///
/// The [localPosition] argument must not be null.
const BoxHitTestEntry(RenderBox target, this.localPosition)
- : assert(localPosition != null),
- super(target);
+ : assert(localPosition != null),
+ super(target);
@override
RenderBox get target => super.target;
diff --git a/packages/flutter/lib/src/rendering/editable.dart b/packages/flutter/lib/src/rendering/editable.dart
index 054e763..dbc5f89 100644
--- a/packages/flutter/lib/src/rendering/editable.dart
+++ b/packages/flutter/lib/src/rendering/editable.dart
@@ -69,7 +69,7 @@
///
/// The [point] argument must not be null.
const TextSelectionPoint(this.point, this.direction)
- : assert(point != null);
+ : assert(point != null);
/// Coordinates of the lower left or lower right corner of the selection,
/// relative to the top left of the [RenderEditable] object.
diff --git a/packages/flutter/lib/src/rendering/layer.dart b/packages/flutter/lib/src/rendering/layer.dart
index f3db290..b79933e 100644
--- a/packages/flutter/lib/src/rendering/layer.dart
+++ b/packages/flutter/lib/src/rendering/layer.dart
@@ -323,7 +323,8 @@
@required this.rect,
@required this.textureId,
this.freeze = false,
- }): assert(rect != null), assert(textureId != null);
+ }) : assert(rect != null),
+ assert(textureId != null);
/// Bounding rectangle of this layer.
final Rect rect;
@@ -366,7 +367,8 @@
PlatformViewLayer({
@required this.rect,
@required this.viewId,
- }): assert(rect != null), assert(viewId != null);
+ }) : assert(rect != null),
+ assert(viewId != null);
/// Bounding rectangle of this layer in the global coordinate space.
final Rect rect;
@@ -815,9 +817,13 @@
///
/// The [clipRect] property must be non-null before the compositing phase of
/// the pipeline.
- ClipRectLayer({ @required Rect clipRect, Clip clipBehavior = Clip.hardEdge }) :
- _clipRect = clipRect, _clipBehavior = clipBehavior,
- assert(clipBehavior != null), assert(clipBehavior != Clip.none);
+ ClipRectLayer({
+ @required Rect clipRect,
+ Clip clipBehavior = Clip.hardEdge,
+ }) : _clipRect = clipRect,
+ _clipBehavior = clipBehavior,
+ assert(clipBehavior != null),
+ assert(clipBehavior != Clip.none);
/// The rectangle to clip in the parent's coordinate system.
///
@@ -887,9 +893,13 @@
///
/// The [clipRRect] property must be non-null before the compositing phase of
/// the pipeline.
- ClipRRectLayer({ @required RRect clipRRect, Clip clipBehavior = Clip.antiAlias }) :
- _clipRRect = clipRRect, _clipBehavior = clipBehavior,
- assert(clipBehavior != null), assert(clipBehavior != Clip.none);
+ ClipRRectLayer({
+ @required RRect clipRRect,
+ Clip clipBehavior = Clip.antiAlias,
+ }) : _clipRRect = clipRRect,
+ _clipBehavior = clipBehavior,
+ assert(clipBehavior != null),
+ assert(clipBehavior != Clip.none);
/// The rounded-rect to clip in the parent's coordinate system.
///
@@ -955,9 +965,13 @@
///
/// The [clipPath] property must be non-null before the compositing phase of
/// the pipeline.
- ClipPathLayer({ @required Path clipPath, Clip clipBehavior = Clip.antiAlias }) :
- _clipPath = clipPath, _clipBehavior = clipBehavior,
- assert(clipBehavior != null), assert(clipBehavior != Clip.none);
+ ClipPathLayer({
+ @required Path clipPath,
+ Clip clipBehavior = Clip.antiAlias,
+ }) : _clipPath = clipPath,
+ _clipBehavior = clipBehavior,
+ assert(clipBehavior != null),
+ assert(clipBehavior != Clip.none);
/// The path to clip in the parent's coordinate system.
///
@@ -1094,8 +1108,11 @@
///
/// The [alpha] property must be non-null before the compositing phase of
/// the pipeline.
- OpacityLayer({ @required int alpha, Offset offset = Offset.zero })
- : _alpha = alpha, _offset = offset;
+ OpacityLayer({
+ @required int alpha,
+ Offset offset = Offset.zero,
+ }) : _alpha = alpha,
+ _offset = offset;
/// The amount to multiply into the alpha channel.
///
@@ -1152,8 +1169,13 @@
///
/// The [shader], [maskRect], and [blendMode] properties must be non-null
/// before the compositing phase of the pipeline.
- ShaderMaskLayer({ @required Shader shader, @required Rect maskRect, @required BlendMode blendMode })
- : _shader = shader, _maskRect = maskRect, _blendMode = blendMode;
+ ShaderMaskLayer({
+ @required Shader shader,
+ @required Rect maskRect,
+ @required BlendMode blendMode,
+ }) : _shader = shader,
+ _maskRect = maskRect,
+ _blendMode = blendMode;
/// The shader to apply to the children.
///
diff --git a/packages/flutter/lib/src/rendering/object.dart b/packages/flutter/lib/src/rendering/object.dart
index 4c2928c..a96ae36 100644
--- a/packages/flutter/lib/src/rendering/object.dart
+++ b/packages/flutter/lib/src/rendering/object.dart
@@ -612,7 +612,7 @@
/// You can obtain the [PipelineOwner] using the [RenderObject.owner] property.
class SemanticsHandle {
SemanticsHandle._(this._owner, this.listener)
- : assert(_owner != null) {
+ : assert(_owner != null) {
if (listener != null)
_owner.semanticsOwner.addListener(listener);
}
@@ -3122,7 +3122,7 @@
/// information of multiple [_InterestingSemanticsFragment] to a parent.
abstract class _SemanticsFragment {
_SemanticsFragment({@required this.dropsSemanticsOfPreviousSiblings })
- : assert (dropsSemanticsOfPreviousSiblings != null);
+ : assert (dropsSemanticsOfPreviousSiblings != null);
/// Incorporate the fragments of children into this fragment.
void addAll(Iterable<_InterestingSemanticsFragment> fragments);
@@ -3160,7 +3160,7 @@
class _ContainerSemanticsFragment extends _SemanticsFragment {
_ContainerSemanticsFragment({ @required bool dropsSemanticsOfPreviousSiblings })
- : super(dropsSemanticsOfPreviousSiblings: dropsSemanticsOfPreviousSiblings);
+ : super(dropsSemanticsOfPreviousSiblings: dropsSemanticsOfPreviousSiblings);
@override
void addAll(Iterable<_InterestingSemanticsFragment> fragments) {
diff --git a/packages/flutter/lib/src/rendering/proxy_box.dart b/packages/flutter/lib/src/rendering/proxy_box.dart
index d081d42..516d32b 100644
--- a/packages/flutter/lib/src/rendering/proxy_box.dart
+++ b/packages/flutter/lib/src/rendering/proxy_box.dart
@@ -1153,7 +1153,9 @@
RenderBox child,
CustomClipper<T> clipper,
this.clipBehavior = Clip.antiAlias,
- }) : _clipper = clipper, assert(clipBehavior != null), super(child);
+ }) : _clipper = clipper,
+ assert(clipBehavior != null),
+ super(child);
/// If non-null, determines which clip to use on the child.
CustomClipper<T> get clipper => _clipper;
@@ -1318,7 +1320,9 @@
BorderRadius borderRadius = BorderRadius.zero,
CustomClipper<RRect> clipper,
Clip clipBehavior = Clip.antiAlias,
- }) : assert(clipBehavior != Clip.none), _borderRadius = borderRadius, super(child: child, clipper: clipper, clipBehavior: clipBehavior) {
+ }) : assert(clipBehavior != Clip.none),
+ _borderRadius = borderRadius,
+ super(child: child, clipper: clipper, clipBehavior: clipBehavior) {
assert(_borderRadius != null || clipper != null);
}
@@ -1389,7 +1393,8 @@
RenderBox child,
CustomClipper<Rect> clipper,
Clip clipBehavior = Clip.antiAlias,
- }) : assert(clipBehavior != Clip.none), super(child: child, clipper: clipper, clipBehavior: clipBehavior);
+ }) : assert(clipBehavior != Clip.none),
+ super(child: child, clipper: clipper, clipBehavior: clipBehavior);
Rect _cachedRect;
Path _cachedPath;
@@ -1464,7 +1469,8 @@
RenderBox child,
CustomClipper<Path> clipper,
Clip clipBehavior = Clip.antiAlias,
- }) : assert(clipBehavior != Clip.none), super(child: child, clipper: clipper, clipBehavior: clipBehavior);
+ }) : assert(clipBehavior != Clip.none),
+ super(child: child, clipper: clipper, clipBehavior: clipBehavior);
@override
Path get _defaultClip => Path()..addRect(Offset.zero & size);
@@ -2878,7 +2884,9 @@
RenderBox child,
bool ignoring = true,
bool ignoringSemantics
- }) : _ignoring = ignoring, _ignoringSemantics = ignoringSemantics, super(child) {
+ }) : _ignoring = ignoring,
+ _ignoringSemantics = ignoringSemantics,
+ super(child) {
assert(_ignoring != null);
}
@@ -4381,7 +4389,11 @@
class RenderBlockSemantics extends RenderProxyBox {
/// Create a render object that blocks semantics for nodes below it in paint
/// order.
- RenderBlockSemantics({ RenderBox child, bool blocking = true, }) : _blocking = blocking, super(child);
+ RenderBlockSemantics({
+ RenderBox child,
+ bool blocking = true,
+ }) : _blocking = blocking,
+ super(child);
/// Whether this render object is blocking semantics of previously painted
/// [RenderObject]s below a common semantics boundary from the semantic tree.
@@ -4440,7 +4452,8 @@
RenderExcludeSemantics({
RenderBox child,
bool excluding = true,
- }) : _excluding = excluding, super(child) {
+ }) : _excluding = excluding,
+ super(child) {
assert(_excluding != null);
}
@@ -4485,8 +4498,8 @@
RenderBox child,
@required int index,
}) : assert(index != null),
- _index = index,
- super(child);
+ _index = index,
+ super(child);
/// The index used to annotated child semantics.
int get index => _index;
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 3627302..48a71a8 100644
--- a/packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart
+++ b/packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart
@@ -297,7 +297,8 @@
RenderSliverFixedExtentList({
@required RenderSliverBoxChildManager childManager,
double itemExtent,
- }) : _itemExtent = itemExtent, super(childManager: childManager);
+ }) : _itemExtent = itemExtent,
+ super(childManager: childManager);
@override
double get itemExtent => _itemExtent;
diff --git a/packages/flutter/lib/src/rendering/sliver_persistent_header.dart b/packages/flutter/lib/src/rendering/sliver_persistent_header.dart
index dbffe0f..a00a684 100644
--- a/packages/flutter/lib/src/rendering/sliver_persistent_header.dart
+++ b/packages/flutter/lib/src/rendering/sliver_persistent_header.dart
@@ -356,7 +356,8 @@
RenderSliverFloatingPersistentHeader({
RenderBox child,
FloatingHeaderSnapConfiguration snapConfiguration,
- }) : _snapConfiguration = snapConfiguration, super(child: child);
+ }) : _snapConfiguration = snapConfiguration,
+ super(child: child);
AnimationController _controller;
Animation<double> _animation;
diff --git a/packages/flutter/lib/src/rendering/stack.dart b/packages/flutter/lib/src/rendering/stack.dart
index c039eee..360d32e 100644
--- a/packages/flutter/lib/src/rendering/stack.dart
+++ b/packages/flutter/lib/src/rendering/stack.dart
@@ -630,11 +630,12 @@
AlignmentGeometry alignment = AlignmentDirectional.topStart,
TextDirection textDirection,
int index = 0,
- }) : _index = index, super(
- children: children,
- alignment: alignment,
- textDirection: textDirection,
- );
+ }) : _index = index,
+ super(
+ children: children,
+ alignment: alignment,
+ textDirection: textDirection,
+ );
@override
void visitChildrenForSemantics(RenderObjectVisitor visitor) {
diff --git a/packages/flutter/lib/src/rendering/texture.dart b/packages/flutter/lib/src/rendering/texture.dart
index bf9d1c3..32f594e 100644
--- a/packages/flutter/lib/src/rendering/texture.dart
+++ b/packages/flutter/lib/src/rendering/texture.dart
@@ -36,7 +36,9 @@
/// for how to create and manage backend textures on iOS.
class TextureBox extends RenderBox {
/// Creates a box backed by the texture identified by [textureId].
- TextureBox({ @required int textureId }) : assert(textureId != null), _textureId = textureId;
+ TextureBox({ @required int textureId })
+ : assert(textureId != null),
+ _textureId = textureId;
/// The identity of the backend texture.
int get textureId => _textureId;
diff --git a/packages/flutter/lib/src/rendering/viewport.dart b/packages/flutter/lib/src/rendering/viewport.dart
index 2fc43a4..69c06a2 100644
--- a/packages/flutter/lib/src/rendering/viewport.dart
+++ b/packages/flutter/lib/src/rendering/viewport.dart
@@ -90,7 +90,8 @@
const RevealedOffset({
@required this.offset,
@required this.rect,
- }) : assert(offset != null), assert(rect != null);
+ }) : assert(offset != null),
+ assert(rect != null);
/// Offset for the viewport to reveal a specific element in the viewport.
///
diff --git a/packages/flutter/lib/src/semantics/semantics_event.dart b/packages/flutter/lib/src/semantics/semantics_event.dart
index dddc52d..8dd69e3 100644
--- a/packages/flutter/lib/src/semantics/semantics_event.dart
+++ b/packages/flutter/lib/src/semantics/semantics_event.dart
@@ -65,10 +65,10 @@
class AnnounceSemanticsEvent extends SemanticsEvent {
/// Constructs an event that triggers an announcement by the platform.
- const AnnounceSemanticsEvent(this.message, this.textDirection) :
- assert(message != null),
- assert(textDirection != null),
- super('announce');
+ const AnnounceSemanticsEvent(this.message, this.textDirection)
+ : assert(message != null),
+ assert(textDirection != null),
+ super('announce');
/// The message to announce.
///
diff --git a/packages/flutter/lib/src/services/raw_keyboard_android.dart b/packages/flutter/lib/src/services/raw_keyboard_android.dart
index fbcf168..cc3cb57 100644
--- a/packages/flutter/lib/src/services/raw_keyboard_android.dart
+++ b/packages/flutter/lib/src/services/raw_keyboard_android.dart
@@ -23,11 +23,11 @@
this.keyCode = 0,
this.scanCode = 0,
this.metaState = 0,
- }) : assert(flags != null),
- assert(codePoint != null),
- assert(keyCode != null),
- assert(scanCode != null),
- assert(metaState != null);
+ }) : assert(flags != null),
+ assert(codePoint != null),
+ assert(keyCode != null),
+ assert(scanCode != null),
+ assert(metaState != null);
/// The current set of additional flags for this event.
///
diff --git a/packages/flutter/lib/src/services/raw_keyboard_fuschia.dart b/packages/flutter/lib/src/services/raw_keyboard_fuschia.dart
index 52d2638..e62dab9 100644
--- a/packages/flutter/lib/src/services/raw_keyboard_fuschia.dart
+++ b/packages/flutter/lib/src/services/raw_keyboard_fuschia.dart
@@ -20,9 +20,9 @@
this.hidUsage = 0,
this.codePoint = 0,
this.modifiers = 0,
- }) : assert(hidUsage != null),
- assert(codePoint != null),
- assert(modifiers != null);
+ }) : assert(hidUsage != null),
+ assert(codePoint != null),
+ assert(modifiers != null);
/// The USB HID usage.
///
diff --git a/packages/flutter/lib/src/services/text_editing.dart b/packages/flutter/lib/src/services/text_editing.dart
index 3ca883a..a1798be 100644
--- a/packages/flutter/lib/src/services/text_editing.dart
+++ b/packages/flutter/lib/src/services/text_editing.dart
@@ -119,7 +119,10 @@
const TextSelection.collapsed({
@required int offset,
this.affinity = TextAffinity.downstream
- }) : baseOffset = offset, extentOffset = offset, isDirectional = false, super.collapsed(offset);
+ }) : baseOffset = offset,
+ extentOffset = offset,
+ isDirectional = false,
+ super.collapsed(offset);
/// Creates a collapsed selection at the given text position.
///
diff --git a/packages/flutter/lib/src/services/text_formatter.dart b/packages/flutter/lib/src/services/text_formatter.dart
index f64f6d5..cb9e4e1 100644
--- a/packages/flutter/lib/src/services/text_formatter.dart
+++ b/packages/flutter/lib/src/services/text_formatter.dart
@@ -60,8 +60,8 @@
/// Wiring for [TextInputFormatter.withFunction].
class _SimpleTextInputFormatter extends TextInputFormatter {
- _SimpleTextInputFormatter(this.formatFunction) :
- assert(formatFunction != null);
+ _SimpleTextInputFormatter(this.formatFunction)
+ : assert(formatFunction != null);
final TextInputFormatFunction formatFunction;
@@ -215,8 +215,8 @@
/// Creates a formatter that allows only the insertion of whitelisted characters patterns.
///
/// The [whitelistedPattern] must not be null.
- WhitelistingTextInputFormatter(this.whitelistedPattern) :
- assert(whitelistedPattern != null);
+ WhitelistingTextInputFormatter(this.whitelistedPattern)
+ : assert(whitelistedPattern != null);
/// A [Pattern] to extract all instances of allowed characters.
///
diff --git a/packages/flutter/lib/src/services/text_input.dart b/packages/flutter/lib/src/services/text_input.dart
index 20b36d2..b591793 100644
--- a/packages/flutter/lib/src/services/text_input.dart
+++ b/packages/flutter/lib/src/services/text_input.dart
@@ -23,7 +23,9 @@
/// for additional flags for some input types. For example, numeric input
/// can specify whether it supports decimal numbers and/or signed numbers.
class TextInputType {
- const TextInputType._(this.index) : signed = null, decimal = null;
+ const TextInputType._(this.index)
+ : signed = null,
+ decimal = null;
/// Optimize for numerical information.
///
diff --git a/packages/flutter/lib/src/widgets/animated_list.dart b/packages/flutter/lib/src/widgets/animated_list.dart
index 037f358..2d55174 100644
--- a/packages/flutter/lib/src/widgets/animated_list.dart
+++ b/packages/flutter/lib/src/widgets/animated_list.dart
@@ -26,7 +26,9 @@
class _ActiveItem implements Comparable<_ActiveItem> {
_ActiveItem.incoming(this.controller, this.itemIndex) : removedItemBuilder = null;
_ActiveItem.outgoing(this.controller, this.itemIndex, this.removedItemBuilder);
- _ActiveItem.index(this.itemIndex) : controller = null, removedItemBuilder = null;
+ _ActiveItem.index(this.itemIndex)
+ : controller = null,
+ removedItemBuilder = null;
final AnimationController controller;
final AnimatedListRemovedItemBuilder removedItemBuilder;
diff --git a/packages/flutter/lib/src/widgets/animated_switcher.dart b/packages/flutter/lib/src/widgets/animated_switcher.dart
index 6cf4ad6..45c1fbe 100644
--- a/packages/flutter/lib/src/widgets/animated_switcher.dart
+++ b/packages/flutter/lib/src/widgets/animated_switcher.dart
@@ -22,9 +22,9 @@
@required this.animation,
@required this.transition,
@required this.widgetChild,
- }) : assert(animation != null),
- assert(transition != null),
- assert(controller != null);
+ }) : assert(animation != null),
+ assert(transition != null),
+ assert(controller != null);
// The animation controller for the child's transition.
final AnimationController controller;
@@ -156,12 +156,12 @@
this.switchOutCurve = Curves.linear,
this.transitionBuilder = AnimatedSwitcher.defaultTransitionBuilder,
this.layoutBuilder = AnimatedSwitcher.defaultLayoutBuilder,
- }) : assert(duration != null),
- assert(switchInCurve != null),
- assert(switchOutCurve != null),
- assert(transitionBuilder != null),
- assert(layoutBuilder != null),
- super(key: key);
+ }) : assert(duration != null),
+ assert(switchInCurve != null),
+ assert(switchOutCurve != null),
+ assert(transitionBuilder != null),
+ assert(layoutBuilder != null),
+ super(key: key);
/// The current child widget to display. If there was a previous child, then
/// that child will be faded out using the [switchOutCurve], while the new
diff --git a/packages/flutter/lib/src/widgets/async.dart b/packages/flutter/lib/src/widgets/async.dart
index 703e797..1e025ec 100644
--- a/packages/flutter/lib/src/widgets/async.dart
+++ b/packages/flutter/lib/src/widgets/async.dart
@@ -196,8 +196,8 @@
/// Creates an [AsyncSnapshot] with the specified [connectionState],
/// and optionally either [data] or [error] (but not both).
const AsyncSnapshot._(this.connectionState, this.data, this.error)
- : assert(connectionState != null),
- assert(!(data != null && error != null));
+ : assert(connectionState != null),
+ assert(!(data != null && error != null));
/// Creates an [AsyncSnapshot] in [ConnectionState.none] with null data and error.
const AsyncSnapshot.nothing() : this._(ConnectionState.none, null, null);
diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart
index 0fbe2fb..f938f69 100644
--- a/packages/flutter/lib/src/widgets/basic.dart
+++ b/packages/flutter/lib/src/widgets/basic.dart
@@ -5836,7 +5836,7 @@
this.excluding = true,
Widget child,
}) : assert(excluding != null),
- super(key: key, child: child);
+ super(key: key, child: child);
/// Whether this widget is excluded in the semantics tree.
final bool excluding;
diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart
index 8d6d575..07ab805 100644
--- a/packages/flutter/lib/src/widgets/framework.dart
+++ b/packages/flutter/lib/src/widgets/framework.dart
@@ -3590,7 +3590,8 @@
/// information such as the stack trace for the exception.
class ErrorWidget extends LeafRenderObjectWidget {
/// Creates a widget that displays the given error message.
- ErrorWidget(Object exception) : message = _stringify(exception),
+ ErrorWidget(Object exception)
+ : message = _stringify(exception),
super(key: UniqueKey());
/// The configurable factory for [ErrorWidget].
@@ -3796,7 +3797,8 @@
class StatefulElement extends ComponentElement {
/// Creates an element that uses the given widget as its configuration.
StatefulElement(StatefulWidget widget)
- : _state = widget.createState(), super(widget) {
+ : _state = widget.createState(),
+ super(widget) {
assert(() {
if (!_state._debugTypesAreRight(widget)) {
throw FlutterError(
@@ -4780,7 +4782,7 @@
/// elements inherit their owner from their parent.
abstract class RootRenderObjectElement extends RenderObjectElement {
/// Initializes fields for subclasses.
- RootRenderObjectElement(RenderObjectWidget widget): super(widget);
+ RootRenderObjectElement(RenderObjectWidget widget) : super(widget);
/// Set the owner of the element. The owner will be propagated to all the
/// descendants of this element.
@@ -4808,7 +4810,7 @@
/// An [Element] that uses a [LeafRenderObjectWidget] as its configuration.
class LeafRenderObjectElement extends RenderObjectElement {
/// Creates an element that uses the given widget as its configuration.
- LeafRenderObjectElement(LeafRenderObjectWidget widget): super(widget);
+ LeafRenderObjectElement(LeafRenderObjectWidget widget) : super(widget);
@override
void forgetChild(Element child) {
diff --git a/packages/flutter/lib/src/widgets/gesture_detector.dart b/packages/flutter/lib/src/widgets/gesture_detector.dart
index be01b3f..1c50ee1 100644
--- a/packages/flutter/lib/src/widgets/gesture_detector.dart
+++ b/packages/flutter/lib/src/widgets/gesture_detector.dart
@@ -83,9 +83,9 @@
/// Creates a gesture recognizer factory with the given callbacks.
///
/// The arguments must not be null.
- const GestureRecognizerFactoryWithHandlers(this._constructor, this._initializer) :
- assert(_constructor != null),
- assert(_initializer != null);
+ const GestureRecognizerFactoryWithHandlers(this._constructor, this._initializer)
+ : assert(_constructor != null),
+ assert(_initializer != null);
final GestureRecognizerFactoryConstructor<T> _constructor;
diff --git a/packages/flutter/lib/src/widgets/icon_theme_data.dart b/packages/flutter/lib/src/widgets/icon_theme_data.dart
index e5e462e..61247ec 100644
--- a/packages/flutter/lib/src/widgets/icon_theme_data.dart
+++ b/packages/flutter/lib/src/widgets/icon_theme_data.dart
@@ -26,9 +26,9 @@
///
/// The [color] is black, the [opacity] is 1.0, and the [size] is 24.0.
const IconThemeData.fallback()
- : color = const Color(0xFF000000),
- _opacity = 1.0,
- size = 24.0;
+ : color = const Color(0xFF000000),
+ _opacity = 1.0,
+ size = 24.0;
/// Creates a copy of this icon theme but with the given fields replaced with
/// the new values.
diff --git a/packages/flutter/lib/src/widgets/implicit_animations.dart b/packages/flutter/lib/src/widgets/implicit_animations.dart
index 37ea40f..4c0357b 100644
--- a/packages/flutter/lib/src/widgets/implicit_animations.dart
+++ b/packages/flutter/lib/src/widgets/implicit_animations.dart
@@ -769,7 +769,7 @@
@required Duration duration,
}) : assert(left == null || right == null || width == null),
assert(top == null || bottom == null || height == null),
- super(key: key, curve: curve, duration: duration);
+ super(key: key, curve: curve, duration: duration);
/// Creates a widget that animates the rectangle it occupies implicitly.
///
@@ -920,7 +920,7 @@
@required Duration duration,
}) : assert(start == null || end == null || width == null),
assert(top == null || bottom == null || height == null),
- super(key: key, curve: curve, duration: duration);
+ super(key: key, curve: curve, duration: duration);
/// The widget below this widget in the tree.
///
diff --git a/packages/flutter/lib/src/widgets/nested_scroll_view.dart b/packages/flutter/lib/src/widgets/nested_scroll_view.dart
index 570e103..839cbe4 100644
--- a/packages/flutter/lib/src/widgets/nested_scroll_view.dart
+++ b/packages/flutter/lib/src/widgets/nested_scroll_view.dart
@@ -1377,7 +1377,8 @@
RenderSliverOverlapAbsorber({
@required SliverOverlapAbsorberHandle handle,
RenderSliver child,
- }) : assert(handle != null), _handle = handle {
+ }) : assert(handle != null),
+ _handle = handle {
this.child = child;
}
@@ -1522,7 +1523,8 @@
/// The [handle] must not be null.
RenderSliverOverlapInjector({
@required SliverOverlapAbsorberHandle handle,
- }) : assert(handle != null), _handle = handle;
+ }) : assert(handle != null),
+ _handle = handle;
double _currentLayoutExtent;
double _currentMaxExtent;
diff --git a/packages/flutter/lib/src/widgets/platform_view.dart b/packages/flutter/lib/src/widgets/platform_view.dart
index d698a6f..a946533 100644
--- a/packages/flutter/lib/src/widgets/platform_view.dart
+++ b/packages/flutter/lib/src/widgets/platform_view.dart
@@ -212,9 +212,9 @@
this.creationParamsCodec,
this.gestureRecognizers,
}) : assert(viewType != null),
- assert(hitTestBehavior != null),
- assert(creationParams == null || creationParamsCodec != null),
- super(key: key);
+ assert(hitTestBehavior != null),
+ assert(creationParams == null || creationParamsCodec != null),
+ super(key: key);
// TODO(amirh): reference the iOS API doc once avaliable.
/// The unique identifier for iOS view type to be embedded by this widget.
diff --git a/packages/flutter/lib/src/widgets/routes.dart b/packages/flutter/lib/src/widgets/routes.dart
index 067542c..8479791 100644
--- a/packages/flutter/lib/src/widgets/routes.dart
+++ b/packages/flutter/lib/src/widgets/routes.dart
@@ -1450,14 +1450,14 @@
Duration transitionDuration = const Duration(milliseconds: 200),
RouteTransitionsBuilder transitionBuilder,
RouteSettings settings,
- }) : assert(barrierDismissible != null),
- _pageBuilder = pageBuilder,
- _barrierDismissible = barrierDismissible,
- _barrierLabel = barrierLabel,
- _barrierColor = barrierColor,
- _transitionDuration = transitionDuration,
- _transitionBuilder = transitionBuilder,
- super(settings: settings);
+ }) : assert(barrierDismissible != null),
+ _pageBuilder = pageBuilder,
+ _barrierDismissible = barrierDismissible,
+ _barrierLabel = barrierLabel,
+ _barrierColor = barrierColor,
+ _transitionDuration = transitionDuration,
+ _transitionBuilder = transitionBuilder,
+ super(settings: settings);
final RoutePageBuilder _pageBuilder;
diff --git a/packages/flutter/lib/src/widgets/scroll_activity.dart b/packages/flutter/lib/src/widgets/scroll_activity.dart
index eb56302..c60a5e0 100644
--- a/packages/flutter/lib/src/widgets/scroll_activity.dart
+++ b/packages/flutter/lib/src/widgets/scroll_activity.dart
@@ -425,7 +425,8 @@
DragScrollActivity(
ScrollActivityDelegate delegate,
ScrollDragController controller,
- ) : _controller = controller, super(delegate);
+ ) : _controller = controller,
+ super(delegate);
ScrollDragController _controller;
diff --git a/packages/flutter/lib/src/widgets/scroll_view.dart b/packages/flutter/lib/src/widgets/scroll_view.dart
index 3f48500..7424562 100644
--- a/packages/flutter/lib/src/widgets/scroll_view.dart
+++ b/packages/flutter/lib/src/widgets/scroll_view.dart
@@ -756,19 +756,20 @@
addAutomaticKeepAlives: addAutomaticKeepAlives,
addRepaintBoundaries: addRepaintBoundaries,
addSemanticIndexes: addSemanticIndexes,
- ), super(
- key: key,
- scrollDirection: scrollDirection,
- reverse: reverse,
- controller: controller,
- primary: primary,
- physics: physics,
- shrinkWrap: shrinkWrap,
- padding: padding,
- cacheExtent: cacheExtent,
- semanticChildCount: semanticChildCount ?? children.length,
- dragStartBehavior: dragStartBehavior,
- );
+ ),
+ super(
+ key: key,
+ scrollDirection: scrollDirection,
+ reverse: reverse,
+ controller: controller,
+ primary: primary,
+ physics: physics,
+ shrinkWrap: shrinkWrap,
+ padding: padding,
+ cacheExtent: cacheExtent,
+ semanticChildCount: semanticChildCount ?? children.length,
+ dragStartBehavior: dragStartBehavior,
+ );
/// Creates a scrollable, linear array of widgets that are created on demand.
///
@@ -820,19 +821,20 @@
addAutomaticKeepAlives: addAutomaticKeepAlives,
addRepaintBoundaries: addRepaintBoundaries,
addSemanticIndexes: addSemanticIndexes,
- ), super(
- key: key,
- scrollDirection: scrollDirection,
- reverse: reverse,
- controller: controller,
- primary: primary,
- physics: physics,
- shrinkWrap: shrinkWrap,
- padding: padding,
- cacheExtent: cacheExtent,
- semanticChildCount: semanticChildCount ?? itemCount,
- dragStartBehavior: dragStartBehavior,
- );
+ ),
+ super(
+ key: key,
+ scrollDirection: scrollDirection,
+ reverse: reverse,
+ controller: controller,
+ primary: primary,
+ physics: physics,
+ shrinkWrap: shrinkWrap,
+ padding: padding,
+ cacheExtent: cacheExtent,
+ semanticChildCount: semanticChildCount ?? itemCount,
+ dragStartBehavior: dragStartBehavior,
+ );
/// Creates a fixed-length scrollable linear array of list "items" separated
/// by list item "separators".
@@ -925,18 +927,19 @@
semanticIndexCallback: (Widget _, int index) {
return index.isEven ? index ~/ 2 : null;
}
- ), super(
- key: key,
- scrollDirection: scrollDirection,
- reverse: reverse,
- controller: controller,
- primary: primary,
- physics: physics,
- shrinkWrap: shrinkWrap,
- padding: padding,
- cacheExtent: cacheExtent,
- semanticChildCount: _computeSemanticChildCount(itemCount),
- );
+ ),
+ super(
+ key: key,
+ scrollDirection: scrollDirection,
+ reverse: reverse,
+ controller: controller,
+ primary: primary,
+ physics: physics,
+ shrinkWrap: shrinkWrap,
+ padding: padding,
+ cacheExtent: cacheExtent,
+ semanticChildCount: _computeSemanticChildCount(itemCount),
+ );
/// Creates a scrollable, linear array of widgets with a custom child model.
///
@@ -1327,19 +1330,20 @@
addAutomaticKeepAlives: addAutomaticKeepAlives,
addRepaintBoundaries: addRepaintBoundaries,
addSemanticIndexes: addSemanticIndexes,
- ), super(
- key: key,
- scrollDirection: scrollDirection,
- reverse: reverse,
- controller: controller,
- primary: primary,
- physics: physics,
- shrinkWrap: shrinkWrap,
- padding: padding,
- cacheExtent: cacheExtent,
- semanticChildCount: semanticChildCount ?? children.length,
- dragStartBehavior: dragStartBehavior,
- );
+ ),
+ super(
+ key: key,
+ scrollDirection: scrollDirection,
+ reverse: reverse,
+ controller: controller,
+ primary: primary,
+ physics: physics,
+ shrinkWrap: shrinkWrap,
+ padding: padding,
+ cacheExtent: cacheExtent,
+ semanticChildCount: semanticChildCount ?? children.length,
+ dragStartBehavior: dragStartBehavior,
+ );
/// Creates a scrollable, 2D array of widgets with tiles that each have a
/// maximum cross-axis extent.
@@ -1385,18 +1389,19 @@
addAutomaticKeepAlives: addAutomaticKeepAlives,
addRepaintBoundaries: addRepaintBoundaries,
addSemanticIndexes: addSemanticIndexes,
- ), super(
- key: key,
- scrollDirection: scrollDirection,
- reverse: reverse,
- controller: controller,
- primary: primary,
- physics: physics,
- shrinkWrap: shrinkWrap,
- padding: padding,
- semanticChildCount: semanticChildCount ?? children.length,
- dragStartBehavior: dragStartBehavior,
- );
+ ),
+ super(
+ key: key,
+ scrollDirection: scrollDirection,
+ reverse: reverse,
+ controller: controller,
+ primary: primary,
+ physics: physics,
+ shrinkWrap: shrinkWrap,
+ padding: padding,
+ semanticChildCount: semanticChildCount ?? children.length,
+ dragStartBehavior: dragStartBehavior,
+ );
/// A delegate that controls the layout of the children within the [GridView].
///
diff --git a/packages/flutter/lib/src/widgets/scrollable.dart b/packages/flutter/lib/src/widgets/scrollable.dart
index 4af767f..f0f723d 100644
--- a/packages/flutter/lib/src/widgets/scrollable.dart
+++ b/packages/flutter/lib/src/widgets/scrollable.dart
@@ -595,7 +595,8 @@
@required this.allowImplicitScrolling,
@required this.semanticChildCount,
Widget child
- }) : assert(position != null), super(key: key, child: child);
+ }) : assert(position != null),
+ super(key: key, child: child);
final ScrollPosition position;
final bool allowImplicitScrolling;
@@ -628,7 +629,8 @@
}) : _position = position,
_allowImplicitScrolling = allowImplicitScrolling,
_semanticChildCount = semanticChildCount,
- assert(position != null), super(child) {
+ assert(position != null),
+ super(child) {
position.addListener(markNeedsSemanticsUpdate);
}
diff --git a/packages/flutter/lib/src/widgets/sliver_prototype_extent_list.dart b/packages/flutter/lib/src/widgets/sliver_prototype_extent_list.dart
index 2cfab2a5..77455ee 100644
--- a/packages/flutter/lib/src/widgets/sliver_prototype_extent_list.dart
+++ b/packages/flutter/lib/src/widgets/sliver_prototype_extent_list.dart
@@ -39,7 +39,8 @@
Key key,
@required SliverChildDelegate delegate,
@required this.prototypeItem,
- }) : assert(prototypeItem != null), super(key: key, delegate: delegate);
+ }) : assert(prototypeItem != null),
+ super(key: key, delegate: delegate);
/// Defines the main axis extent of all of this sliver's children.
///
diff --git a/packages/flutter/lib/src/widgets/spacer.dart b/packages/flutter/lib/src/widgets/spacer.dart
index 2f88dd9..0d94071 100644
--- a/packages/flutter/lib/src/widgets/spacer.dart
+++ b/packages/flutter/lib/src/widgets/spacer.dart
@@ -43,9 +43,9 @@
///
/// The [flex] parameter may not be null or less than one.
const Spacer({Key key, this.flex = 1})
- : assert(flex != null),
- assert(flex > 0),
- super(key: key);
+ : assert(flex != null),
+ assert(flex > 0),
+ super(key: key);
/// The flex factor to use in determining how much space to take up.
///
diff --git a/packages/flutter/lib/src/widgets/text.dart b/packages/flutter/lib/src/widgets/text.dart
index 683e80e..d85b670 100644
--- a/packages/flutter/lib/src/widgets/text.dart
+++ b/packages/flutter/lib/src/widgets/text.dart
@@ -248,9 +248,9 @@
this.textScaleFactor,
this.maxLines,
this.semanticsLabel,
- }): assert(textSpan != null),
- data = null,
- super(key: key);
+ }) : assert(textSpan != null),
+ data = null,
+ super(key: key);
/// The text to display.
///
diff --git a/packages/flutter/lib/src/widgets/text_selection.dart b/packages/flutter/lib/src/widgets/text_selection.dart
index de99d16..0351213 100644
--- a/packages/flutter/lib/src/widgets/text_selection.dart
+++ b/packages/flutter/lib/src/widgets/text_selection.dart
@@ -231,9 +231,9 @@
this.selectionControls,
this.selectionDelegate,
this.dragStartBehavior = DragStartBehavior.down,
- }): assert(value != null),
- assert(context != null),
- _value = value {
+ }) : assert(value != null),
+ assert(context != null),
+ _value = value {
final OverlayState overlay = Overlay.of(context);
assert(overlay != null);
_handleController = AnimationController(duration: _fadeDuration, vsync: overlay);
diff --git a/packages/flutter/lib/src/widgets/texture.dart b/packages/flutter/lib/src/widgets/texture.dart
index 03d2cc3..2e97f8e 100644
--- a/packages/flutter/lib/src/widgets/texture.dart
+++ b/packages/flutter/lib/src/widgets/texture.dart
@@ -34,7 +34,11 @@
/// for how to create and manage backend textures on iOS.
class Texture extends LeafRenderObjectWidget {
/// Creates a widget backed by the texture identified by [textureId].
- const Texture({ Key key, @required this.textureId }): assert(textureId != null), super(key: key);
+ const Texture({
+ Key key,
+ @required this.textureId,
+ }) : assert(textureId != null),
+ super(key: key);
/// The identity of the backend texture.
final int textureId;
diff --git a/packages/flutter/lib/src/widgets/widget_inspector.dart b/packages/flutter/lib/src/widgets/widget_inspector.dart
index 312fbe6..3d65db8 100644
--- a/packages/flutter/lib/src/widgets/widget_inspector.dart
+++ b/packages/flutter/lib/src/widgets/widget_inspector.dart
@@ -607,7 +607,12 @@
/// [DiagnosticsNode] objects.
///
/// The [node] and [child] arguments must not be null.
- _DiagnosticsPathNode({ @required this.node, @required this.children, this.childIndex }) : assert(node != null), assert(children != null);
+ _DiagnosticsPathNode({
+ @required this.node,
+ @required this.children,
+ this.childIndex,
+ }) : assert(node != null),
+ assert(children != null);
/// Node at the point in the path this [_DiagnosticsPathNode] is describing.
final DiagnosticsNode node;
@@ -686,13 +691,12 @@
_SerializeConfig base, {
int subtreeDepth,
Iterable<Diagnosticable> pathToInclude,
- }) :
- groupName = base.groupName,
- summaryTree = base.summaryTree,
- subtreeDepth = subtreeDepth ?? base.subtreeDepth,
- pathToInclude = pathToInclude ?? base.pathToInclude,
- includeProperties = base.includeProperties,
- expandPropertyValues = base.expandPropertyValues;
+ }) : groupName = base.groupName,
+ summaryTree = base.summaryTree,
+ subtreeDepth = subtreeDepth ?? base.subtreeDepth,
+ pathToInclude = pathToInclude ?? base.pathToInclude,
+ includeProperties = base.includeProperties,
+ expandPropertyValues = base.expandPropertyValues;
/// Optional object group name used to manage manage lifetimes of object
/// references in the returned JSON.
@@ -2443,7 +2447,9 @@
class _RenderInspectorOverlay extends RenderBox {
/// The arguments must not be null.
- _RenderInspectorOverlay({ @required InspectorSelection selection }) : _selection = selection, assert(selection != null);
+ _RenderInspectorOverlay({ @required InspectorSelection selection })
+ : _selection = selection,
+ assert(selection != null);
InspectorSelection get selection => _selection;
InspectorSelection _selection;
@@ -2476,9 +2482,9 @@
}
class _TransformedRect {
- _TransformedRect(RenderObject object) :
- rect = object.semanticBounds,
- transform = object.getTransformTo(null);
+ _TransformedRect(RenderObject object)
+ : rect = object.semanticBounds,
+ transform = object.getTransformTo(null);
final Rect rect;
final Matrix4 transform;
@@ -2545,7 +2551,8 @@
_InspectorOverlayLayer({
@required this.overlayRect,
@required this.selection,
- }) : assert(overlayRect != null), assert(selection != null) {
+ }) : assert(overlayRect != null),
+ assert(selection != null) {
bool inDebugMode = false;
assert(() {
inDebugMode = true;
diff --git a/packages/flutter/test/painting/image_stream_test.dart b/packages/flutter/test/painting/image_stream_test.dart
index bc3f30a..e78843a 100644
--- a/packages/flutter/test/painting/image_stream_test.dart
+++ b/packages/flutter/test/painting/image_stream_test.dart
@@ -11,8 +11,8 @@
import 'package:flutter_test/flutter_test.dart';
class FakeFrameInfo implements FrameInfo {
- FakeFrameInfo(int width, int height, this._duration) :
- _image = FakeImage(width, height);
+ FakeFrameInfo(int width, int height, this._duration)
+ : _image = FakeImage(width, height);
final Duration _duration;
final Image _image;
diff --git a/packages/flutter/test/rendering/mock_canvas.dart b/packages/flutter/test/rendering/mock_canvas.dart
index 805232a..d513780 100644
--- a/packages/flutter/test/rendering/mock_canvas.dart
+++ b/packages/flutter/test/rendering/mock_canvas.dart
@@ -559,7 +559,8 @@
class _TestRecordingCanvasPaintsCountMatcher extends _TestRecordingCanvasMatcher {
_TestRecordingCanvasPaintsCountMatcher(Symbol methodName, int count)
- : _methodName = methodName, _count = count;
+ : _methodName = methodName,
+ _count = count;
final Symbol _methodName;
final int _count;
diff --git a/packages/flutter_driver/lib/src/common/find.dart b/packages/flutter_driver/lib/src/common/find.dart
index b24b569..6904371 100644
--- a/packages/flutter_driver/lib/src/common/find.dart
+++ b/packages/flutter_driver/lib/src/common/find.dart
@@ -27,8 +27,8 @@
/// Deserializes this command from the value generated by [serialize].
CommandWithTarget.deserialize(Map<String, String> json)
- : finder = SerializableFinder.deserialize(json),
- super.deserialize(json);
+ : finder = SerializableFinder.deserialize(json),
+ super.deserialize(json);
/// Locates the object or objects targeted by this command.
final SerializableFinder finder;
@@ -53,7 +53,7 @@
///
/// If [timeout] is not specified the command times out after 5 seconds.
WaitFor(SerializableFinder finder, {Duration timeout})
- : super(finder, timeout: timeout);
+ : super(finder, timeout: timeout);
/// Deserializes this command from the value generated by [serialize].
WaitFor.deserialize(Map<String, String> json) : super.deserialize(json);
@@ -80,7 +80,7 @@
///
/// If [timeout] is not specified the command times out after 5 seconds.
WaitForAbsent(SerializableFinder finder, {Duration timeout})
- : super(finder, timeout: timeout);
+ : super(finder, timeout: timeout);
/// Deserializes this command from the value generated by [serialize].
WaitForAbsent.deserialize(Map<String, String> json) : super.deserialize(json);
@@ -107,7 +107,7 @@
/// Deserializes this command from the value generated by [serialize].
WaitUntilNoTransientCallbacks.deserialize(Map<String, String> json)
- : super.deserialize(json);
+ : super.deserialize(json);
@override
final String kind = 'waitUntilNoTransientCallbacks';
@@ -191,8 +191,8 @@
class ByValueKey extends SerializableFinder {
/// Creates a finder given the key value.
ByValueKey(this.keyValue)
- : keyValueString = '$keyValue',
- keyValueType = '${keyValue.runtimeType}' {
+ : keyValueString = '$keyValue',
+ keyValueType = '${keyValue.runtimeType}' {
if (!_supportedKeyValueTypes.contains(keyValue.runtimeType))
throw _createInvalidKeyValueTypeError('$keyValue.runtimeType');
}
@@ -284,7 +284,7 @@
/// Creates a command from a json map.
GetSemanticsId.deserialize(Map<String, String> json)
- : super.deserialize(json);
+ : super.deserialize(json);
@override
String get kind => 'get_semantics_id';
diff --git a/packages/flutter_driver/lib/src/common/frame_sync.dart b/packages/flutter_driver/lib/src/common/frame_sync.dart
index 114a55a..add70fb 100644
--- a/packages/flutter_driver/lib/src/common/frame_sync.dart
+++ b/packages/flutter_driver/lib/src/common/frame_sync.dart
@@ -11,8 +11,8 @@
/// Deserializes this command from the value generated by [serialize].
SetFrameSync.deserialize(Map<String, String> params)
- : enabled = params['enabled'].toLowerCase() == 'true',
- super.deserialize(params);
+ : enabled = params['enabled'].toLowerCase() == 'true',
+ super.deserialize(params);
/// Whether frameSync should be enabled or disabled.
final bool enabled;
diff --git a/packages/flutter_driver/lib/src/common/gesture.dart b/packages/flutter_driver/lib/src/common/gesture.dart
index 6da0b1d..7dabd3f 100644
--- a/packages/flutter_driver/lib/src/common/gesture.dart
+++ b/packages/flutter_driver/lib/src/common/gesture.dart
@@ -44,11 +44,11 @@
/// Deserializes this command from the value generated by [serialize].
Scroll.deserialize(Map<String, String> json)
- : dx = double.parse(json['dx']),
- dy = double.parse(json['dy']),
- duration = Duration(microseconds: int.parse(json['duration'])),
- frequency = int.parse(json['frequency']),
- super.deserialize(json);
+ : dx = double.parse(json['dx']),
+ dy = double.parse(json['dy']),
+ duration = Duration(microseconds: int.parse(json['duration'])),
+ frequency = int.parse(json['frequency']),
+ super.deserialize(json);
/// Delta X offset per move event.
final double dx;
@@ -94,8 +94,8 @@
/// Deserializes this command from the value generated by [serialize].
ScrollIntoView.deserialize(Map<String, String> json)
- : alignment = double.parse(json['alignment']),
- super.deserialize(json);
+ : alignment = double.parse(json['alignment']),
+ super.deserialize(json);
/// How the widget should be aligned.
///
diff --git a/packages/flutter_driver/lib/src/common/message.dart b/packages/flutter_driver/lib/src/common/message.dart
index f66d148..0b51010 100644
--- a/packages/flutter_driver/lib/src/common/message.dart
+++ b/packages/flutter_driver/lib/src/common/message.dart
@@ -13,7 +13,7 @@
/// Deserializes this command from the value generated by [serialize].
Command.deserialize(Map<String, String> json)
- : timeout = _parseTimeout(json);
+ : timeout = _parseTimeout(json);
static Duration _parseTimeout(Map<String, String> json) {
final String timeout = json['timeout'];
diff --git a/packages/flutter_driver/lib/src/common/request_data.dart b/packages/flutter_driver/lib/src/common/request_data.dart
index d9b6598..d6d64e2 100644
--- a/packages/flutter_driver/lib/src/common/request_data.dart
+++ b/packages/flutter_driver/lib/src/common/request_data.dart
@@ -12,8 +12,8 @@
/// Deserializes this command from the value generated by [serialize].
RequestData.deserialize(Map<String, String> params)
- : message = params['message'],
- super.deserialize(params);
+ : message = params['message'],
+ super.deserialize(params);
/// The message being sent from the test to the application.
final String message;
diff --git a/packages/flutter_driver/lib/src/common/semantics.dart b/packages/flutter_driver/lib/src/common/semantics.dart
index 048c3d0..d44c420 100644
--- a/packages/flutter_driver/lib/src/common/semantics.dart
+++ b/packages/flutter_driver/lib/src/common/semantics.dart
@@ -11,8 +11,8 @@
/// Deserializes this command from the value generated by [serialize].
SetSemantics.deserialize(Map<String, String> params)
- : enabled = params['enabled'].toLowerCase() == 'true',
- super.deserialize(params);
+ : enabled = params['enabled'].toLowerCase() == 'true',
+ super.deserialize(params);
/// Whether semantics should be enabled (true) or disabled (false).
final bool enabled;
diff --git a/packages/flutter_driver/lib/src/common/text.dart b/packages/flutter_driver/lib/src/common/text.dart
index 328c92d..b5ee236 100644
--- a/packages/flutter_driver/lib/src/common/text.dart
+++ b/packages/flutter_driver/lib/src/common/text.dart
@@ -43,8 +43,8 @@
/// Deserializes this command from the value generated by [serialize].
EnterText.deserialize(Map<String, dynamic> json)
- : text = json['text'],
- super.deserialize(json);
+ : text = json['text'],
+ super.deserialize(json);
/// The text extracted by the [GetText] command.
final String text;
@@ -79,8 +79,8 @@
/// Deserializes this command from the value generated by [serialize].
SetTextEntryEmulation.deserialize(Map<String, dynamic> json)
- : enabled = json['enabled'] == 'true',
- super.deserialize(json);
+ : enabled = json['enabled'] == 'true',
+ super.deserialize(json);
/// Whether text entry emulation should be enabled.
final bool enabled;
diff --git a/packages/flutter_test/lib/src/accessibility.dart b/packages/flutter_test/lib/src/accessibility.dart
index 97a269d..9676c58 100644
--- a/packages/flutter_test/lib/src/accessibility.dart
+++ b/packages/flutter_test/lib/src/accessibility.dart
@@ -17,7 +17,9 @@
/// The result of evaluating a semantics node by a [AccessibilityGuideline].
class Evaluation {
/// Create a passing evaluation.
- const Evaluation.pass() : passed = true, reason = null;
+ const Evaluation.pass()
+ : passed = true,
+ reason = null;
/// Create a failing evaluation, with an optional [reason] explaining the
/// result.
diff --git a/packages/flutter_test/lib/src/finders.dart b/packages/flutter_test/lib/src/finders.dart
index 2d41b03..a2fda53 100644
--- a/packages/flutter_test/lib/src/finders.dart
+++ b/packages/flutter_test/lib/src/finders.dart
@@ -576,8 +576,8 @@
class _WidgetPredicateFinder extends MatchFinder {
_WidgetPredicateFinder(this.predicate, { String description, bool skipOffstage = true })
- : _description = description,
- super(skipOffstage: skipOffstage);
+ : _description = description,
+ super(skipOffstage: skipOffstage);
final WidgetPredicate predicate;
final String _description;
@@ -593,8 +593,8 @@
class _ElementPredicateFinder extends MatchFinder {
_ElementPredicateFinder(this.predicate, { String description, bool skipOffstage = true })
- : _description = description,
- super(skipOffstage: skipOffstage);
+ : _description = description,
+ super(skipOffstage: skipOffstage);
final ElementPredicate predicate;
final String _description;
diff --git a/packages/flutter_test/lib/src/goldens.dart b/packages/flutter_test/lib/src/goldens.dart
index dd63f6f..fb2a208 100644
--- a/packages/flutter_test/lib/src/goldens.dart
+++ b/packages/flutter_test/lib/src/goldens.dart
@@ -149,8 +149,8 @@
///
/// The [testFile] URL must represent a file.
LocalFileComparator(Uri testFile, {path.Style pathStyle})
- : basedir = _getBasedir(testFile, pathStyle),
- _path = _getPath(pathStyle);
+ : basedir = _getBasedir(testFile, pathStyle),
+ _path = _getPath(pathStyle);
static path.Context _getPath(path.Style style) {
return path.Context(style: style ?? path.Style.platform);
diff --git a/packages/flutter_test/lib/src/test_compat.dart b/packages/flutter_test/lib/src/test_compat.dart
index 7334274..d1688b7 100644
--- a/packages/flutter_test/lib/src/test_compat.dart
+++ b/packages/flutter_test/lib/src/test_compat.dart
@@ -304,12 +304,13 @@
/// fixed, this must not import `dart:io`.
class _Reporter {
_Reporter({bool color = true, bool printPath = true})
- : _printPath = printPath,
- _green = color ? '\u001b[32m' : '',
- _red = color ? '\u001b[31m' : '',
- _yellow = color ? '\u001b[33m' : '',
- _bold = color ? '\u001b[1m' : '',
- _noColor = color ? '\u001b[0m' : '';
+ : _printPath = printPath,
+ _green = color ? '\u001b[32m' : '',
+ _red = color ? '\u001b[31m' : '',
+ _yellow = color ? '\u001b[33m' : '',
+ _bold = color ? '\u001b[1m' : '',
+ _noColor = color ? '\u001b[0m' : '';
+
final List<LiveTest> passed = <LiveTest>[];
final List<LiveTest> failed = <LiveTest>[];
final List<Test> skipped = <Test>[];
diff --git a/packages/flutter_tools/lib/src/android/android_emulator.dart b/packages/flutter_tools/lib/src/android/android_emulator.dart
index bce4062..5d6daf8 100644
--- a/packages/flutter_tools/lib/src/android/android_emulator.dart
+++ b/packages/flutter_tools/lib/src/android/android_emulator.dart
@@ -27,7 +27,7 @@
class AndroidEmulator extends Emulator {
AndroidEmulator(String id, [this._properties])
- : super(id, _properties != null && _properties.isNotEmpty);
+ : super(id, _properties != null && _properties.isNotEmpty);
Map<String, String> _properties;
diff --git a/packages/flutter_tools/lib/src/android/android_workflow.dart b/packages/flutter_tools/lib/src/android/android_workflow.dart
index 00431f0..2ac566f 100644
--- a/packages/flutter_tools/lib/src/android/android_workflow.dart
+++ b/packages/flutter_tools/lib/src/android/android_workflow.dart
@@ -51,7 +51,7 @@
}
class AndroidValidator extends DoctorValidator {
- AndroidValidator(): super('Android toolchain - develop for Android devices',);
+ AndroidValidator() : super('Android toolchain - develop for Android devices',);
@override
String get slowWarning => '${_task ?? 'This'} is taking a long time...';
@@ -167,7 +167,7 @@
}
class AndroidLicenseValidator extends DoctorValidator {
- AndroidLicenseValidator(): super('Android license subvalidator',);
+ AndroidLicenseValidator() : super('Android license subvalidator',);
@override
String get slowWarning => 'Checking Android licenses is taking an unexpectedly long time...';
diff --git a/packages/flutter_tools/lib/src/artifacts.dart b/packages/flutter_tools/lib/src/artifacts.dart
index 371a042..6cfb8bc 100644
--- a/packages/flutter_tools/lib/src/artifacts.dart
+++ b/packages/flutter_tools/lib/src/artifacts.dart
@@ -76,9 +76,11 @@
}
class EngineBuildPaths {
- const EngineBuildPaths({ @required this.targetEngine, @required this.hostEngine }):
- assert(targetEngine != null),
- assert(hostEngine != null);
+ const EngineBuildPaths({
+ @required this.targetEngine,
+ @required this.hostEngine,
+ }) : assert(targetEngine != null),
+ assert(hostEngine != null);
final String targetEngine;
final String hostEngine;
diff --git a/packages/flutter_tools/lib/src/base/process.dart b/packages/flutter_tools/lib/src/base/process.dart
index 40e085e..077b32e 100644
--- a/packages/flutter_tools/lib/src/base/process.dart
+++ b/packages/flutter_tools/lib/src/base/process.dart
@@ -361,7 +361,9 @@
}
class RunResult {
- RunResult(this.processResult, this._command) : assert(_command != null), assert(_command.isNotEmpty);
+ RunResult(this.processResult, this._command)
+ : assert(_command != null),
+ assert(_command.isNotEmpty);
final ProcessResult processResult;
diff --git a/packages/flutter_tools/lib/src/base/terminal.dart b/packages/flutter_tools/lib/src/base/terminal.dart
index de7f012..8f9eb45 100644
--- a/packages/flutter_tools/lib/src/base/terminal.dart
+++ b/packages/flutter_tools/lib/src/base/terminal.dart
@@ -42,9 +42,9 @@
bool wrapText,
int wrapColumn,
bool showColor,
- }) : wrapText = wrapText ?? io.stdio?.hasTerminal ?? const io.Stdio().hasTerminal,
- _overrideWrapColumn = wrapColumn,
- showColor = showColor ?? platform.stdoutSupportsAnsi ?? false;
+ }) : wrapText = wrapText ?? io.stdio?.hasTerminal ?? const io.Stdio().hasTerminal,
+ _overrideWrapColumn = wrapColumn,
+ showColor = showColor ?? platform.stdoutSupportsAnsi ?? false;
/// If [wrapText] is true, then any text sent to the context's [Logger]
/// instance (e.g. from the [printError] or [printStatus] functions) will be
diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart
index dd1db59..fe5089e 100644
--- a/packages/flutter_tools/lib/src/cache.dart
+++ b/packages/flutter_tools/lib/src/cache.dart
@@ -348,7 +348,7 @@
/// A cached artifact containing fonts used for Material Design.
class MaterialFonts extends CachedArtifact {
- MaterialFonts(Cache cache): super('material_fonts', cache);
+ MaterialFonts(Cache cache) : super('material_fonts', cache);
@override
Future<void> updateInner() {
@@ -359,7 +359,7 @@
/// A cached artifact containing the Flutter engine binaries.
class FlutterEngine extends CachedArtifact {
- FlutterEngine(Cache cache): super('engine', cache);
+ FlutterEngine(Cache cache) : super('engine', cache);
List<String> _getPackageDirs() => const <String>['sky_engine'];
@@ -574,7 +574,7 @@
/// A cached artifact containing Gradle Wrapper scripts and binaries.
class GradleWrapper extends CachedArtifact {
- GradleWrapper(Cache cache): super('gradle_wrapper', cache);
+ GradleWrapper(Cache cache) : super('gradle_wrapper', cache);
List<String> get _gradleScripts => <String>['gradlew', 'gradlew.bat'];
diff --git a/packages/flutter_tools/lib/src/commands/update_packages.dart b/packages/flutter_tools/lib/src/commands/update_packages.dart
index efe4d91..f1f9d3d 100644
--- a/packages/flutter_tools/lib/src/commands/update_packages.dart
+++ b/packages/flutter_tools/lib/src/commands/update_packages.dart
@@ -903,7 +903,8 @@
DependencyKind kind,
this.version,
this.sourcePath,
- }) : _kind = kind, super(line);
+ }) : _kind = kind,
+ super(line);
static PubspecDependency parse(String line, { @required String filename }) {
// We recognize any line that:
diff --git a/packages/flutter_tools/lib/src/compile.dart b/packages/flutter_tools/lib/src/compile.dart
index 29fa0c6..3a24d54 100644
--- a/packages/flutter_tools/lib/src/compile.dart
+++ b/packages/flutter_tools/lib/src/compile.dart
@@ -286,9 +286,13 @@
}
class _RecompileRequest extends _CompilationRequest {
- _RecompileRequest(Completer<CompilerOutput> completer, this.mainPath,
- this.invalidatedFiles, this.outputPath, this.packagesFilePath) :
- super(completer);
+ _RecompileRequest(
+ Completer<CompilerOutput> completer,
+ this.mainPath,
+ this.invalidatedFiles,
+ this.outputPath,
+ this.packagesFilePath,
+ ) : super(completer);
String mainPath;
List<String> invalidatedFiles;
@@ -301,9 +305,15 @@
}
class _CompileExpressionRequest extends _CompilationRequest {
- _CompileExpressionRequest(Completer<CompilerOutput> completer, this.expression, this.definitions,
- this.typeDefinitions, this.libraryUri, this.klass, this.isStatic) :
- super(completer);
+ _CompileExpressionRequest(
+ Completer<CompilerOutput> completer,
+ this.expression,
+ this.definitions,
+ this.typeDefinitions,
+ this.libraryUri,
+ this.klass,
+ this.isStatic
+ ) : super(completer);
String expression;
List<String> definitions;
diff --git a/packages/flutter_tools/lib/src/dart/dependencies.dart b/packages/flutter_tools/lib/src/dart/dependencies.dart
index 0b7fa12..f931b09 100644
--- a/packages/flutter_tools/lib/src/dart/dependencies.dart
+++ b/packages/flutter_tools/lib/src/dart/dependencies.dart
@@ -26,10 +26,10 @@
}
class DartDependencySetBuilder {
- DartDependencySetBuilder(String mainScriptPath, String packagesFilePath) :
- _mainScriptPath = canonicalizePath(mainScriptPath),
- _mainScriptUri = fs.path.toUri(mainScriptPath),
- _packagesFilePath = canonicalizePath(packagesFilePath);
+ DartDependencySetBuilder(String mainScriptPath, String packagesFilePath)
+ : _mainScriptPath = canonicalizePath(mainScriptPath),
+ _mainScriptUri = fs.path.toUri(mainScriptPath),
+ _packagesFilePath = canonicalizePath(packagesFilePath);
final String _mainScriptPath;
final String _packagesFilePath;
diff --git a/packages/flutter_tools/lib/src/devfs.dart b/packages/flutter_tools/lib/src/devfs.dart
index 75ebec8..dece857 100644
--- a/packages/flutter_tools/lib/src/devfs.dart
+++ b/packages/flutter_tools/lib/src/devfs.dart
@@ -193,7 +193,9 @@
/// String content to be copied to the device.
class DevFSStringContent extends DevFSByteContent {
- DevFSStringContent(String string) : _string = string, super(utf8.encode(string));
+ DevFSStringContent(String string)
+ : _string = string,
+ super(utf8.encode(string));
String _string;
@@ -274,7 +276,7 @@
class _DevFSHttpWriter {
_DevFSHttpWriter(this.fsName, VMService serviceProtocol)
- : httpAddress = serviceProtocol.httpAddress;
+ : httpAddress = serviceProtocol.httpAddress;
final String fsName;
final Uri httpAddress;
@@ -377,25 +379,25 @@
class DevFS {
/// Create a [DevFS] named [fsName] for the local files in [rootDirectory].
- DevFS(VMService serviceProtocol,
- this.fsName,
- this.rootDirectory, {
- String packagesFilePath
- })
- : _operations = ServiceProtocolDevFSOperations(serviceProtocol),
- _httpWriter = _DevFSHttpWriter(fsName, serviceProtocol) {
+ DevFS(
+ VMService serviceProtocol,
+ this.fsName,
+ this.rootDirectory, {
+ String packagesFilePath
+ }) : _operations = ServiceProtocolDevFSOperations(serviceProtocol),
+ _httpWriter = _DevFSHttpWriter(fsName, serviceProtocol) {
_packagesFilePath =
packagesFilePath ?? fs.path.join(rootDirectory.path, kPackagesFileName);
}
- DevFS.operations(this._operations,
- this.fsName,
- this.rootDirectory, {
- String packagesFilePath,
- })
- : _httpWriter = null {
- _packagesFilePath =
- packagesFilePath ?? fs.path.join(rootDirectory.path, kPackagesFileName);
+ DevFS.operations(
+ this._operations,
+ this.fsName,
+ this.rootDirectory, {
+ String packagesFilePath,
+ }) : _httpWriter = null {
+ _packagesFilePath =
+ packagesFilePath ?? fs.path.join(rootDirectory.path, kPackagesFileName);
}
final DevFSOperations _operations;
diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart
index 9d46ffe..d932fd4 100644
--- a/packages/flutter_tools/lib/src/device.dart
+++ b/packages/flutter_tools/lib/src/device.dart
@@ -361,15 +361,15 @@
this.observatoryPort,
}) : debuggingEnabled = true;
- DebuggingOptions.disabled(this.buildInfo) :
- debuggingEnabled = false,
- useTestFonts = false,
- startPaused = false,
- enableSoftwareRendering = false,
- skiaDeterministicRendering = false,
- traceSkia = false,
- traceSystrace = false,
- observatoryPort = null;
+ DebuggingOptions.disabled(this.buildInfo)
+ : debuggingEnabled = false,
+ useTestFonts = false,
+ startPaused = false,
+ enableSoftwareRendering = false,
+ skiaDeterministicRendering = false,
+ traceSkia = false,
+ traceSystrace = false,
+ observatoryPort = null;
final bool debuggingEnabled;
@@ -387,7 +387,9 @@
class LaunchResult {
LaunchResult.succeeded({ this.observatoryUri }) : started = true;
- LaunchResult.failed() : started = false, observatoryUri = null;
+ LaunchResult.failed()
+ : started = false,
+ observatoryUri = null;
bool get hasObservatory => observatoryUri != null;
diff --git a/packages/flutter_tools/lib/src/ios/devices.dart b/packages/flutter_tools/lib/src/ios/devices.dart
index d250ea0..a68bcfb 100644
--- a/packages/flutter_tools/lib/src/ios/devices.dart
+++ b/packages/flutter_tools/lib/src/ios/devices.dart
@@ -111,7 +111,9 @@
}
class IOSDevice extends Device {
- IOSDevice(String id, { this.name, String sdkVersion }) : _sdkVersion = sdkVersion, super(id) {
+ IOSDevice(String id, { this.name, String sdkVersion })
+ : _sdkVersion = sdkVersion,
+ super(id) {
_installerPath = _checkForCommand('ideviceinstaller');
_iproxyPath = _checkForCommand('iproxy');
}
diff --git a/packages/flutter_tools/lib/src/project.dart b/packages/flutter_tools/lib/src/project.dart
index 5ac90fb..4c5496b 100644
--- a/packages/flutter_tools/lib/src/project.dart
+++ b/packages/flutter_tools/lib/src/project.dart
@@ -31,9 +31,9 @@
class FlutterProject {
@visibleForTesting
FlutterProject(this.directory, this.manifest, this._exampleManifest)
- : assert(directory != null),
- assert(manifest != null),
- assert(_exampleManifest != null);
+ : assert(directory != null),
+ assert(manifest != null),
+ assert(_exampleManifest != null);
/// Returns a future that completes with a [FlutterProject] view of the given directory
/// or a ToolExit error, if `pubspec.yaml` or `example/pubspec.yaml` is invalid.
diff --git a/packages/flutter_tools/lib/src/tester/flutter_tester.dart b/packages/flutter_tools/lib/src/tester/flutter_tester.dart
index de29600..30861be 100644
--- a/packages/flutter_tools/lib/src/tester/flutter_tester.dart
+++ b/packages/flutter_tools/lib/src/tester/flutter_tester.dart
@@ -27,8 +27,8 @@
}
FlutterTesterApp._(Directory directory)
- : _directory = directory,
- super(id: directory.path);
+ : _directory = directory,
+ super(id: directory.path);
final Directory _directory;
diff --git a/packages/flutter_tools/lib/src/version.dart b/packages/flutter_tools/lib/src/version.dart
index 29dbc5e..bd65cc3 100644
--- a/packages/flutter_tools/lib/src/version.dart
+++ b/packages/flutter_tools/lib/src/version.dart
@@ -540,7 +540,12 @@
class GitTagVersion {
const GitTagVersion(this.x, this.y, this.z, this.commits, this.hash);
- const GitTagVersion.unknown() : x = null, y = null, z = null, commits = 0, hash = '';
+ const GitTagVersion.unknown()
+ : x = null,
+ y = null,
+ z = null,
+ commits = 0,
+ hash = '';
/// The X in vX.Y.Z.
final int x;
diff --git a/packages/flutter_tools/lib/src/vmservice_record_replay.dart b/packages/flutter_tools/lib/src/vmservice_record_replay.dart
index 0061fd4..0868682 100644
--- a/packages/flutter_tools/lib/src/vmservice_record_replay.dart
+++ b/packages/flutter_tools/lib/src/vmservice_record_replay.dart
@@ -195,7 +195,7 @@
/// replays the corresponding responses back from the recording.
class ReplayVMServiceChannel extends StreamChannelMixin<String> {
ReplayVMServiceChannel(Directory location)
- : _transactions = _loadTransactions(location);
+ : _transactions = _loadTransactions(location);
final Map<int, _Transaction> _transactions;
final StreamController<String> _controller = StreamController<String>();
diff --git a/packages/flutter_tools/test/commands/doctor_test.dart b/packages/flutter_tools/test/commands/doctor_test.dart
index 95c9141..0a403cc 100644
--- a/packages/flutter_tools/test/commands/doctor_test.dart
+++ b/packages/flutter_tools/test/commands/doctor_test.dart
@@ -477,7 +477,7 @@
}
class MissingValidator extends DoctorValidator {
- MissingValidator(): super('Missing Validator');
+ MissingValidator() : super('Missing Validator');
@override
Future<ValidationResult> validate() async {
@@ -490,7 +490,7 @@
}
class NotAvailableValidator extends DoctorValidator {
- NotAvailableValidator(): super('Not Available Validator');
+ NotAvailableValidator() : super('Not Available Validator');
@override
Future<ValidationResult> validate() async {
@@ -622,7 +622,7 @@
}
class MissingGroupedValidator extends DoctorValidator {
- MissingGroupedValidator(String name): super(name);
+ MissingGroupedValidator(String name) : super(name);
@override
Future<ValidationResult> validate() async {
@@ -633,7 +633,7 @@
}
class PartialGroupedValidator extends DoctorValidator {
- PartialGroupedValidator(String name): super(name);
+ PartialGroupedValidator(String name) : super(name);
@override
Future<ValidationResult> validate() async {
@@ -702,7 +702,7 @@
class VsCodeValidatorTestTargets extends VsCodeValidator {
VsCodeValidatorTestTargets._(String installDirectory, String extensionDirectory, {String edition})
- : super(VsCode.fromDirectory(installDirectory, extensionDirectory, edition: edition));
+ : super(VsCode.fromDirectory(installDirectory, extensionDirectory, edition: edition));
static VsCodeValidatorTestTargets get installedWithExtension =>
VsCodeValidatorTestTargets._(validInstall, validExtensions);
diff --git a/packages/flutter_tools/test/emulator_test.dart b/packages/flutter_tools/test/emulator_test.dart
index 7a7c5b4..71469fb 100644
--- a/packages/flutter_tools/test/emulator_test.dart
+++ b/packages/flutter_tools/test/emulator_test.dart
@@ -164,7 +164,7 @@
class _MockEmulator extends Emulator {
_MockEmulator(String id, this.name, this.manufacturer, this.label)
- : super(id, true);
+ : super(id, true);
@override
final String name;
diff --git a/packages/flutter_tools/test/integration/test_driver.dart b/packages/flutter_tools/test/integration/test_driver.dart
index 0148296..b95e2c2 100644
--- a/packages/flutter_tools/test/integration/test_driver.dart
+++ b/packages/flutter_tools/test/integration/test_driver.dart
@@ -590,8 +590,8 @@
}
class FlutterTestTestDriver extends FlutterTestDriver {
- FlutterTestTestDriver(Directory _projectFolder, {String logPrefix}):
- super(_projectFolder, logPrefix: logPrefix);
+ FlutterTestTestDriver(Directory _projectFolder, {String logPrefix})
+ : super(_projectFolder, logPrefix: logPrefix);
Future<void> test({
String testFile = 'test/test.dart',
diff --git a/packages/flutter_tools/test/resident_runner_test.dart b/packages/flutter_tools/test/resident_runner_test.dart
index 815de93..2a20530 100644
--- a/packages/flutter_tools/test/resident_runner_test.dart
+++ b/packages/flutter_tools/test/resident_runner_test.dart
@@ -12,7 +12,7 @@
class TestRunner extends ResidentRunner {
TestRunner(List<FlutterDevice> devices)
- : super(devices);
+ : super(devices);
bool hasHelpBeenPrinted = false;
String receivedCommand;
diff --git a/packages/fuchsia_remote_debug_protocol/lib/src/common/logging.dart b/packages/fuchsia_remote_debug_protocol/lib/src/common/logging.dart
index 8a1e666..230ad3f 100644
--- a/packages/fuchsia_remote_debug_protocol/lib/src/common/logging.dart
+++ b/packages/fuchsia_remote_debug_protocol/lib/src/common/logging.dart
@@ -69,9 +69,8 @@
///
/// When this message is created, it sets its [time] to [DateTime.now].
LogMessage(this.message, this.tag, this.level)
- : levelName =
- level.toString().substring(level.toString().indexOf('.') + 1),
- time = DateTime.now();
+ : levelName = level.toString().substring(level.toString().indexOf('.') + 1),
+ time = DateTime.now();
/// The actual log message.
final String message;
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 1965752..d44308c 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
@@ -101,7 +101,7 @@
/// Dart VM at any given time.
class FuchsiaRemoteConnection {
FuchsiaRemoteConnection._(this._useIpV6Loopback, this._sshCommandRunner)
- : _pollDartVms = false;
+ : _pollDartVms = false;
bool _pollDartVms;
final List<PortForwarder> _forwardedVmServicePorts = <PortForwarder>[];