use const constructor (#7968)

This commit is contained in:
Alexandre Ardhuin 2017-02-08 19:33:31 +01:00 committed by Adam Barth
parent be99a04dac
commit 28defe5053
2 changed files with 3 additions and 3 deletions

View File

@ -123,7 +123,7 @@ class CupertinoAlertDialog extends StatelessWidget {
Widget build(BuildContext context) {
final List<Widget> children = <Widget>[];
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(

View File

@ -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);