From 28defe5053aefebba42de21cbc8af6d48b72df70 Mon Sep 17 00:00:00 2001 From: Alexandre Ardhuin Date: Wed, 8 Feb 2017 19:33:31 +0100 Subject: [PATCH] use const constructor (#7968) --- packages/flutter/lib/src/cupertino/dialog.dart | 4 ++-- packages/flutter/lib/src/cupertino/switch.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/flutter/lib/src/cupertino/dialog.dart b/packages/flutter/lib/src/cupertino/dialog.dart index 6e1d3bd5fbe..39cb213ae16 100644 --- a/packages/flutter/lib/src/cupertino/dialog.dart +++ b/packages/flutter/lib/src/cupertino/dialog.dart @@ -123,7 +123,7 @@ class CupertinoAlertDialog extends StatelessWidget { Widget build(BuildContext context) { final List children = []; - children.add(new SizedBox(height: 20.0)); + children.add(const SizedBox(height: 20.0)); if (title != null) { children.add(new Padding( @@ -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) { children.add(new _CupertinoButtonBar( diff --git a/packages/flutter/lib/src/cupertino/switch.dart b/packages/flutter/lib/src/cupertino/switch.dart index e4f91ae5345..2e6addf5339 100644 --- a/packages/flutter/lib/src/cupertino/switch.dart +++ b/packages/flutter/lib/src/cupertino/switch.dart @@ -143,7 +143,7 @@ class _RenderCupertinoSwitch extends RenderConstrainedBox implements SemanticsAc _activeColor = activeColor, _onChanged = onChanged, _vsync = vsync, - super(additionalConstraints: new BoxConstraints.tightFor(width: _kSwitchWidth, height: _kSwitchHeight)) { + super(additionalConstraints: const BoxConstraints.tightFor(width: _kSwitchWidth, height: _kSwitchHeight)) { assert(value != null); assert(activeColor != null); assert(vsync != null);