Commit 28defe50 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by Adam Barth

use const constructor (#7968)

parent be99a04d
...@@ -123,7 +123,7 @@ class CupertinoAlertDialog extends StatelessWidget { ...@@ -123,7 +123,7 @@ class CupertinoAlertDialog extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final List<Widget> children = <Widget>[]; final List<Widget> children = <Widget>[];
children.add(new SizedBox(height: 20.0)); children.add(const SizedBox(height: 20.0));
if (title != null) { if (title != null) {
children.add(new Padding( children.add(new Padding(
...@@ -150,7 +150,7 @@ class CupertinoAlertDialog extends StatelessWidget { ...@@ -150,7 +150,7 @@ class CupertinoAlertDialog extends StatelessWidget {
)); ));
} }
children.add(new SizedBox(height: 20.0)); children.add(const SizedBox(height: 20.0));
if (actions != null) { if (actions != null) {
children.add(new _CupertinoButtonBar( children.add(new _CupertinoButtonBar(
......
...@@ -143,7 +143,7 @@ class _RenderCupertinoSwitch extends RenderConstrainedBox implements SemanticsAc ...@@ -143,7 +143,7 @@ class _RenderCupertinoSwitch extends RenderConstrainedBox implements SemanticsAc
_activeColor = activeColor, _activeColor = activeColor,
_onChanged = onChanged, _onChanged = onChanged,
_vsync = vsync, _vsync = vsync,
super(additionalConstraints: new BoxConstraints.tightFor(width: _kSwitchWidth, height: _kSwitchHeight)) { super(additionalConstraints: const BoxConstraints.tightFor(width: _kSwitchWidth, height: _kSwitchHeight)) {
assert(value != null); assert(value != null);
assert(activeColor != null); assert(activeColor != null);
assert(vsync != null); assert(vsync != null);
......
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