Skip to content

Commit bfa1d25

Browse files
authored
some formatting of map, parameters and spaces (flutter#29760)
1 parent ecfdd7e commit bfa1d25

File tree

95 files changed

+351
-243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+351
-243
lines changed

examples/catalog/lib/custom_a11y_traversal.dart

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,15 @@ class RowColumnTraversal extends StatelessWidget {
6161
/// A Button class that wraps an [IconButton] with a [RowColumnTraversal] to
6262
/// set its traversal order.
6363
class SpinnerButton extends StatelessWidget {
64-
const SpinnerButton(
65-
{Key key,
66-
this.onPressed,
67-
this.icon,
68-
this.rowOrder,
69-
this.columnOrder,
70-
this.field,
71-
this.increment}) : super(key: key);
64+
const SpinnerButton({
65+
Key key,
66+
this.onPressed,
67+
this.icon,
68+
this.rowOrder,
69+
this.columnOrder,
70+
this.field,
71+
this.increment,
72+
}) : super(key: key);
7273

7374
final VoidCallback onPressed;
7475
final IconData icon;

examples/catalog/test/custom_semantics_test.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ void main() {
9191
});
9292
}
9393

94-
void expectAdjustable(SemanticsNode node, {
94+
void expectAdjustable(
95+
SemanticsNode node, {
9596
bool hasIncreaseAction = true,
9697
bool hasDecreaseAction = true,
9798
String label = '',

examples/flutter_gallery/lib/demo/material/date_and_time_picker_demo.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ class _InputDropdown extends StatelessWidget {
1616
this.labelText,
1717
this.valueText,
1818
this.valueStyle,
19-
this.onPressed }) : super(key: key);
19+
this.onPressed,
20+
}) : super(key: key);
2021

2122
final String labelText;
2223
final String valueText;

examples/flutter_gallery/lib/demo/shrine/expanding_bottom_sheet.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ Animation<T> _getEmphasizedEasingAnimation<T>({
7171
@required T peak,
7272
@required T end,
7373
@required bool isForward,
74-
@required Animation<double> parent}) {
74+
@required Animation<double> parent,
75+
}) {
7576
Curve firstCurve;
7677
Curve secondCurve;
7778
double firstWeight;

examples/flutter_gallery/lib/demo/video_demo.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ class VideoCard extends StatelessWidget {
5050

5151
@override
5252
Widget build(BuildContext context) {
53-
Widget fullScreenRoutePageBuilder(BuildContext context,
54-
Animation<double> animation, Animation<double> secondaryAnimation) {
53+
Widget fullScreenRoutePageBuilder(
54+
BuildContext context,
55+
Animation<double> animation,
56+
Animation<double> secondaryAnimation,
57+
) {
5558
return _buildFullScreenVideo();
5659
}
5760

examples/flutter_gallery/lib/gallery/backdrop.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ final Animatable<BorderRadius> _kFrontHeadingBevelRadius = BorderRadiusTween(
2424
);
2525

2626
class _TappableWhileStatusIs extends StatefulWidget {
27-
const _TappableWhileStatusIs(this.status, {
27+
const _TappableWhileStatusIs(
28+
this.status, {
2829
Key key,
2930
this.controller,
3031
this.child,

examples/layers/rendering/src/sector_layout.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@ class SectorDimensions {
5757
const SectorDimensions({ this.deltaRadius = 0.0, this.deltaTheta = 0.0 });
5858

5959
factory SectorDimensions.withConstraints(
60-
SectorConstraints constraints,
61-
{ double deltaRadius = 0.0, double deltaTheta = 0.0, }
62-
) {
60+
SectorConstraints constraints, {
61+
double deltaRadius = 0.0,
62+
double deltaTheta = 0.0,
63+
}) {
6364
return SectorDimensions(
6465
deltaRadius: constraints.constrainDeltaRadius(deltaRadius),
6566
deltaTheta: constraints.constrainDeltaTheta(deltaTheta),
@@ -554,7 +555,8 @@ class RenderBoxToRenderSectorAdapter extends RenderBox with RenderObjectWithChil
554555
}
555556

556557
class RenderSolidColor extends RenderDecoratedSector {
557-
RenderSolidColor(this.backgroundColor, {
558+
RenderSolidColor(
559+
this.backgroundColor, {
558560
this.desiredDeltaRadius = double.infinity,
559561
this.desiredDeltaTheta = kTwoPi,
560562
}) : super(BoxDecoration(color: backgroundColor));

packages/flutter/lib/src/foundation/binding.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ abstract class BindingBase {
140140
registerServiceExtension(
141141
name: 'saveCompilationTrace',
142142
callback: (Map<String, String> parameters) async {
143-
return <String, dynamic> {
143+
return <String, dynamic>{
144144
'value': ui.saveCompilationTrace(),
145145
};
146146
},

packages/flutter/lib/src/foundation/diagnostics.dart

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,9 @@ class MessageProperty extends DiagnosticsProperty<void> {
10451045
/// message is stored as the description.
10461046
///
10471047
/// The [name], `message`, and [level] arguments must not be null.
1048-
MessageProperty(String name, String message, {
1048+
MessageProperty(
1049+
String name,
1050+
String message, {
10491051
DiagnosticLevel level = DiagnosticLevel.info,
10501052
}) : assert(name != null),
10511053
assert(message != null),
@@ -1063,7 +1065,9 @@ class StringProperty extends DiagnosticsProperty<String> {
10631065
/// Create a diagnostics property for strings.
10641066
///
10651067
/// The [showName], [quoted], and [level] arguments must not be null.
1066-
StringProperty(String name, String value, {
1068+
StringProperty(
1069+
String name,
1070+
String value, {
10671071
String description,
10681072
String tooltip,
10691073
bool showName = true,
@@ -1119,7 +1123,8 @@ class StringProperty extends DiagnosticsProperty<String> {
11191123
}
11201124

11211125
abstract class _NumProperty<T extends num> extends DiagnosticsProperty<T> {
1122-
_NumProperty(String name,
1126+
_NumProperty(
1127+
String name,
11231128
T value, {
11241129
String ifNull,
11251130
this.unit,
@@ -1137,7 +1142,8 @@ abstract class _NumProperty<T extends num> extends DiagnosticsProperty<T> {
11371142
level: level,
11381143
);
11391144

1140-
_NumProperty.lazy(String name,
1145+
_NumProperty.lazy(
1146+
String name,
11411147
ComputePropertyValueCallback<T> computeValue, {
11421148
String ifNull,
11431149
this.unit,
@@ -1190,7 +1196,9 @@ class DoubleProperty extends _NumProperty<double> {
11901196
/// If specified, [unit] describes the unit for the [value] (e.g. px).
11911197
///
11921198
/// The [showName] and [level] arguments must not be null.
1193-
DoubleProperty(String name, double value, {
1199+
DoubleProperty(
1200+
String name,
1201+
double value, {
11941202
String ifNull,
11951203
String unit,
11961204
String tooltip,
@@ -1249,7 +1257,9 @@ class IntProperty extends _NumProperty<int> {
12491257
/// Create a diagnostics property for integers.
12501258
///
12511259
/// The [showName] and [level] arguments must not be null.
1252-
IntProperty(String name, int value, {
1260+
IntProperty(
1261+
String name,
1262+
int value, {
12531263
String ifNull,
12541264
bool showName = true,
12551265
String unit,
@@ -1282,7 +1292,9 @@ class PercentProperty extends DoubleProperty {
12821292
/// be sufficient to disambiguate its meaning.
12831293
///
12841294
/// The [showName] and [level] arguments must not be null.
1285-
PercentProperty(String name, double fraction, {
1295+
PercentProperty(
1296+
String name,
1297+
double fraction, {
12861298
String ifNull,
12871299
bool showName = true,
12881300
String tooltip,
@@ -1361,7 +1373,8 @@ class FlagProperty extends DiagnosticsProperty<bool> {
13611373
/// be descriptions that make the property name redundant.
13621374
///
13631375
/// The [showName] and [level] arguments must not be null.
1364-
FlagProperty(String name, {
1376+
FlagProperty(
1377+
String name, {
13651378
@required bool value,
13661379
this.ifTrue,
13671380
this.ifFalse,
@@ -1456,7 +1469,9 @@ class IterableProperty<T> extends DiagnosticsProperty<Iterable<T>> {
14561469
/// interesting to display.
14571470
///
14581471
/// The [style], [showName], and [level] arguments must not be null.
1459-
IterableProperty(String name, Iterable<T> value, {
1472+
IterableProperty(
1473+
String name,
1474+
Iterable<T> value, {
14601475
Object defaultValue = kNoDefaultValue,
14611476
String ifNull,
14621477
String ifEmpty = '[]',
@@ -1531,7 +1546,9 @@ class EnumProperty<T> extends DiagnosticsProperty<T> {
15311546
/// Create a diagnostics property that displays an enum.
15321547
///
15331548
/// The [level] argument must also not be null.
1534-
EnumProperty(String name, T value, {
1549+
EnumProperty(
1550+
String name,
1551+
T value, {
15351552
Object defaultValue = kNoDefaultValue,
15361553
DiagnosticLevel level = DiagnosticLevel.info,
15371554
}) : assert(level != null),
@@ -1575,7 +1592,9 @@ class ObjectFlagProperty<T> extends DiagnosticsProperty<T> {
15751592
///
15761593
/// The [showName] and [level] arguments must not be null. Additionally, at
15771594
/// least one of [ifPresent] and [ifNull] must not be null.
1578-
ObjectFlagProperty(String name, T value, {
1595+
ObjectFlagProperty(
1596+
String name,
1597+
T value, {
15791598
this.ifPresent,
15801599
String ifNull,
15811600
bool showName = false,

packages/flutter/lib/src/gestures/pointer_signal_resolver.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class PointerSignalResolver {
5959
informationCollector: (StringBuffer information) {
6060
information.writeln('Event:');
6161
information.write(' $event');
62-
}
62+
},
6363
));
6464
}
6565
_firstRegisteredCallback = null;

packages/flutter/lib/src/material/data_table.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ class DataCell {
162162
/// If the cell has no data, then a [Text] widget with placeholder
163163
/// text should be provided instead, and then the [placeholder]
164164
/// argument should be set to true.
165-
const DataCell(this.child, {
165+
const DataCell(
166+
this.child, {
166167
this.placeholder = false,
167168
this.showEditIcon = false,
168169
this.onTap,

packages/flutter/lib/src/material/ink_well.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,13 @@ abstract class InteractiveInkFeature extends InkFeature {
4747
///
4848
/// Typically causes the ink to propagate faster across the material. By default this
4949
/// method does nothing.
50-
void confirm() {
51-
}
50+
void confirm() { }
5251

5352
/// Called when the user input that triggered this feature's appearance was canceled.
5453
///
5554
/// Typically causes the ink to gradually disappear. By default this method does
5655
/// nothing.
57-
void cancel() {
58-
}
56+
void cancel() { }
5957

6058
/// The ink's color.
6159
Color get color => _color;

packages/flutter/lib/src/material/material.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ enum MaterialType {
5353
///
5454
/// * [MaterialType]
5555
/// * [Material]
56-
final Map<MaterialType, BorderRadius> kMaterialEdges = <MaterialType, BorderRadius> {
56+
final Map<MaterialType, BorderRadius> kMaterialEdges = <MaterialType, BorderRadius>{
5757
MaterialType.canvas: null,
5858
MaterialType.card: BorderRadius.circular(2.0),
5959
MaterialType.circle: null,

packages/flutter/lib/src/painting/image_provider.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ class NetworkImage extends ImageProvider<NetworkImage> {
466466
/// Creates an object that fetches the image at the given URL.
467467
///
468468
/// The arguments must not be null.
469-
const NetworkImage(this.url, { this.scale = 1.0 , this.headers })
469+
const NetworkImage(this.url, { this.scale = 1.0, this.headers })
470470
: assert(url != null),
471471
assert(scale != null);
472472

@@ -736,7 +736,8 @@ class ExactAssetImage extends AssetBundleImageProvider {
736736
/// The [package] argument must be non-null when fetching an asset that is
737737
/// included in a package. See the documentation for the [ExactAssetImage] class
738738
/// itself for details.
739-
const ExactAssetImage(this.assetName, {
739+
const ExactAssetImage(
740+
this.assetName, {
740741
this.scale = 1.0,
741742
this.bundle,
742743
this.package,

packages/flutter/lib/src/painting/image_resolution.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ class AssetImage extends AssetBundleImageProvider {
128128
/// from the set of images to choose from. The [package] argument must be
129129
/// non-null when fetching an asset that is included in package. See the
130130
/// documentation for the [AssetImage] class itself for details.
131-
const AssetImage(this.assetName, {
131+
const AssetImage(
132+
this.assetName, {
132133
this.bundle,
133134
this.package,
134135
}) : assert(assetName != null);

packages/flutter/lib/src/painting/matrix_utils.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ class TransformProperty extends DiagnosticsProperty<Matrix4> {
265265
/// Create a diagnostics property for [Matrix4] objects.
266266
///
267267
/// The [showName] and [level] arguments must not be null.
268-
TransformProperty(String name, Matrix4 value, {
268+
TransformProperty(
269+
String name,
270+
Matrix4 value, {
269271
bool showName = true,
270272
Object defaultValue = kNoDefaultValue,
271273
DiagnosticLevel level = DiagnosticLevel.info,

packages/flutter/lib/src/painting/strut_style.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@ class StrutStyle extends Diagnosticable {
302302
/// is inherited by being prepended onto the font family names. If
303303
/// [fontFamilyFallback] is meant to be empty, pass an empty list instead of null.
304304
/// This prevents the previous package name from being prepended twice.
305-
StrutStyle.fromTextStyle(TextStyle textStyle, {
305+
StrutStyle.fromTextStyle(
306+
TextStyle textStyle, {
306307
String fontFamily,
307308
List<String> fontFamilyFallback,
308309
double fontSize,

packages/flutter/lib/src/physics/clamped_simulation.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ class ClampedSimulation extends Simulation {
2121
///
2222
/// The named arguments specify the ranges for the clamping behavior, as
2323
/// applied to [x] and [dx].
24-
ClampedSimulation(this.simulation, {
24+
ClampedSimulation(
25+
this.simulation, {
2526
this.xMin = double.negativeInfinity,
2627
this.xMax = double.infinity,
2728
this.dxMin = double.negativeInfinity,

packages/flutter/lib/src/physics/friction_simulation.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ class FrictionSimulation extends Simulation {
1818
/// drag coefficient, a unitless value; the initial position, in the same
1919
/// length units as used for [x]; and the initial velocity, in the same
2020
/// velocity units as used for [dx].
21-
FrictionSimulation(double drag, double position, double velocity, {
21+
FrictionSimulation(
22+
double drag,
23+
double position,
24+
double velocity, {
2225
Tolerance tolerance = Tolerance.defaultTolerance,
2326
}) : _drag = drag,
2427
_dragLog = math.log(drag),

packages/flutter/lib/src/rendering/editable.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,14 +300,14 @@ class RenderEditable extends RenderBox {
300300

301301
final Offset startOffset = _textPainter.getOffsetForCaret(
302302
TextPosition(offset: _selection.start, affinity: _selection.affinity),
303-
Rect.zero
303+
Rect.zero,
304304
);
305305

306306
_selectionStartInViewport.value = visibleRegion.contains(startOffset + effectiveOffset);
307307

308308
final Offset endOffset = _textPainter.getOffsetForCaret(
309309
TextPosition(offset: _selection.end, affinity: _selection.affinity),
310-
Rect.zero
310+
Rect.zero,
311311
);
312312

313313
_selectionEndInViewport.value = visibleRegion.contains(endOffset + effectiveOffset);

packages/flutter/lib/src/rendering/paragraph.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ class RenderParagraph extends RenderBox {
4141
///
4242
/// The [maxLines] property may be null (and indeed defaults to null), but if
4343
/// it is not null, it must be greater than zero.
44-
RenderParagraph(TextSpan text, {
44+
RenderParagraph(
45+
TextSpan text, {
4546
TextAlign textAlign = TextAlign.start,
4647
@required TextDirection textDirection,
4748
bool softWrap = true,

packages/flutter/lib/src/rendering/platform_view.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ class _AndroidViewGestureRecognizer extends OneSequenceGestureRecognizer {
503503
// Before the arena for a pointer is resolved all events are cached here, if we win the arena
504504
// the cached events are dispatched to the view, if we lose the arena we clear the cache for
505505
// the pointer.
506-
final Map<int, List<PointerEvent>> cachedEvents = <int, List<PointerEvent>> {};
506+
final Map<int, List<PointerEvent>> cachedEvents = <int, List<PointerEvent>>{};
507507

508508
// Pointer for which we have already won the arena, events for pointers in this set are
509509
// immediately dispatched to the Android view.

packages/flutter/lib/src/rendering/shifted_box.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ abstract class RenderAligningShiftedBox extends RenderShiftedBox {
244244
/// A constructor to be used only when the extending class also has a mixin.
245245
// TODO(gspencer): Remove this constructor once https://github.com/dart-lang/sdk/issues/31543 is fixed.
246246
@protected
247-
RenderAligningShiftedBox.mixin(AlignmentGeometry alignment,TextDirection textDirection, RenderBox child)
247+
RenderAligningShiftedBox.mixin(AlignmentGeometry alignment, TextDirection textDirection, RenderBox child)
248248
: this(alignment: alignment, textDirection: textDirection, child: child);
249249

250250
Alignment _resolvedAlignment;

0 commit comments

Comments
 (0)