Commit e9aabcd5 authored by Adam Barth's avatar Adam Barth

Use `}) : super` consistently

Fixes #1372
parent 72716984
...@@ -11,7 +11,7 @@ class Field extends StatelessComponent { ...@@ -11,7 +11,7 @@ class Field extends StatelessComponent {
this.inputKey, this.inputKey,
this.icon, this.icon,
this.placeholder this.placeholder
}): super(key: key); }) : super(key: key);
final GlobalKey inputKey; final GlobalKey inputKey;
final String icon; final String icon;
......
...@@ -50,7 +50,7 @@ class ExampleDragTargetState extends State<ExampleDragTarget> { ...@@ -50,7 +50,7 @@ class ExampleDragTargetState extends State<ExampleDragTarget> {
} }
class Dot extends StatelessComponent { class Dot extends StatelessComponent {
Dot({ Key key, this.color, this.size }): super(key: key); Dot({ Key key, this.color, this.size }) : super(key: key);
final Color color; final Color color;
final double size; final double size;
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -66,7 +66,7 @@ class Dot extends StatelessComponent { ...@@ -66,7 +66,7 @@ class Dot extends StatelessComponent {
} }
class ExampleDragSource extends StatelessComponent { class ExampleDragSource extends StatelessComponent {
ExampleDragSource({ Key key, this.navigator, this.name, this.color }): super(key: key); ExampleDragSource({ Key key, this.navigator, this.name, this.color }) : super(key: key);
final NavigatorState navigator; final NavigatorState navigator;
final String name; final String name;
final Color color; final Color color;
......
...@@ -32,7 +32,7 @@ class App extends StatefulComponent { ...@@ -32,7 +32,7 @@ class App extends StatefulComponent {
this.theme, this.theme,
this.routes, this.routes,
this.onGenerateRoute this.onGenerateRoute
}): super(key: key) { }) : super(key: key) {
assert(() { assert(() {
'The "routes" argument to App() is required.'; 'The "routes" argument to App() is required.';
'This might be a sign that you have not upgraded to our new Widgets framework.'; 'This might be a sign that you have not upgraded to our new Widgets framework.';
......
...@@ -910,7 +910,7 @@ class Listener extends OneChildRenderObjectWidget { ...@@ -910,7 +910,7 @@ class Listener extends OneChildRenderObjectWidget {
this.onPointerMove, this.onPointerMove,
this.onPointerUp, this.onPointerUp,
this.onPointerCancel this.onPointerCancel
}): super(key: key, child: child); }) : super(key: key, child: child);
final PointerEventListener onPointerDown; final PointerEventListener onPointerDown;
final PointerEventListener onPointerMove; final PointerEventListener onPointerMove;
......
...@@ -61,7 +61,7 @@ class _CheckboxWrapper extends LeafRenderObjectWidget { ...@@ -61,7 +61,7 @@ class _CheckboxWrapper extends LeafRenderObjectWidget {
this.onChanged, this.onChanged,
this.uncheckedColor, this.uncheckedColor,
this.accentColor this.accentColor
}): super(key: key) { }) : super(key: key) {
assert(uncheckedColor != null); assert(uncheckedColor != null);
assert(accentColor != null); assert(accentColor != null);
} }
......
...@@ -30,7 +30,7 @@ class Dialog extends StatelessComponent { ...@@ -30,7 +30,7 @@ class Dialog extends StatelessComponent {
this.contentPadding, this.contentPadding,
this.actions, this.actions,
this.onDismiss this.onDismiss
}): super(key: key); }) : super(key: key);
/// The (optional) title of the dialog is displayed in a large font at the top /// The (optional) title of the dialog is displayed in a large font at the top
/// of the dialog. /// of the dialog.
......
...@@ -45,7 +45,7 @@ class Draggable extends StatefulComponent { ...@@ -45,7 +45,7 @@ class Draggable extends StatefulComponent {
this.feedback, this.feedback,
this.feedbackOffset: Offset.zero, this.feedbackOffset: Offset.zero,
this.dragAnchor: DragAnchor.child this.dragAnchor: DragAnchor.child
}): super(key: key) { }) : super(key: key) {
assert(navigator != null); assert(navigator != null);
assert(child != null); assert(child != null);
assert(feedback != null); assert(feedback != null);
......
...@@ -28,7 +28,7 @@ class Input extends Scrollable { ...@@ -28,7 +28,7 @@ class Input extends Scrollable {
this.placeholder, this.placeholder,
this.onChanged, this.onChanged,
this.keyboardType: KeyboardType.TEXT this.keyboardType: KeyboardType.TEXT
}): super( }) : super(
key: key, key: key,
initialScrollOffset: 0.0, initialScrollOffset: 0.0,
scrollDirection: ScrollDirection.horizontal scrollDirection: ScrollDirection.horizontal
......
...@@ -22,7 +22,7 @@ class MixedViewport extends RenderObjectWidget { ...@@ -22,7 +22,7 @@ class MixedViewport extends RenderObjectWidget {
this.token, this.token,
this.onExtentsUpdate, this.onExtentsUpdate,
this.onInvalidatorAvailable this.onInvalidatorAvailable
}): super(key: key); }) : super(key: key);
final double startOffset; final double startOffset;
final ScrollDirection direction; final ScrollDirection direction;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment