From e9aabcd5c69a4aa1eb2dc3a523bea4a2f666be1e Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Fri, 2 Oct 2015 23:10:15 -0700 Subject: [PATCH] Use `}) : super` consistently Fixes #1372 --- examples/address_book/lib/main.dart | 2 +- examples/widgets/drag_and_drop.dart | 4 ++-- packages/flutter/lib/src/widgets/app.dart | 2 +- packages/flutter/lib/src/widgets/basic.dart | 2 +- packages/flutter/lib/src/widgets/checkbox.dart | 2 +- packages/flutter/lib/src/widgets/dialog.dart | 2 +- packages/flutter/lib/src/widgets/drag_target.dart | 2 +- packages/flutter/lib/src/widgets/input.dart | 2 +- packages/flutter/lib/src/widgets/mixed_viewport.dart | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/address_book/lib/main.dart b/examples/address_book/lib/main.dart index 636df805133..c12a7d2114b 100644 --- a/examples/address_book/lib/main.dart +++ b/examples/address_book/lib/main.dart @@ -11,7 +11,7 @@ class Field extends StatelessComponent { this.inputKey, this.icon, this.placeholder - }): super(key: key); + }) : super(key: key); final GlobalKey inputKey; final String icon; diff --git a/examples/widgets/drag_and_drop.dart b/examples/widgets/drag_and_drop.dart index 70b68ef38d8..c7a618763dc 100644 --- a/examples/widgets/drag_and_drop.dart +++ b/examples/widgets/drag_and_drop.dart @@ -50,7 +50,7 @@ class ExampleDragTargetState extends State { } 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 double size; Widget build(BuildContext context) { @@ -66,7 +66,7 @@ class Dot 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 String name; final Color color; diff --git a/packages/flutter/lib/src/widgets/app.dart b/packages/flutter/lib/src/widgets/app.dart index 64eb172acf5..ea317a4f0b3 100644 --- a/packages/flutter/lib/src/widgets/app.dart +++ b/packages/flutter/lib/src/widgets/app.dart @@ -32,7 +32,7 @@ class App extends StatefulComponent { this.theme, this.routes, this.onGenerateRoute - }): super(key: key) { + }) : super(key: key) { assert(() { 'The "routes" argument to App() is required.'; 'This might be a sign that you have not upgraded to our new Widgets framework.'; diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart index 6a6127f7f61..d5dbb440040 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart @@ -910,7 +910,7 @@ class Listener extends OneChildRenderObjectWidget { this.onPointerMove, this.onPointerUp, this.onPointerCancel - }): super(key: key, child: child); + }) : super(key: key, child: child); final PointerEventListener onPointerDown; final PointerEventListener onPointerMove; diff --git a/packages/flutter/lib/src/widgets/checkbox.dart b/packages/flutter/lib/src/widgets/checkbox.dart index 2f69665986b..89cdaee2939 100644 --- a/packages/flutter/lib/src/widgets/checkbox.dart +++ b/packages/flutter/lib/src/widgets/checkbox.dart @@ -61,7 +61,7 @@ class _CheckboxWrapper extends LeafRenderObjectWidget { this.onChanged, this.uncheckedColor, this.accentColor - }): super(key: key) { + }) : super(key: key) { assert(uncheckedColor != null); assert(accentColor != null); } diff --git a/packages/flutter/lib/src/widgets/dialog.dart b/packages/flutter/lib/src/widgets/dialog.dart index 9098bebc1d4..9b6ca201bf6 100644 --- a/packages/flutter/lib/src/widgets/dialog.dart +++ b/packages/flutter/lib/src/widgets/dialog.dart @@ -30,7 +30,7 @@ class Dialog extends StatelessComponent { this.contentPadding, this.actions, this.onDismiss - }): super(key: key); + }) : super(key: key); /// The (optional) title of the dialog is displayed in a large font at the top /// of the dialog. diff --git a/packages/flutter/lib/src/widgets/drag_target.dart b/packages/flutter/lib/src/widgets/drag_target.dart index 19f372cf6dd..accac1bb139 100644 --- a/packages/flutter/lib/src/widgets/drag_target.dart +++ b/packages/flutter/lib/src/widgets/drag_target.dart @@ -45,7 +45,7 @@ class Draggable extends StatefulComponent { this.feedback, this.feedbackOffset: Offset.zero, this.dragAnchor: DragAnchor.child - }): super(key: key) { + }) : super(key: key) { assert(navigator != null); assert(child != null); assert(feedback != null); diff --git a/packages/flutter/lib/src/widgets/input.dart b/packages/flutter/lib/src/widgets/input.dart index b9bcfbaf92b..d892944b1db 100644 --- a/packages/flutter/lib/src/widgets/input.dart +++ b/packages/flutter/lib/src/widgets/input.dart @@ -28,7 +28,7 @@ class Input extends Scrollable { this.placeholder, this.onChanged, this.keyboardType: KeyboardType.TEXT - }): super( + }) : super( key: key, initialScrollOffset: 0.0, scrollDirection: ScrollDirection.horizontal diff --git a/packages/flutter/lib/src/widgets/mixed_viewport.dart b/packages/flutter/lib/src/widgets/mixed_viewport.dart index 505aa7a9889..5336e80c71c 100644 --- a/packages/flutter/lib/src/widgets/mixed_viewport.dart +++ b/packages/flutter/lib/src/widgets/mixed_viewport.dart @@ -22,7 +22,7 @@ class MixedViewport extends RenderObjectWidget { this.token, this.onExtentsUpdate, this.onInvalidatorAvailable - }): super(key: key); + }) : super(key: key); final double startOffset; final ScrollDirection direction;