Commit 95418482 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

make @immutable const classes (#9532)

* make @immutable const

* fix build
parent 1abb6f5d
...@@ -24,7 +24,7 @@ class ComplexLayoutAppState extends State<ComplexLayoutApp> { ...@@ -24,7 +24,7 @@ class ComplexLayoutAppState extends State<ComplexLayoutApp> {
return new MaterialApp( return new MaterialApp(
theme: lightTheme ? new ThemeData.light() : new ThemeData.dark(), theme: lightTheme ? new ThemeData.light() : new ThemeData.dark(),
title: 'Advanced Layout', title: 'Advanced Layout',
home: new ComplexLayout() home: const ComplexLayout()
); );
} }
...@@ -44,7 +44,7 @@ class ComplexLayoutAppState extends State<ComplexLayoutApp> { ...@@ -44,7 +44,7 @@ class ComplexLayoutAppState extends State<ComplexLayoutApp> {
} }
class ComplexLayout extends StatefulWidget { class ComplexLayout extends StatefulWidget {
ComplexLayout({ Key key }) : super(key: key); const ComplexLayout({ Key key }) : super(key: key);
@override @override
ComplexLayoutState createState() => new ComplexLayoutState(); ComplexLayoutState createState() => new ComplexLayoutState();
...@@ -85,7 +85,7 @@ class ComplexLayoutState extends State<ComplexLayout> { ...@@ -85,7 +85,7 @@ class ComplexLayoutState extends State<ComplexLayout> {
new BottomBar(), new BottomBar(),
], ],
), ),
drawer: new GalleryDrawer(), drawer: const GalleryDrawer(),
); );
} }
} }
...@@ -100,9 +100,9 @@ class TopBarMenu extends StatelessWidget { ...@@ -100,9 +100,9 @@ class TopBarMenu extends StatelessWidget {
value: 'Friends', value: 'Friends',
child: new MenuItemWithIcon(Icons.people, 'Friends', '5 new') child: new MenuItemWithIcon(Icons.people, 'Friends', '5 new')
), ),
new PopupMenuItem<String>( const PopupMenuItem<String>(
value: 'Events', value: 'Events',
child: new MenuItemWithIcon(Icons.event, 'Events', '12 upcoming') child: const MenuItemWithIcon(Icons.event, 'Events', '12 upcoming')
), ),
new PopupMenuItem<String>( new PopupMenuItem<String>(
value: 'Events', value: 'Events',
...@@ -120,9 +120,9 @@ class TopBarMenu extends StatelessWidget { ...@@ -120,9 +120,9 @@ class TopBarMenu extends StatelessWidget {
value: 'Friends', value: 'Friends',
child: new MenuItemWithIcon(Icons.people, 'Friends', '5') child: new MenuItemWithIcon(Icons.people, 'Friends', '5')
), ),
new PopupMenuItem<String>( const PopupMenuItem<String>(
value: 'Events', value: 'Events',
child: new MenuItemWithIcon(Icons.event, 'Events', '12') child: const MenuItemWithIcon(Icons.event, 'Events', '12')
), ),
new PopupMenuItem<String>( new PopupMenuItem<String>(
value: 'Events', value: 'Events',
...@@ -142,7 +142,7 @@ class TopBarMenu extends StatelessWidget { ...@@ -142,7 +142,7 @@ class TopBarMenu extends StatelessWidget {
} }
class MenuItemWithIcon extends StatelessWidget { class MenuItemWithIcon extends StatelessWidget {
MenuItemWithIcon(this.icon, this.title, this.subtitle); const MenuItemWithIcon(this.icon, this.title, this.subtitle);
final IconData icon; final IconData icon;
final String title; final String title;
...@@ -164,7 +164,7 @@ class MenuItemWithIcon extends StatelessWidget { ...@@ -164,7 +164,7 @@ class MenuItemWithIcon extends StatelessWidget {
} }
class FancyImageItem extends StatelessWidget { class FancyImageItem extends StatelessWidget {
FancyImageItem(this.index, {Key key}) : super(key: key); const FancyImageItem(this.index, {Key key}) : super(key: key);
final int index; final int index;
...@@ -188,14 +188,14 @@ class FancyImageItem extends StatelessWidget { ...@@ -188,14 +188,14 @@ class FancyImageItem extends StatelessWidget {
} }
class FancyGalleryItem extends StatelessWidget { class FancyGalleryItem extends StatelessWidget {
FancyGalleryItem(this.index, {Key key}) : super(key: key); const FancyGalleryItem(this.index, {Key key}) : super(key: key);
final int index; final int index;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new ListBody( return new ListBody(
children: <Widget>[ children: <Widget>[
new UserHeader('Ali Connors'), const UserHeader('Ali Connors'),
new ItemGalleryBox(index), new ItemGalleryBox(index),
new InfoBar(), new InfoBar(),
new Padding( new Padding(
...@@ -217,7 +217,7 @@ class InfoBar extends StatelessWidget { ...@@ -217,7 +217,7 @@ class InfoBar extends StatelessWidget {
child: new Row( child: new Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
new MiniIconWithText(Icons.thumb_up, '42'), const MiniIconWithText(Icons.thumb_up, '42'),
new Text('3 Comments', style: Theme.of(context).textTheme.caption) new Text('3 Comments', style: Theme.of(context).textTheme.caption)
] ]
) )
...@@ -233,9 +233,9 @@ class IconBar extends StatelessWidget { ...@@ -233,9 +233,9 @@ class IconBar extends StatelessWidget {
child: new Row( child: new Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
new IconWithText(Icons.thumb_up, 'Like'), const IconWithText(Icons.thumb_up, 'Like'),
new IconWithText(Icons.comment, 'Comment'), new IconWithText(Icons.comment, 'Comment'),
new IconWithText(Icons.share, 'Share'), const IconWithText(Icons.share, 'Share'),
] ]
) )
); );
...@@ -243,7 +243,7 @@ class IconBar extends StatelessWidget { ...@@ -243,7 +243,7 @@ class IconBar extends StatelessWidget {
} }
class IconWithText extends StatelessWidget { class IconWithText extends StatelessWidget {
IconWithText(this.icon, this.title); const IconWithText(this.icon, this.title);
final IconData icon; final IconData icon;
final String title; final String title;
...@@ -264,7 +264,7 @@ class IconWithText extends StatelessWidget { ...@@ -264,7 +264,7 @@ class IconWithText extends StatelessWidget {
} }
class MiniIconWithText extends StatelessWidget { class MiniIconWithText extends StatelessWidget {
MiniIconWithText(this.icon, this.title); const MiniIconWithText(this.icon, this.title);
final IconData icon; final IconData icon;
final String title; final String title;
...@@ -305,7 +305,7 @@ class FatDivider extends StatelessWidget { ...@@ -305,7 +305,7 @@ class FatDivider extends StatelessWidget {
} }
class UserHeader extends StatelessWidget { class UserHeader extends StatelessWidget {
UserHeader(this.userName); const UserHeader(this.userName);
final String userName; final String userName;
...@@ -443,7 +443,7 @@ class ItemImageBox extends StatelessWidget { ...@@ -443,7 +443,7 @@ class ItemImageBox extends StatelessWidget {
} }
class ItemGalleryBox extends StatelessWidget { class ItemGalleryBox extends StatelessWidget {
ItemGalleryBox(this.index); const ItemGalleryBox(this.index);
final int index; final int index;
...@@ -506,7 +506,7 @@ class ItemGalleryBox extends StatelessWidget { ...@@ -506,7 +506,7 @@ class ItemGalleryBox extends StatelessWidget {
) )
), ),
new Container( new Container(
child: new TabPageSelector() child: const TabPageSelector()
) )
] ]
) )
...@@ -542,7 +542,7 @@ class BottomBar extends StatelessWidget { ...@@ -542,7 +542,7 @@ class BottomBar extends StatelessWidget {
} }
class BottomBarButton extends StatelessWidget { class BottomBarButton extends StatelessWidget {
BottomBarButton(this.icon, this.title); const BottomBarButton(this.icon, this.title);
final IconData icon; final IconData icon;
final String title; final String title;
...@@ -565,7 +565,7 @@ class BottomBarButton extends StatelessWidget { ...@@ -565,7 +565,7 @@ class BottomBarButton extends StatelessWidget {
} }
class GalleryDrawer extends StatelessWidget { class GalleryDrawer extends StatelessWidget {
GalleryDrawer({ Key key }) : super(key: key); const GalleryDrawer({ Key key }) : super(key: key);
void _changeTheme(BuildContext context, bool value) { void _changeTheme(BuildContext context, bool value) {
ComplexLayoutApp.of(context).lightTheme = value; ComplexLayoutApp.of(context).lightTheme = value;
......
...@@ -74,7 +74,7 @@ class DotState extends State<Dot> { ...@@ -74,7 +74,7 @@ class DotState extends State<Dot> {
} }
class ExampleDragSource extends StatelessWidget { class ExampleDragSource extends StatelessWidget {
ExampleDragSource({ const ExampleDragSource({
Key key, Key key,
this.color, this.color,
this.heavy: false, this.heavy: false,
...@@ -174,7 +174,7 @@ class DashOutlineCirclePainter extends CustomPainter { ...@@ -174,7 +174,7 @@ class DashOutlineCirclePainter extends CustomPainter {
} }
class MovableBall extends StatelessWidget { class MovableBall extends StatelessWidget {
MovableBall(this.position, this.ballPosition, this.callback); const MovableBall(this.position, this.ballPosition, this.callback);
final int position; final int position;
final int ballPosition; final int ballPosition;
......
...@@ -103,7 +103,7 @@ class _PointDemoPainter extends CustomPainter { ...@@ -103,7 +103,7 @@ class _PointDemoPainter extends CustomPainter {
} }
class _PointDemo extends StatefulWidget { class _PointDemo extends StatefulWidget {
_PointDemo({ Key key, this.controller }) : super(key: key); const _PointDemo({ Key key, this.controller }) : super(key: key);
final AnimationController controller; final AnimationController controller;
...@@ -268,7 +268,7 @@ class _RectangleDemoPainter extends CustomPainter { ...@@ -268,7 +268,7 @@ class _RectangleDemoPainter extends CustomPainter {
} }
class _RectangleDemo extends StatefulWidget { class _RectangleDemo extends StatefulWidget {
_RectangleDemo({ Key key, this.controller }) : super(key: key); const _RectangleDemo({ Key key, this.controller }) : super(key: key);
final AnimationController controller; final AnimationController controller;
...@@ -404,7 +404,7 @@ class _ArcDemo { ...@@ -404,7 +404,7 @@ class _ArcDemo {
} }
class AnimationDemo extends StatefulWidget { class AnimationDemo extends StatefulWidget {
AnimationDemo({ Key key }) : super(key: key); const AnimationDemo({ Key key }) : super(key: key);
@override @override
_AnimationDemoState createState() => new _AnimationDemoState(); _AnimationDemoState createState() => new _AnimationDemoState();
...@@ -469,6 +469,6 @@ class _AnimationDemoState extends State<AnimationDemo> with TickerProviderStateM ...@@ -469,6 +469,6 @@ class _AnimationDemoState extends State<AnimationDemo> with TickerProviderStateM
void main() { void main() {
runApp(new MaterialApp( runApp(new MaterialApp(
home: new AnimationDemo() home: const AnimationDemo()
)); ));
} }
...@@ -57,7 +57,7 @@ class _MarkerPainter extends CustomPainter { ...@@ -57,7 +57,7 @@ class _MarkerPainter extends CustomPainter {
} }
class Marker extends StatelessWidget { class Marker extends StatelessWidget {
Marker({ const Marker({
Key key, Key key,
this.type: MarkerType.touch, this.type: MarkerType.touch,
this.position, this.position,
......
...@@ -12,15 +12,15 @@ void main() { ...@@ -12,15 +12,15 @@ void main() {
appBar: new AppBar( appBar: new AppBar(
title: const Text('Hardware Key Demo'), title: const Text('Hardware Key Demo'),
), ),
body: new Center( body: const Center(
child: new RawKeyboardDemo(), child: const RawKeyboardDemo(),
), ),
), ),
)); ));
} }
class RawKeyboardDemo extends StatefulWidget { class RawKeyboardDemo extends StatefulWidget {
RawKeyboardDemo({ Key key }) : super(key: key); const RawKeyboardDemo({ Key key }) : super(key: key);
@override @override
_HardwareKeyDemoState createState() => new _HardwareKeyDemoState(); _HardwareKeyDemoState createState() => new _HardwareKeyDemoState();
......
...@@ -366,7 +366,7 @@ class _AllSectionsView extends AnimatedWidget { ...@@ -366,7 +366,7 @@ class _AllSectionsView extends AnimatedWidget {
} }
class AnimationDemoHome extends StatefulWidget { class AnimationDemoHome extends StatefulWidget {
AnimationDemoHome({ Key key }) : super(key: key); const AnimationDemoHome({ Key key }) : super(key: key);
static const String routeName = '/animation'; static const String routeName = '/animation';
......
...@@ -100,7 +100,7 @@ class SectionTitle extends StatelessWidget { ...@@ -100,7 +100,7 @@ class SectionTitle extends StatelessWidget {
// Small horizontal bar that indicates the selected section. // Small horizontal bar that indicates the selected section.
class SectionIndicator extends StatelessWidget { class SectionIndicator extends StatelessWidget {
SectionIndicator({ Key key, this.opacity: 1.0 }) : super(key: key); const SectionIndicator({ Key key, this.opacity: 1.0 }) : super(key: key);
final double opacity; final double opacity;
......
...@@ -7,10 +7,10 @@ import 'package:flutter/material.dart'; ...@@ -7,10 +7,10 @@ import 'package:flutter/material.dart';
import 'animation/home.dart'; import 'animation/home.dart';
class AnimationDemo extends StatelessWidget { class AnimationDemo extends StatelessWidget {
AnimationDemo({Key key}) : super(key: key); const AnimationDemo({Key key}) : super(key: key);
static const String routeName = '/animation'; static const String routeName = '/animation';
@override @override
Widget build(BuildContext context) => new AnimationDemoHome(); Widget build(BuildContext context) => const AnimationDemoHome();
} }
...@@ -7,7 +7,7 @@ import 'package:flutter/material.dart'; ...@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
import 'logic.dart'; import 'logic.dart';
class Calculator extends StatefulWidget { class Calculator extends StatefulWidget {
Calculator({Key key}) : super(key: key); const Calculator({Key key}) : super(key: key);
@override @override
_CalculatorState createState() => new _CalculatorState(); _CalculatorState createState() => new _CalculatorState();
...@@ -138,7 +138,7 @@ class _CalculatorState extends State<Calculator> { ...@@ -138,7 +138,7 @@ class _CalculatorState extends State<Calculator> {
} }
class CalcDisplay extends StatelessWidget { class CalcDisplay extends StatelessWidget {
CalcDisplay({ this.content }); const CalcDisplay({ this.content });
final String content; final String content;
...@@ -154,7 +154,7 @@ class CalcDisplay extends StatelessWidget { ...@@ -154,7 +154,7 @@ class CalcDisplay extends StatelessWidget {
} }
class KeyPad extends StatelessWidget { class KeyPad extends StatelessWidget {
KeyPad({ this.calcState }); const KeyPad({ this.calcState });
final _CalculatorState calcState; final _CalculatorState calcState;
...@@ -222,7 +222,7 @@ class KeyPad extends StatelessWidget { ...@@ -222,7 +222,7 @@ class KeyPad extends StatelessWidget {
} }
class KeyRow extends StatelessWidget { class KeyRow extends StatelessWidget {
KeyRow(this.keys); const KeyRow(this.keys);
final List<Widget> keys; final List<Widget> keys;
...@@ -238,7 +238,7 @@ class KeyRow extends StatelessWidget { ...@@ -238,7 +238,7 @@ class KeyRow extends StatelessWidget {
} }
class CalcKey extends StatelessWidget { class CalcKey extends StatelessWidget {
CalcKey(this.text, this.onTap); const CalcKey(this.text, this.onTap);
final String text; final String text;
final GestureTapCallback onTap; final GestureTapCallback onTap;
......
...@@ -7,10 +7,10 @@ import 'package:flutter/material.dart'; ...@@ -7,10 +7,10 @@ import 'package:flutter/material.dart';
import 'calculator/home.dart'; import 'calculator/home.dart';
class CalculatorDemo extends StatelessWidget { class CalculatorDemo extends StatelessWidget {
CalculatorDemo({Key key}) : super(key: key); const CalculatorDemo({Key key}) : super(key: key);
static const String routeName = '/calculator'; static const String routeName = '/calculator';
@override @override
Widget build(BuildContext context) => new Calculator(); Widget build(BuildContext context) => const Calculator();
} }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class _ContactCategory extends StatelessWidget { class _ContactCategory extends StatelessWidget {
_ContactCategory({ Key key, this.icon, this.children }) : super(key: key); const _ContactCategory({ Key key, this.icon, this.children }) : super(key: key);
final IconData icon; final IconData icon;
final List<Widget> children; final List<Widget> children;
......
...@@ -100,7 +100,7 @@ class _ButtonsDemoState extends State<ButtonsDemo> { ...@@ -100,7 +100,7 @@ class _ButtonsDemoState extends State<ButtonsDemo> {
// Perform some action // Perform some action
}, },
), ),
new RaisedButton( const RaisedButton(
child: const Text('DISABLED'), child: const Text('DISABLED'),
onPressed: null, onPressed: null,
) )
......
...@@ -26,8 +26,8 @@ class _ChipDemoState extends State<ChipDemo> { ...@@ -26,8 +26,8 @@ class _ChipDemoState extends State<ChipDemo> {
const Chip( const Chip(
label: const Text('Apple') label: const Text('Apple')
), ),
new Chip( const Chip(
avatar: new CircleAvatar(child: const Text('B')), avatar: const CircleAvatar(child: const Text('B')),
label: const Text('Blueberry') label: const Text('Blueberry')
), ),
]; ];
......
...@@ -8,7 +8,7 @@ import 'package:flutter/material.dart'; ...@@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
class _InputDropdown extends StatelessWidget { class _InputDropdown extends StatelessWidget {
_InputDropdown({ const _InputDropdown({
Key key, Key key,
this.child, this.child,
this.labelText, this.labelText,
...@@ -47,7 +47,7 @@ class _InputDropdown extends StatelessWidget { ...@@ -47,7 +47,7 @@ class _InputDropdown extends StatelessWidget {
} }
class _DateTimePicker extends StatelessWidget { class _DateTimePicker extends StatelessWidget {
_DateTimePicker({ const _DateTimePicker({
Key key, Key key,
this.labelText, this.labelText,
this.selectedDate, this.selectedDate,
......
...@@ -20,7 +20,7 @@ const String _alertWithTitleText = ...@@ -20,7 +20,7 @@ const String _alertWithTitleText =
"data to Google, even when no apps are running."; "data to Google, even when no apps are running.";
class DialogDemoItem extends StatelessWidget { class DialogDemoItem extends StatelessWidget {
DialogDemoItem({ Key key, this.icon, this.color, this.text, this.onPressed }) : super(key: key); const DialogDemoItem({ Key key, this.icon, this.color, this.text, this.onPressed }) : super(key: key);
final IconData icon; final IconData icon;
final Color color; final Color color;
......
...@@ -14,7 +14,7 @@ typedef Widget DemoItemBodyBuilder<T>(DemoItem<T> item); ...@@ -14,7 +14,7 @@ typedef Widget DemoItemBodyBuilder<T>(DemoItem<T> item);
typedef String ValueToString<T>(T value); typedef String ValueToString<T>(T value);
class DualHeaderWithHint extends StatelessWidget { class DualHeaderWithHint extends StatelessWidget {
DualHeaderWithHint({ const DualHeaderWithHint({
this.name, this.name,
this.value, this.value,
this.hint, this.hint,
...@@ -76,7 +76,7 @@ class DualHeaderWithHint extends StatelessWidget { ...@@ -76,7 +76,7 @@ class DualHeaderWithHint extends StatelessWidget {
} }
class CollapsibleBody extends StatelessWidget { class CollapsibleBody extends StatelessWidget {
CollapsibleBody({ const CollapsibleBody({
this.margin: EdgeInsets.zero, this.margin: EdgeInsets.zero,
this.child, this.child,
this.onSave, this.onSave,
......
...@@ -29,7 +29,7 @@ class Photo { ...@@ -29,7 +29,7 @@ class Photo {
} }
class GridPhotoViewer extends StatefulWidget { class GridPhotoViewer extends StatefulWidget {
GridPhotoViewer({ Key key, this.photo }) : super(key: key); const GridPhotoViewer({ Key key, this.photo }) : super(key: key);
final Photo photo; final Photo photo;
...@@ -38,7 +38,7 @@ class GridPhotoViewer extends StatefulWidget { ...@@ -38,7 +38,7 @@ class GridPhotoViewer extends StatefulWidget {
} }
class _GridTitleText extends StatelessWidget { class _GridTitleText extends StatelessWidget {
_GridTitleText(this.text); const _GridTitleText(this.text);
final String text; final String text;
...@@ -227,7 +227,7 @@ class GridDemoPhotoItem extends StatelessWidget { ...@@ -227,7 +227,7 @@ class GridDemoPhotoItem extends StatelessWidget {
} }
class GridListDemo extends StatefulWidget { class GridListDemo extends StatefulWidget {
GridListDemo({ Key key }) : super(key: key); const GridListDemo({ Key key }) : super(key: key);
static const String routeName = '/material/grid-list'; static const String routeName = '/material/grid-list';
......
...@@ -29,7 +29,7 @@ class LeaveBehindItem implements Comparable<LeaveBehindItem> { ...@@ -29,7 +29,7 @@ class LeaveBehindItem implements Comparable<LeaveBehindItem> {
} }
class LeaveBehindDemo extends StatefulWidget { class LeaveBehindDemo extends StatefulWidget {
LeaveBehindDemo({ Key key }) : super(key: key); const LeaveBehindDemo({ Key key }) : super(key: key);
static const String routeName = '/material/leave-behind'; static const String routeName = '/material/leave-behind';
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class ListDemo extends StatefulWidget { class ListDemo extends StatefulWidget {
ListDemo({ Key key }) : super(key: key); const ListDemo({ Key key }) : super(key: key);
static const String routeName = '/material/list'; static const String routeName = '/material/list';
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class MenuDemo extends StatefulWidget { class MenuDemo extends StatefulWidget {
MenuDemo({ Key key }) : super(key: key); const MenuDemo({ Key key }) : super(key: key);
static const String routeName = '/material/menu'; static const String routeName = '/material/menu';
......
...@@ -9,7 +9,7 @@ import 'package:flutter/material.dart'; ...@@ -9,7 +9,7 @@ import 'package:flutter/material.dart';
enum IndicatorType { overscroll, refresh } enum IndicatorType { overscroll, refresh }
class OverscrollDemo extends StatefulWidget { class OverscrollDemo extends StatefulWidget {
OverscrollDemo({ Key key }) : super(key: key); const OverscrollDemo({ Key key }) : super(key: key);
static const String routeName = '/material/overscroll'; static const String routeName = '/material/overscroll';
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class _PageSelector extends StatelessWidget { class _PageSelector extends StatelessWidget {
_PageSelector({ this.icons }); const _PageSelector({ this.icons });
final List<IconData> icons; final List<IconData> icons;
......
...@@ -98,8 +98,8 @@ class _SelectionControlsDemoState extends State<SelectionControlsDemo> { ...@@ -98,8 +98,8 @@ class _SelectionControlsDemoState extends State<SelectionControlsDemo> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
// Disabled checkboxes // Disabled checkboxes
new Checkbox(value: true, onChanged: null), const Checkbox(value: true, onChanged: null),
new Checkbox(value: false, onChanged: null) const Checkbox(value: false, onChanged: null)
] ]
) )
] ]
...@@ -137,17 +137,17 @@ class _SelectionControlsDemoState extends State<SelectionControlsDemo> { ...@@ -137,17 +137,17 @@ class _SelectionControlsDemoState extends State<SelectionControlsDemo> {
new Row( new Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
new Radio<int>( const Radio<int>(
value: 0, value: 0,
groupValue: 0, groupValue: 0,
onChanged: null onChanged: null
), ),
new Radio<int>( const Radio<int>(
value: 1, value: 1,
groupValue: 0, groupValue: 0,
onChanged: null onChanged: null
), ),
new Radio<int>( const Radio<int>(
value: 2, value: 2,
groupValue: 0, groupValue: 0,
onChanged: null onChanged: null
......
...@@ -17,7 +17,7 @@ const String _text3 = ...@@ -17,7 +17,7 @@ const String _text3 =
"By default snackbars automatically disappear after a few seconds "; "By default snackbars automatically disappear after a few seconds ";
class SnackBarDemo extends StatefulWidget { class SnackBarDemo extends StatefulWidget {
SnackBarDemo({ Key key }) : super(key: key); const SnackBarDemo({ Key key }) : super(key: key);
static const String routeName = '/material/snack-bar'; static const String routeName = '/material/snack-bar';
......
...@@ -75,7 +75,7 @@ final Map<_Page, List<_CardData>> _allPages = <_Page, List<_CardData>>{ ...@@ -75,7 +75,7 @@ final Map<_Page, List<_CardData>> _allPages = <_Page, List<_CardData>>{
}; };
class _CardDataItem extends StatelessWidget { class _CardDataItem extends StatelessWidget {
_CardDataItem({ this.page, this.data }); const _CardDataItem({ this.page, this.data });
static final double height = 272.0; static final double height = 272.0;
final _Page page; final _Page page;
......
...@@ -7,7 +7,7 @@ import 'dart:async'; ...@@ -7,7 +7,7 @@ import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class TextFormFieldDemo extends StatefulWidget { class TextFormFieldDemo extends StatefulWidget {
TextFormFieldDemo({ Key key }) : super(key: key); const TextFormFieldDemo({ Key key }) : super(key: key);
static const String routeName = '/material/text-form-field'; static const String routeName = '/material/text-form-field';
......
...@@ -6,7 +6,7 @@ import 'package:flutter/material.dart'; ...@@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
class PestoDemo extends StatelessWidget { class PestoDemo extends StatelessWidget {
PestoDemo({ Key key }) : super(key: key); const PestoDemo({ Key key }) : super(key: key);
static const String routeName = '/pesto'; static const String routeName = '/pesto';
...@@ -31,7 +31,7 @@ final ThemeData _kTheme = new ThemeData( ...@@ -31,7 +31,7 @@ final ThemeData _kTheme = new ThemeData(
class PestoHome extends StatelessWidget { class PestoHome extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new RecipeGridPage(recipes: kPestoRecipes); return const RecipeGridPage(recipes: kPestoRecipes);
} }
} }
...@@ -63,7 +63,7 @@ class PestoStyle extends TextStyle { ...@@ -63,7 +63,7 @@ class PestoStyle extends TextStyle {
// Displays a grid of recipe cards. // Displays a grid of recipe cards.
class RecipeGridPage extends StatefulWidget { class RecipeGridPage extends StatefulWidget {
RecipeGridPage({ Key key, this.recipes }) : super(key: key); const RecipeGridPage({ Key key, this.recipes }) : super(key: key);
final List<Recipe> recipes; final List<Recipe> recipes;
...@@ -180,7 +180,7 @@ class _RecipeGridPageState extends State<RecipeGridPage> { ...@@ -180,7 +180,7 @@ class _RecipeGridPageState extends State<RecipeGridPage> {
} }
class PestoLogo extends StatefulWidget { class PestoLogo extends StatefulWidget {
PestoLogo({this.height, this.t}); const PestoLogo({this.height, this.t});
final double height; final double height;
final double t; final double t;
...@@ -239,7 +239,7 @@ class RecipeCard extends StatelessWidget { ...@@ -239,7 +239,7 @@ class RecipeCard extends StatelessWidget {
final TextStyle titleStyle = const PestoStyle(fontSize: 24.0, fontWeight: FontWeight.w600); final TextStyle titleStyle = const PestoStyle(fontSize: 24.0, fontWeight: FontWeight.w600);
final TextStyle authorStyle = const PestoStyle(fontWeight: FontWeight.w500, color: Colors.black54); final TextStyle authorStyle = const PestoStyle(fontWeight: FontWeight.w500, color: Colors.black54);
RecipeCard({ Key key, this.recipe, this.onTap }) : super(key: key); const RecipeCard({ Key key, this.recipe, this.onTap }) : super(key: key);
final Recipe recipe; final Recipe recipe;
final VoidCallback onTap; final VoidCallback onTap;
...@@ -289,7 +289,7 @@ class RecipeCard extends StatelessWidget { ...@@ -289,7 +289,7 @@ class RecipeCard extends StatelessWidget {
// Displays one recipe. Includes the recipe sheet with a background image. // Displays one recipe. Includes the recipe sheet with a background image.
class RecipePage extends StatefulWidget { class RecipePage extends StatefulWidget {
RecipePage({ Key key, this.recipe }) : super(key: key); const RecipePage({ Key key, this.recipe }) : super(key: key);
final Recipe recipe; final Recipe recipe;
......
...@@ -148,9 +148,9 @@ class _VendorItem extends StatelessWidget { ...@@ -148,9 +148,9 @@ class _VendorItem extends StatelessWidget {
// Displays the product's price. If the product is in the shopping cart then the // Displays the product's price. If the product is in the shopping cart then the
// background is highlighted. // background is highlighted.
abstract class _PriceItem extends StatelessWidget { abstract class _PriceItem extends StatelessWidget {
_PriceItem({ Key key, @required this.product }) : super(key: key) { const _PriceItem({ Key key, @required this.product })
assert(product != null); : assert(product != null),
} super(key: key);
final Product product; final Product product;
...@@ -168,7 +168,7 @@ abstract class _PriceItem extends StatelessWidget { ...@@ -168,7 +168,7 @@ abstract class _PriceItem extends StatelessWidget {
} }
class _ProductPriceItem extends _PriceItem { class _ProductPriceItem extends _PriceItem {
_ProductPriceItem({ Key key, Product product }) : super(key: key, product: product); const _ProductPriceItem({ Key key, Product product }) : super(key: key, product: product);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -181,7 +181,7 @@ class _ProductPriceItem extends _PriceItem { ...@@ -181,7 +181,7 @@ class _ProductPriceItem extends _PriceItem {
} }
class _FeaturePriceItem extends _PriceItem { class _FeaturePriceItem extends _PriceItem {
_FeaturePriceItem({ Key key, Product product }) : super(key: key, product: product); const _FeaturePriceItem({ Key key, Product product }) : super(key: key, product: product);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
......
...@@ -32,7 +32,7 @@ final ThemeData _kGalleryDarkTheme = new ThemeData( ...@@ -32,7 +32,7 @@ final ThemeData _kGalleryDarkTheme = new ThemeData(
); );
class GalleryApp extends StatefulWidget { class GalleryApp extends StatefulWidget {
GalleryApp({ const GalleryApp({
this.updateUrlFetcher, this.updateUrlFetcher,
this.enablePerformanceOverlay: true, this.enablePerformanceOverlay: true,
this.checkerboardRasterCacheImages: true, this.checkerboardRasterCacheImages: true,
......
...@@ -33,7 +33,7 @@ class ComponentDemoTabData { ...@@ -33,7 +33,7 @@ class ComponentDemoTabData {
} }
class TabbedComponentDemoScaffold extends StatelessWidget { class TabbedComponentDemoScaffold extends StatelessWidget {
TabbedComponentDemoScaffold({ const TabbedComponentDemoScaffold({
this.title, this.title,
this.demos this.demos
}); });
...@@ -96,7 +96,7 @@ class TabbedComponentDemoScaffold extends StatelessWidget { ...@@ -96,7 +96,7 @@ class TabbedComponentDemoScaffold extends StatelessWidget {
} }
class FullScreenCodeDialog extends StatefulWidget { class FullScreenCodeDialog extends StatefulWidget {
FullScreenCodeDialog({ this.exampleCodeTag }); const FullScreenCodeDialog({ this.exampleCodeTag });
final String exampleCodeTag; final String exampleCodeTag;
......
...@@ -25,7 +25,7 @@ new RaisedButton( ...@@ -25,7 +25,7 @@ new RaisedButton(
// Create a disabled button. // Create a disabled button.
// Buttons are disabled when onPressed isn't // Buttons are disabled when onPressed isn't
// specified or is null. // specified or is null.
new RaisedButton( const RaisedButton(
child: const Text('BUTTON TITLE'), child: const Text('BUTTON TITLE'),
onPressed: null onPressed: null
); );
...@@ -130,7 +130,7 @@ new Checkbox( ...@@ -130,7 +130,7 @@ new Checkbox(
// Create a disabled checkbox. // Create a disabled checkbox.
// Checkboxes are disabled when onChanged isn't // Checkboxes are disabled when onChanged isn't
// specified or null. // specified or null.
new Checkbox(value: false, onChanged: null); const Checkbox(value: false, onChanged: null);
// END // END
...@@ -167,7 +167,7 @@ new Row( ...@@ -167,7 +167,7 @@ new Row(
); );
// Creates a disabled radio button. // Creates a disabled radio button.
new Radio<int>( const Radio<int>(
value: 0, value: 0,
groupValue: 0, groupValue: 0,
onChanged: null onChanged: null
......
...@@ -36,7 +36,7 @@ final List<_BackgroundLayer> _kBackgroundLayers = <_BackgroundLayer>[ ...@@ -36,7 +36,7 @@ final List<_BackgroundLayer> _kBackgroundLayers = <_BackgroundLayer>[
]; ];
class _AppBarBackground extends StatelessWidget { class _AppBarBackground extends StatelessWidget {
_AppBarBackground({ Key key, this.animation }) : super(key: key); const _AppBarBackground({ Key key, this.animation }) : super(key: key);
final Animation<double> animation; final Animation<double> animation;
......
...@@ -73,7 +73,7 @@ List<GalleryItem> _buildGalleryItems() { ...@@ -73,7 +73,7 @@ List<GalleryItem> _buildGalleryItems() {
subtitle: 'Section organizer', subtitle: 'Section organizer',
category: 'Demos', category: 'Demos',
routeName: AnimationDemo.routeName, routeName: AnimationDemo.routeName,
buildRoute: (BuildContext context) => new AnimationDemo(), buildRoute: (BuildContext context) => const AnimationDemo(),
), ),
// Material Components // Material Components
new GalleryItem( new GalleryItem(
...@@ -151,7 +151,7 @@ List<GalleryItem> _buildGalleryItems() { ...@@ -151,7 +151,7 @@ List<GalleryItem> _buildGalleryItems() {
subtitle: 'Row and column layout', subtitle: 'Row and column layout',
category: 'Material Components', category: 'Material Components',
routeName: GridListDemo.routeName, routeName: GridListDemo.routeName,
buildRoute: (BuildContext context) => new GridListDemo(), buildRoute: (BuildContext context) => const GridListDemo(),
), ),
new GalleryItem( new GalleryItem(
title: 'Icons', title: 'Icons',
...@@ -165,21 +165,21 @@ List<GalleryItem> _buildGalleryItems() { ...@@ -165,21 +165,21 @@ List<GalleryItem> _buildGalleryItems() {
subtitle: 'List items with hidden actions', subtitle: 'List items with hidden actions',
category: 'Material Components', category: 'Material Components',
routeName: LeaveBehindDemo.routeName, routeName: LeaveBehindDemo.routeName,
buildRoute: (BuildContext context) => new LeaveBehindDemo(), buildRoute: (BuildContext context) => const LeaveBehindDemo(),
), ),
new GalleryItem( new GalleryItem(
title: 'List', title: 'List',
subtitle: 'Layout variations for scrollable lists', subtitle: 'Layout variations for scrollable lists',
category: 'Material Components', category: 'Material Components',
routeName: ListDemo.routeName, routeName: ListDemo.routeName,
buildRoute: (BuildContext context) => new ListDemo(), buildRoute: (BuildContext context) => const ListDemo(),
), ),
new GalleryItem( new GalleryItem(
title: 'Menus', title: 'Menus',
subtitle: 'Menu buttons and simple menus', subtitle: 'Menu buttons and simple menus',
category: 'Material Components', category: 'Material Components',
routeName: MenuDemo.routeName, routeName: MenuDemo.routeName,
buildRoute: (BuildContext context) => new MenuDemo(), buildRoute: (BuildContext context) => const MenuDemo(),
), ),
new GalleryItem( new GalleryItem(
title: 'Modal bottom sheet', title: 'Modal bottom sheet',
...@@ -214,7 +214,7 @@ List<GalleryItem> _buildGalleryItems() { ...@@ -214,7 +214,7 @@ List<GalleryItem> _buildGalleryItems() {
subtitle: 'Refresh indicators', subtitle: 'Refresh indicators',
category: 'Material Components', category: 'Material Components',
routeName: OverscrollDemo.routeName, routeName: OverscrollDemo.routeName,
buildRoute: (BuildContext context) => new OverscrollDemo(), buildRoute: (BuildContext context) => const OverscrollDemo(),
), ),
new GalleryItem( new GalleryItem(
title: 'Scrollable tabs', title: 'Scrollable tabs',
...@@ -242,7 +242,7 @@ List<GalleryItem> _buildGalleryItems() { ...@@ -242,7 +242,7 @@ List<GalleryItem> _buildGalleryItems() {
subtitle: 'Temporary message that appears at the bottom', subtitle: 'Temporary message that appears at the bottom',
category: 'Material Components', category: 'Material Components',
routeName: SnackBarDemo.routeName, routeName: SnackBarDemo.routeName,
buildRoute: (BuildContext context) => new SnackBarDemo(), buildRoute: (BuildContext context) => const SnackBarDemo(),
), ),
new GalleryItem( new GalleryItem(
title: 'Tabs', title: 'Tabs',
...@@ -256,7 +256,7 @@ List<GalleryItem> _buildGalleryItems() { ...@@ -256,7 +256,7 @@ List<GalleryItem> _buildGalleryItems() {
subtitle: 'Single line of editable text and numbers', subtitle: 'Single line of editable text and numbers',
category: 'Material Components', category: 'Material Components',
routeName: TextFormFieldDemo.routeName, routeName: TextFormFieldDemo.routeName,
buildRoute: (BuildContext context) => new TextFormFieldDemo(), buildRoute: (BuildContext context) => const TextFormFieldDemo(),
), ),
new GalleryItem( new GalleryItem(
title: 'Tooltips', title: 'Tooltips',
...@@ -327,7 +327,7 @@ List<GalleryItem> _buildGalleryItems() { ...@@ -327,7 +327,7 @@ List<GalleryItem> _buildGalleryItems() {
subtitle: 'Simple recipe browser', subtitle: 'Simple recipe browser',
category: 'Demos', category: 'Demos',
routeName: PestoDemo.routeName, routeName: PestoDemo.routeName,
buildRoute: (BuildContext context) => new PestoDemo(), buildRoute: (BuildContext context) => const PestoDemo(),
), ),
); );
return true; return true;
......
...@@ -10,5 +10,5 @@ import 'package:flutter/widgets.dart'; ...@@ -10,5 +10,5 @@ import 'package:flutter/widgets.dart';
import 'gallery/app.dart'; import 'gallery/app.dart';
void main() { void main() {
runApp(new GalleryApp()); runApp(const GalleryApp());
} }
...@@ -14,7 +14,7 @@ void main() { ...@@ -14,7 +14,7 @@ void main() {
// We press the "1" and the "2" buttons and check that the display // We press the "1" and the "2" buttons and check that the display
// reads "12". // reads "12".
testWidgets('Flutter calculator app smoke test', (WidgetTester tester) async { testWidgets('Flutter calculator app smoke test', (WidgetTester tester) async {
await tester.pumpWidget(new CalculatorDemo()); await tester.pumpWidget(const CalculatorDemo());
final Finder oneButton = find.widgetWithText(InkResponse, '1'); final Finder oneButton = find.widgetWithText(InkResponse, '1');
expect(oneButton, findsOneWidget); expect(oneButton, findsOneWidget);
......
...@@ -14,7 +14,7 @@ void main() { ...@@ -14,7 +14,7 @@ void main() {
testWidgets('Flutter gallery button example code displays', (WidgetTester tester) async { testWidgets('Flutter gallery button example code displays', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/6147 // Regression test for https://github.com/flutter/flutter/issues/6147
await tester.pumpWidget(new GalleryApp()); await tester.pumpWidget(const GalleryApp());
await tester.pump(); // see https://github.com/flutter/flutter/issues/1865 await tester.pump(); // see https://github.com/flutter/flutter/issues/1865
await tester.pump(); // triggers a frame await tester.pump(); // triggers a frame
......
...@@ -15,11 +15,11 @@ void main() { ...@@ -15,11 +15,11 @@ void main() {
testWidgets('Pesto appbar heroics', (WidgetTester tester) async { testWidgets('Pesto appbar heroics', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
// The bug only manifests itself when the screen's orientation is portrait // The bug only manifests itself when the screen's orientation is portrait
new Center( const Center(
child: new SizedBox( child: const SizedBox(
width: 400.0, width: 400.0,
height: 800.0, height: 800.0,
child: new GalleryApp() child: const GalleryApp()
) )
) )
); );
...@@ -43,7 +43,7 @@ void main() { ...@@ -43,7 +43,7 @@ void main() {
}); });
testWidgets('Pesto can be scrolled all the way down', (WidgetTester tester) async { testWidgets('Pesto can be scrolled all the way down', (WidgetTester tester) async {
await tester.pumpWidget(new GalleryApp()); await tester.pumpWidget(const GalleryApp());
await tester.pump(); // see https://github.com/flutter/flutter/issues/1865 await tester.pump(); // see https://github.com/flutter/flutter/issues/1865
await tester.tap(find.text('Pesto')); await tester.tap(find.text('Pesto'));
......
...@@ -17,7 +17,7 @@ void main() { ...@@ -17,7 +17,7 @@ void main() {
// Regression test for https://github.com/flutter/flutter/pull/5168 // Regression test for https://github.com/flutter/flutter/pull/5168
testWidgets('update dialog', (WidgetTester tester) async { testWidgets('update dialog', (WidgetTester tester) async {
await tester.pumpWidget(new GalleryApp(updateUrlFetcher: mockUpdateUrlFetcher)); await tester.pumpWidget(const GalleryApp(updateUrlFetcher: mockUpdateUrlFetcher));
await tester.pump(); // see https://github.com/flutter/flutter/issues/1865 await tester.pump(); // see https://github.com/flutter/flutter/issues/1865
await tester.pump(); // triggers a frame await tester.pump(); // triggers a frame
......
...@@ -39,12 +39,12 @@ class RenderDots extends RenderConstrainedBox { ...@@ -39,12 +39,12 @@ class RenderDots extends RenderConstrainedBox {
} }
class Dots extends SingleChildRenderObjectWidget { class Dots extends SingleChildRenderObjectWidget {
Dots({ Key key, Widget child }) : super(key: key, child: child); const Dots({ Key key, Widget child }) : super(key: key, child: child);
@override @override
RenderDots createRenderObject(BuildContext context) => new RenderDots(); RenderDots createRenderObject(BuildContext context) => new RenderDots();
} }
void main() { void main() {
runApp(new Dots(child: const Center(child: const Text('Touch me!')))); runApp(const Dots(child: const Center(child: const Text('Touch me!'))));
} }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class AdaptedListItem extends StatelessWidget { class AdaptedListItem extends StatelessWidget {
AdaptedListItem({ Key key, this.name }) : super(key: key); const AdaptedListItem({ Key key, this.name }) : super(key: key);
final String name; final String name;
...@@ -28,7 +28,7 @@ class AdaptedListItem extends StatelessWidget { ...@@ -28,7 +28,7 @@ class AdaptedListItem extends StatelessWidget {
} }
class AdaptedGridItem extends StatelessWidget { class AdaptedGridItem extends StatelessWidget {
AdaptedGridItem({ Key key, this.name }) : super(key: key); const AdaptedGridItem({ Key key, this.name }) : super(key: key);
final String name; final String name;
...@@ -69,7 +69,7 @@ const double _kMaxTileWidth = 150.0; ...@@ -69,7 +69,7 @@ const double _kMaxTileWidth = 150.0;
const double _kGridViewBreakpoint = 450.0; const double _kGridViewBreakpoint = 450.0;
class AdaptiveContainer extends StatelessWidget { class AdaptiveContainer extends StatelessWidget {
AdaptiveContainer({ Key key, this.names }) : super(key: key); const AdaptiveContainer({ Key key, this.names }) : super(key: key);
final List<String> names; final List<String> names;
......
...@@ -17,7 +17,7 @@ void addFlexChildSolidColor(RenderFlex parent, Color backgroundColor, { int flex ...@@ -17,7 +17,7 @@ void addFlexChildSolidColor(RenderFlex parent, Color backgroundColor, { int flex
// Solid colour, Widget version // Solid colour, Widget version
class Rectangle extends StatelessWidget { class Rectangle extends StatelessWidget {
Rectangle(this.color, { Key key }) : super(key: key); const Rectangle(this.color, { Key key }) : super(key: key);
final Color color; final Color color;
...@@ -41,7 +41,7 @@ void attachWidgetTreeToRenderTree(RenderProxyBox container) { ...@@ -41,7 +41,7 @@ void attachWidgetTreeToRenderTree(RenderProxyBox container) {
height: 300.0, height: 300.0,
child: new Column( child: new Column(
children: <Widget>[ children: <Widget>[
new Rectangle(const Color(0xFF00FFFF)), const Rectangle(const Color(0xFF00FFFF)),
new Material( new Material(
child: new Container( child: new Container(
padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
...@@ -66,7 +66,7 @@ void attachWidgetTreeToRenderTree(RenderProxyBox container) { ...@@ -66,7 +66,7 @@ void attachWidgetTreeToRenderTree(RenderProxyBox container) {
) )
) )
), ),
new Rectangle(const Color(0xFFFFFF00)), const Rectangle(const Color(0xFFFFFF00)),
], ],
mainAxisAlignment: MainAxisAlignment.spaceBetween mainAxisAlignment: MainAxisAlignment.spaceBetween
) )
......
...@@ -53,7 +53,7 @@ class StockArrowPainter extends CustomPainter { ...@@ -53,7 +53,7 @@ class StockArrowPainter extends CustomPainter {
} }
class StockArrow extends StatelessWidget { class StockArrow extends StatelessWidget {
StockArrow({ Key key, this.percentChange }) : super(key: key); const StockArrow({ Key key, this.percentChange }) : super(key: key);
final double percentChange; final double percentChange;
......
...@@ -345,7 +345,7 @@ class _CreateCompanySheet extends StatelessWidget { ...@@ -345,7 +345,7 @@ class _CreateCompanySheet extends StatelessWidget {
// TODO(ianh): Fill this out. // TODO(ianh): Fill this out.
return new Column( return new Column(
children: <Widget>[ children: <Widget>[
new TextField( const TextField(
autofocus: true, autofocus: true,
decoration: const InputDecoration( decoration: const InputDecoration(
hintText: 'Company Name', hintText: 'Company Name',
......
...@@ -8,7 +8,7 @@ import 'stock_data.dart'; ...@@ -8,7 +8,7 @@ import 'stock_data.dart';
import 'stock_row.dart'; import 'stock_row.dart';
class StockList extends StatelessWidget { class StockList extends StatelessWidget {
StockList({ Key key, this.stocks, this.onOpen, this.onShow, this.onAction }) : super(key: key); const StockList({ Key key, this.stocks, this.onOpen, this.onShow, this.onAction }) : super(key: key);
final List<Stock> stocks; final List<Stock> stocks;
final StockRowActionCallback onOpen; final StockRowActionCallback onOpen;
......
...@@ -8,7 +8,7 @@ import 'stock_arrow.dart'; ...@@ -8,7 +8,7 @@ import 'stock_arrow.dart';
import 'stock_data.dart'; import 'stock_data.dart';
class _StockSymbolView extends StatelessWidget { class _StockSymbolView extends StatelessWidget {
_StockSymbolView({ this.stock, this.arrow }); const _StockSymbolView({ this.stock, this.arrow });
final Stock stock; final Stock stock;
final Widget arrow; final Widget arrow;
...@@ -63,7 +63,7 @@ class _StockSymbolView extends StatelessWidget { ...@@ -63,7 +63,7 @@ class _StockSymbolView extends StatelessWidget {
} }
class StockSymbolPage extends StatelessWidget { class StockSymbolPage extends StatelessWidget {
StockSymbolPage({ this.stock }); const StockSymbolPage({ this.stock });
final Stock stock; final Stock stock;
...@@ -92,7 +92,7 @@ class StockSymbolPage extends StatelessWidget { ...@@ -92,7 +92,7 @@ class StockSymbolPage extends StatelessWidget {
} }
class StockSymbolBottomSheet extends StatelessWidget { class StockSymbolBottomSheet extends StatelessWidget {
StockSymbolBottomSheet({ this.stock }); const StockSymbolBottomSheet({ this.stock });
final Stock stock; final Stock stock;
......
...@@ -57,7 +57,7 @@ const BoxDecoration _kCupertinoDialogDecoration = const BoxDecoration( ...@@ -57,7 +57,7 @@ const BoxDecoration _kCupertinoDialogDecoration = const BoxDecoration(
/// * <https://developer.apple.com/ios/human-interface-guidelines/ui-views/alerts/> /// * <https://developer.apple.com/ios/human-interface-guidelines/ui-views/alerts/>
class CupertinoDialog extends StatelessWidget { class CupertinoDialog extends StatelessWidget {
/// Creates an iOS-style dialog. /// Creates an iOS-style dialog.
CupertinoDialog({ const CupertinoDialog({
Key key, Key key,
this.child, this.child,
}) : super(key: key); }) : super(key: key);
...@@ -94,7 +94,7 @@ class CupertinoDialog extends StatelessWidget { ...@@ -94,7 +94,7 @@ class CupertinoDialog extends StatelessWidget {
/// * <https://developer.apple.com/ios/human-interface-guidelines/ui-views/alerts/> /// * <https://developer.apple.com/ios/human-interface-guidelines/ui-views/alerts/>
class CupertinoAlertDialog extends StatelessWidget { class CupertinoAlertDialog extends StatelessWidget {
/// Creates an iOS-style alert dialog. /// Creates an iOS-style alert dialog.
CupertinoAlertDialog({ const CupertinoAlertDialog({
Key key, Key key,
this.title, this.title,
this.content, this.content,
...@@ -233,7 +233,7 @@ const double _kButtonBarHeight = 45.0; ...@@ -233,7 +233,7 @@ const double _kButtonBarHeight = 45.0;
const Color _kButtonDividerColor = const Color(0xFFD5D5D5); const Color _kButtonDividerColor = const Color(0xFFD5D5D5);
class _CupertinoButtonBar extends StatelessWidget { class _CupertinoButtonBar extends StatelessWidget {
_CupertinoButtonBar({ const _CupertinoButtonBar({
Key key, Key key,
this.children, this.children,
}) : super(key: key); }) : super(key: key);
......
...@@ -140,7 +140,7 @@ class _CupertinoSliderState extends State<CupertinoSlider> with TickerProviderSt ...@@ -140,7 +140,7 @@ class _CupertinoSliderState extends State<CupertinoSlider> with TickerProviderSt
} }
class _CupertinoSliderRenderObjectWidget extends LeafRenderObjectWidget { class _CupertinoSliderRenderObjectWidget extends LeafRenderObjectWidget {
_CupertinoSliderRenderObjectWidget({ const _CupertinoSliderRenderObjectWidget({
Key key, Key key,
this.value, this.value,
this.divisions, this.divisions,
......
...@@ -26,7 +26,7 @@ import 'thumb_painter.dart'; ...@@ -26,7 +26,7 @@ import 'thumb_painter.dart';
/// * <https://developer.apple.com/ios/human-interface-guidelines/ui-controls/switches/> /// * <https://developer.apple.com/ios/human-interface-guidelines/ui-controls/switches/>
class CupertinoSwitch extends StatefulWidget { class CupertinoSwitch extends StatefulWidget {
/// Creates an iOS-style switch. /// Creates an iOS-style switch.
CupertinoSwitch({ const CupertinoSwitch({
Key key, Key key,
@required this.value, @required this.value,
@required this.onChanged, @required this.onChanged,
...@@ -88,7 +88,7 @@ class _CupertinoSwitchState extends State<CupertinoSwitch> with TickerProviderSt ...@@ -88,7 +88,7 @@ class _CupertinoSwitchState extends State<CupertinoSwitch> with TickerProviderSt
} }
class _CupertinoSwitchRenderObjectWidget extends LeafRenderObjectWidget { class _CupertinoSwitchRenderObjectWidget extends LeafRenderObjectWidget {
_CupertinoSwitchRenderObjectWidget({ const _CupertinoSwitchRenderObjectWidget({
Key key, Key key,
this.value, this.value,
this.activeColor, this.activeColor,
......
...@@ -39,7 +39,7 @@ class AboutListTile extends StatelessWidget { ...@@ -39,7 +39,7 @@ class AboutListTile extends StatelessWidget {
/// The arguments are all optional. The application name, if omitted, will be /// The arguments are all optional. The application name, if omitted, will be
/// derived from the nearest [Title] widget. The version, icon, and legalese /// derived from the nearest [Title] widget. The version, icon, and legalese
/// values default to the empty string. /// values default to the empty string.
AboutListTile({ const AboutListTile({
Key key, Key key,
this.icon: const Icon(null), this.icon: const Icon(null),
this.child, this.child,
...@@ -210,7 +210,7 @@ class AboutDialog extends StatelessWidget { ...@@ -210,7 +210,7 @@ class AboutDialog extends StatelessWidget {
/// The arguments are all optional. The application name, if omitted, will be /// The arguments are all optional. The application name, if omitted, will be
/// derived from the nearest [Title] widget. The version, icon, and legalese /// derived from the nearest [Title] widget. The version, icon, and legalese
/// values default to the empty string. /// values default to the empty string.
AboutDialog({ const AboutDialog({
Key key, Key key,
this.applicationName, this.applicationName,
this.applicationVersion, this.applicationVersion,
......
...@@ -171,7 +171,7 @@ class _ModalBottomSheetLayout extends SingleChildLayoutDelegate { ...@@ -171,7 +171,7 @@ class _ModalBottomSheetLayout extends SingleChildLayoutDelegate {
} }
class _ModalBottomSheet<T> extends StatefulWidget { class _ModalBottomSheet<T> extends StatefulWidget {
_ModalBottomSheet({ Key key, this.route }) : super(key: key); const _ModalBottomSheet({ Key key, this.route }) : super(key: key);
final _ModalBottomSheetRoute<T> route; final _ModalBottomSheetRoute<T> route;
......
...@@ -126,7 +126,7 @@ class MaterialButton extends StatefulWidget { ...@@ -126,7 +126,7 @@ class MaterialButton extends StatefulWidget {
/// ///
/// Rather than creating a material button directly, consider using /// Rather than creating a material button directly, consider using
/// [FlatButton] or [RaisedButton]. /// [FlatButton] or [RaisedButton].
MaterialButton({ const MaterialButton({
Key key, Key key,
this.colorBrightness, this.colorBrightness,
this.textTheme, this.textTheme,
......
...@@ -27,7 +27,7 @@ class ButtonBar extends StatelessWidget { ...@@ -27,7 +27,7 @@ class ButtonBar extends StatelessWidget {
/// Creates a button bar. /// Creates a button bar.
/// ///
/// The alignment argument defaults to [MainAxisAlignment.end]. /// The alignment argument defaults to [MainAxisAlignment.end].
ButtonBar({ const ButtonBar({
Key key, Key key,
this.alignment: MainAxisAlignment.end, this.alignment: MainAxisAlignment.end,
this.mainAxisSize: MainAxisSize.max, this.mainAxisSize: MainAxisSize.max,
......
...@@ -41,7 +41,7 @@ class Checkbox extends StatefulWidget { ...@@ -41,7 +41,7 @@ class Checkbox extends StatefulWidget {
/// ///
/// * [value] determines whether the checkbox is checked. /// * [value] determines whether the checkbox is checked.
/// * [onChanged] is called when the value of the checkbox should change. /// * [onChanged] is called when the value of the checkbox should change.
Checkbox({ const Checkbox({
Key key, Key key,
@required this.value, @required this.value,
@required this.onChanged, @required this.onChanged,
......
...@@ -44,7 +44,7 @@ import 'typography.dart'; ...@@ -44,7 +44,7 @@ import 'typography.dart';
/// * <https://material.google.com/components/chips.html#chips-contact-chips> /// * <https://material.google.com/components/chips.html#chips-contact-chips>
class CircleAvatar extends StatelessWidget { class CircleAvatar extends StatelessWidget {
/// Creates a circle that represents a user. /// Creates a circle that represents a user.
CircleAvatar({ const CircleAvatar({
Key key, Key key,
this.child, this.child,
this.backgroundColor, this.backgroundColor,
......
...@@ -607,7 +607,7 @@ class DataTable extends StatelessWidget { ...@@ -607,7 +607,7 @@ class DataTable extends StatelessWidget {
/// [Table], and put the other contents of the cell inside it.) /// [Table], and put the other contents of the cell inside it.)
class TableRowInkWell extends InkResponse { class TableRowInkWell extends InkResponse {
/// Creates an ink well for a table row. /// Creates an ink well for a table row.
TableRowInkWell({ const TableRowInkWell({
Key key, Key key,
Widget child, Widget child,
GestureTapCallback onTap, GestureTapCallback onTap,
...@@ -661,7 +661,7 @@ class TableRowInkWell extends InkResponse { ...@@ -661,7 +661,7 @@ class TableRowInkWell extends InkResponse {
} }
class _SortArrow extends StatefulWidget { class _SortArrow extends StatefulWidget {
_SortArrow({ const _SortArrow({
Key key, Key key,
this.visible, this.visible,
this.down, this.down,
......
...@@ -573,7 +573,7 @@ class _YearPickerState extends State<YearPicker> { ...@@ -573,7 +573,7 @@ class _YearPickerState extends State<YearPicker> {
} }
class _DatePickerDialog extends StatefulWidget { class _DatePickerDialog extends StatefulWidget {
_DatePickerDialog({ const _DatePickerDialog({
Key key, Key key,
this.initialDate, this.initialDate,
this.firstDate, this.firstDate,
......
...@@ -31,7 +31,7 @@ class Dialog extends StatelessWidget { ...@@ -31,7 +31,7 @@ class Dialog extends StatelessWidget {
/// Creates a dialog. /// Creates a dialog.
/// ///
/// Typically used in conjunction with [showDialog]. /// Typically used in conjunction with [showDialog].
Dialog({ const Dialog({
Key key, Key key,
this.child, this.child,
}) : super(key: key); }) : super(key: key);
...@@ -90,7 +90,7 @@ class AlertDialog extends StatelessWidget { ...@@ -90,7 +90,7 @@ class AlertDialog extends StatelessWidget {
/// Creates an alert dialog. /// Creates an alert dialog.
/// ///
/// Typically used in conjunction with [showDialog]. /// Typically used in conjunction with [showDialog].
AlertDialog({ const AlertDialog({
Key key, Key key,
this.title, this.title,
this.titlePadding, this.titlePadding,
...@@ -194,7 +194,7 @@ class AlertDialog extends StatelessWidget { ...@@ -194,7 +194,7 @@ class AlertDialog extends StatelessWidget {
/// * <https://material.google.com/components/dialogs.html#dialogs-simple-dialogs> /// * <https://material.google.com/components/dialogs.html#dialogs-simple-dialogs>
class SimpleDialogOption extends StatelessWidget { class SimpleDialogOption extends StatelessWidget {
/// Creates an option for a [SimpleDialog]. /// Creates an option for a [SimpleDialog].
SimpleDialogOption({ const SimpleDialogOption({
Key key, Key key,
this.onPressed, this.onPressed,
this.child, this.child,
...@@ -244,7 +244,7 @@ class SimpleDialog extends StatelessWidget { ...@@ -244,7 +244,7 @@ class SimpleDialog extends StatelessWidget {
/// Creates a simple dialog. /// Creates a simple dialog.
/// ///
/// Typically used in conjunction with [showDialog]. /// Typically used in conjunction with [showDialog].
SimpleDialog({ const SimpleDialog({
Key key, Key key,
this.title, this.title,
this.titlePadding, this.titlePadding,
......
...@@ -66,7 +66,7 @@ class Drawer extends StatelessWidget { ...@@ -66,7 +66,7 @@ class Drawer extends StatelessWidget {
/// Creates a material design drawer. /// Creates a material design drawer.
/// ///
/// Typically used in the [Scaffold.drawer] property. /// Typically used in the [Scaffold.drawer] property.
Drawer({ const Drawer({
Key key, Key key,
this.elevation: 16, this.elevation: 16,
this.child this.child
......
...@@ -90,7 +90,7 @@ class _DropdownScrollBehavior extends ScrollBehavior { ...@@ -90,7 +90,7 @@ class _DropdownScrollBehavior extends ScrollBehavior {
} }
class _DropdownMenu<T> extends StatefulWidget { class _DropdownMenu<T> extends StatefulWidget {
_DropdownMenu({ const _DropdownMenu({
Key key, Key key,
this.route, this.route,
}) : super(key: key); }) : super(key: key);
......
...@@ -30,7 +30,7 @@ class FlexibleSpaceBar extends StatefulWidget { ...@@ -30,7 +30,7 @@ class FlexibleSpaceBar extends StatefulWidget {
/// Creates a flexible space bar. /// Creates a flexible space bar.
/// ///
/// Most commonly used in the [AppBar.flexibleSpace] field. /// Most commonly used in the [AppBar.flexibleSpace] field.
FlexibleSpaceBar({ const FlexibleSpaceBar({
Key key, Key key,
this.title, this.title,
this.background, this.background,
...@@ -161,7 +161,7 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> { ...@@ -161,7 +161,7 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
} }
class _FlexibleSpaceBarSettings extends InheritedWidget { class _FlexibleSpaceBarSettings extends InheritedWidget {
_FlexibleSpaceBarSettings({ const _FlexibleSpaceBarSettings({
Key key, Key key,
this.toolbarOpacity, this.toolbarOpacity,
this.minExtent, this.minExtent,
......
...@@ -24,7 +24,7 @@ class GridTileBar extends StatelessWidget { ...@@ -24,7 +24,7 @@ class GridTileBar extends StatelessWidget {
/// Creates a grid tile bar. /// Creates a grid tile bar.
/// ///
/// Typically used to with [GridTile]. /// Typically used to with [GridTile].
GridTileBar({ const GridTileBar({
Key key, Key key,
this.backgroundColor, this.backgroundColor,
this.leading, this.leading,
......
...@@ -31,7 +31,7 @@ class InkResponse extends StatefulWidget { ...@@ -31,7 +31,7 @@ class InkResponse extends StatefulWidget {
/// Creates an area of a [Material] that responds to touch. /// Creates an area of a [Material] that responds to touch.
/// ///
/// Must have an ancestor [Material] widget in which to cause ink reactions. /// Must have an ancestor [Material] widget in which to cause ink reactions.
InkResponse({ const InkResponse({
Key key, Key key,
this.child, this.child,
this.onTap, this.onTap,
...@@ -253,7 +253,7 @@ class InkWell extends InkResponse { ...@@ -253,7 +253,7 @@ class InkWell extends InkResponse {
/// Creates an ink well. /// Creates an ink well.
/// ///
/// Must have an ancestor [Material] widget in which to cause ink reactions. /// Must have an ancestor [Material] widget in which to cause ink reactions.
InkWell({ const InkWell({
Key key, Key key,
Widget child, Widget child,
GestureTapCallback onTap, GestureTapCallback onTap,
......
...@@ -235,7 +235,7 @@ class InputDecoration { ...@@ -235,7 +235,7 @@ class InputDecoration {
class InputDecorator extends StatelessWidget { class InputDecorator extends StatelessWidget {
/// Creates a widget that displayes labels and other visual elements similar /// Creates a widget that displayes labels and other visual elements similar
/// to a [TextField]. /// to a [TextField].
InputDecorator({ const InputDecorator({
Key key, Key key,
@required this.decoration, @required this.decoration,
this.baseStyle, this.baseStyle,
......
...@@ -358,7 +358,7 @@ class _RenderInkFeatures extends RenderProxyBox implements MaterialInkController ...@@ -358,7 +358,7 @@ class _RenderInkFeatures extends RenderProxyBox implements MaterialInkController
} }
class _InkFeatures extends SingleChildRenderObjectWidget { class _InkFeatures extends SingleChildRenderObjectWidget {
_InkFeatures({ Key key, this.color, Widget child, @required this.vsync }) : super(key: key, child: child); const _InkFeatures({ Key key, this.color, Widget child, @required this.vsync }) : super(key: key, child: child);
// This widget must be owned by a MaterialState, which must be provided as the vsync. // This widget must be owned by a MaterialState, which must be provided as the vsync.
// This relationship must be 1:1 and cannot change for the lifetime of the MaterialState. // This relationship must be 1:1 and cannot change for the lifetime of the MaterialState.
......
...@@ -95,7 +95,7 @@ class MaterialGap extends MergeableMaterialItem { ...@@ -95,7 +95,7 @@ class MaterialGap extends MergeableMaterialItem {
/// but otherwise looks the same. /// but otherwise looks the same.
class MergeableMaterial extends StatefulWidget { class MergeableMaterial extends StatefulWidget {
/// Creates a mergeable Material list of items. /// Creates a mergeable Material list of items.
MergeableMaterial({ const MergeableMaterial({
Key key, Key key,
this.mainAxis: Axis.vertical, this.mainAxis: Axis.vertical,
this.elevation: 2, this.elevation: 2,
...@@ -615,7 +615,7 @@ class _MergeableMaterialState extends State<MergeableMaterial> with TickerProvid ...@@ -615,7 +615,7 @@ class _MergeableMaterialState extends State<MergeableMaterial> with TickerProvid
// The parent hierarchy can change and lead to the slice being // The parent hierarchy can change and lead to the slice being
// rebuilt. Using a global key solves the issue. // rebuilt. Using a global key solves the issue.
class _MergeableMaterialSliceKey extends GlobalKey { class _MergeableMaterialSliceKey extends GlobalKey {
const _MergeableMaterialSliceKey(this.value) : super.constructor(); _MergeableMaterialSliceKey(this.value) : super.constructor();
final LocalKey value; final LocalKey value;
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
// found in the LICENSE file. // found in the LICENSE file.
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'theme.dart'; import 'theme.dart';
// Fractional offset from 1/4 screen below the top to fully on screen. // Fractional offset from 1/4 screen below the top to fully on screen.
final FractionalOffsetTween _kBottomUpTween = new FractionalOffsetTween( final FractionalOffsetTween _kBottomUpTween = new FractionalOffsetTween(
begin: FractionalOffset.bottomLeft, begin: FractionalOffset.bottomLeft,
end: FractionalOffset.topLeft end: FractionalOffset.topLeft
......
...@@ -46,7 +46,7 @@ class Radio<T> extends StatefulWidget { ...@@ -46,7 +46,7 @@ class Radio<T> extends StatefulWidget {
/// ///
/// * [value] and [groupValue] together determines whether the radio button is selected. /// * [value] and [groupValue] together determines whether the radio button is selected.
/// * [onChanged] is when the user selects this radio button. /// * [onChanged] is when the user selects this radio button.
Radio({ const Radio({
Key key, Key key,
@required this.value, @required this.value,
@required this.groupValue, @required this.groupValue,
......
...@@ -36,7 +36,7 @@ class RaisedButton extends StatelessWidget { ...@@ -36,7 +36,7 @@ class RaisedButton extends StatelessWidget {
/// ///
/// The [child] argument is required and is typically a [Text] widget in all /// The [child] argument is required and is typically a [Text] widget in all
/// caps. /// caps.
RaisedButton({ const RaisedButton({
Key key, Key key,
@required this.onPressed, @required this.onPressed,
this.color, this.color,
......
...@@ -141,7 +141,7 @@ class _ScaffoldLayout extends MultiChildLayoutDelegate { ...@@ -141,7 +141,7 @@ class _ScaffoldLayout extends MultiChildLayoutDelegate {
} }
class _FloatingActionButtonTransition extends StatefulWidget { class _FloatingActionButtonTransition extends StatefulWidget {
_FloatingActionButtonTransition({ const _FloatingActionButtonTransition({
Key key, Key key,
this.child, this.child,
}) : super(key: key); }) : super(key: key);
...@@ -938,7 +938,7 @@ class ScaffoldFeatureController<T extends Widget, U> { ...@@ -938,7 +938,7 @@ class ScaffoldFeatureController<T extends Widget, U> {
} }
class _PersistentBottomSheet extends StatefulWidget { class _PersistentBottomSheet extends StatefulWidget {
_PersistentBottomSheet({ const _PersistentBottomSheet({
Key key, Key key,
this.animationController, this.animationController,
this.onClosing, this.onClosing,
......
...@@ -27,7 +27,7 @@ class Scrollbar extends StatefulWidget { ...@@ -27,7 +27,7 @@ class Scrollbar extends StatefulWidget {
/// ///
/// The [child] should be a source of [ScrollNotification] notifications, /// The [child] should be a source of [ScrollNotification] notifications,
/// typically a [Scrollable] widget. /// typically a [Scrollable] widget.
Scrollbar({ const Scrollbar({
Key key, Key key,
@required this.child, @required this.child,
}) : super(key: key); }) : super(key: key);
......
...@@ -177,7 +177,7 @@ class _SliderState extends State<Slider> with TickerProviderStateMixin { ...@@ -177,7 +177,7 @@ class _SliderState extends State<Slider> with TickerProviderStateMixin {
} }
class _SliderRenderObjectWidget extends LeafRenderObjectWidget { class _SliderRenderObjectWidget extends LeafRenderObjectWidget {
_SliderRenderObjectWidget({ const _SliderRenderObjectWidget({
Key key, Key key,
this.value, this.value,
this.divisions, this.divisions,
......
...@@ -170,7 +170,7 @@ class TabController extends ChangeNotifier { ...@@ -170,7 +170,7 @@ class TabController extends ChangeNotifier {
} }
class _TabControllerScope extends InheritedWidget { class _TabControllerScope extends InheritedWidget {
_TabControllerScope({ const _TabControllerScope({
Key key, Key key,
this.controller, this.controller,
this.enabled, this.enabled,
...@@ -227,7 +227,7 @@ class DefaultTabController extends StatefulWidget { ...@@ -227,7 +227,7 @@ class DefaultTabController extends StatefulWidget {
/// The [length] argument must be great than one. /// The [length] argument must be great than one.
/// ///
/// The [initialIndex] argument must not be null. /// The [initialIndex] argument must not be null.
DefaultTabController({ const DefaultTabController({
Key key, Key key,
@required this.length, @required this.length,
this.initialIndex: 0, this.initialIndex: 0,
......
...@@ -103,7 +103,7 @@ class Tab extends StatelessWidget { ...@@ -103,7 +103,7 @@ class Tab extends StatelessWidget {
} }
class _TabStyle extends AnimatedWidget { class _TabStyle extends AnimatedWidget {
_TabStyle({ const _TabStyle({
Key key, Key key,
Animation<double> animation, Animation<double> animation,
this.selected, this.selected,
...@@ -946,7 +946,7 @@ class TabPageSelectorIndicator extends StatelessWidget { ...@@ -946,7 +946,7 @@ class TabPageSelectorIndicator extends StatelessWidget {
/// ancestor. /// ancestor.
class TabPageSelector extends StatelessWidget { class TabPageSelector extends StatelessWidget {
/// Creates a compact widget that indicates which tab has been selected. /// Creates a compact widget that indicates which tab has been selected.
TabPageSelector({ Key key, this.controller }) : super(key: key); const TabPageSelector({ Key key, this.controller }) : super(key: key);
/// This widget's selection and animation state. /// This widget's selection and animation state.
/// ///
......
...@@ -62,7 +62,7 @@ class TextField extends StatefulWidget { ...@@ -62,7 +62,7 @@ class TextField extends StatefulWidget {
/// To remove the decoration entirely (including the extra padding introduced /// To remove the decoration entirely (including the extra padding introduced
/// by the decoration to save space for the labels), set the [decoration] to /// by the decoration to save space for the labels), set the [decoration] to
/// null. /// null.
TextField({ const TextField({
Key key, Key key,
this.controller, this.controller,
this.focusNode, this.focusNode,
......
...@@ -17,7 +17,7 @@ const double _kToolbarScreenPadding = 8.0; // pixels ...@@ -17,7 +17,7 @@ const double _kToolbarScreenPadding = 8.0; // pixels
/// Manages a copy/paste text selection toolbar. /// Manages a copy/paste text selection toolbar.
class _TextSelectionToolbar extends StatelessWidget { class _TextSelectionToolbar extends StatelessWidget {
_TextSelectionToolbar(this.delegate, {Key key}) : super(key: key); const _TextSelectionToolbar(this.delegate, {Key key}) : super(key: key);
final TextSelectionDelegate delegate; final TextSelectionDelegate delegate;
TextEditingValue get value => delegate.textEditingValue; TextEditingValue get value => delegate.textEditingValue;
......
...@@ -235,7 +235,7 @@ class _TooltipPositionDelegate extends SingleChildLayoutDelegate { ...@@ -235,7 +235,7 @@ class _TooltipPositionDelegate extends SingleChildLayoutDelegate {
} }
class _TooltipOverlay extends StatelessWidget { class _TooltipOverlay extends StatelessWidget {
_TooltipOverlay({ const _TooltipOverlay({
Key key, Key key,
this.message, this.message,
this.height, this.height,
......
...@@ -104,7 +104,7 @@ class TwoLevelListItem extends StatelessWidget { ...@@ -104,7 +104,7 @@ class TwoLevelListItem extends StatelessWidget {
/// * [ListTile] /// * [ListTile]
class TwoLevelSublist extends StatefulWidget { class TwoLevelSublist extends StatefulWidget {
/// Creates an item in a two-level list that can expland and collapse. /// Creates an item in a two-level list that can expland and collapse.
TwoLevelSublist({ const TwoLevelSublist({
Key key, Key key,
this.leading, this.leading,
@required this.title, @required this.title,
......
...@@ -50,7 +50,7 @@ class FlutterLogoDecoration extends Decoration { ...@@ -50,7 +50,7 @@ class FlutterLogoDecoration extends Decoration {
// (see https://github.com/dart-lang/sdk/issues/26980 for details about that ignore statement) // (see https://github.com/dart-lang/sdk/issues/26980 for details about that ignore statement)
_opacity = 1.0; _opacity = 1.0;
FlutterLogoDecoration._(this.lightColor, this.darkColor, this.textColor, this.style, this._position, this._opacity, this.margin); const FlutterLogoDecoration._(this.lightColor, this.darkColor, this.textColor, this.style, this._position, this._opacity, this.margin);
/// The lighter of the two colors used to paint the logo. /// The lighter of the two colors used to paint the logo.
/// ///
......
...@@ -532,7 +532,7 @@ enum _IntrinsicDimension { minWidth, maxWidth, minHeight, maxHeight } ...@@ -532,7 +532,7 @@ enum _IntrinsicDimension { minWidth, maxWidth, minHeight, maxHeight }
@immutable @immutable
class _IntrinsicDimensionsCacheEntry { class _IntrinsicDimensionsCacheEntry {
_IntrinsicDimensionsCacheEntry(this.dimension, this.argument); const _IntrinsicDimensionsCacheEntry(this.dimension, this.argument);
final _IntrinsicDimension dimension; final _IntrinsicDimension dimension;
final double argument; final double argument;
......
...@@ -145,7 +145,7 @@ class SliverGridRegularTileLayout extends SliverGridLayout { ...@@ -145,7 +145,7 @@ class SliverGridRegularTileLayout extends SliverGridLayout {
/// ///
/// All of the arguments must not be null and must not be negative. The /// All of the arguments must not be null and must not be negative. The
/// `crossAxisCount` argument must be greater than zero. /// `crossAxisCount` argument must be greater than zero.
SliverGridRegularTileLayout({ const SliverGridRegularTileLayout({
@required this.crossAxisCount, @required this.crossAxisCount,
@required this.mainAxisStride, @required this.mainAxisStride,
@required this.crossAxisStride, @required this.crossAxisStride,
......
...@@ -15,7 +15,7 @@ class AnimatedSize extends SingleChildRenderObjectWidget { ...@@ -15,7 +15,7 @@ class AnimatedSize extends SingleChildRenderObjectWidget {
/// Creates a widget that animates its size to match that of its child. /// Creates a widget that animates its size to match that of its child.
/// ///
/// The [curve] and [duration] arguments must not be null. /// The [curve] and [duration] arguments must not be null.
AnimatedSize({ const AnimatedSize({
Key key, Key key,
Widget child, Widget child,
this.alignment: FractionalOffset.center, this.alignment: FractionalOffset.center,
......
...@@ -223,7 +223,7 @@ class _WidgetsAppState extends State<WidgetsApp> implements WidgetsBindingObserv ...@@ -223,7 +223,7 @@ class _WidgetsAppState extends State<WidgetsApp> implements WidgetsBindingObserv
performanceOverlay = new PerformanceOverlay.allEnabled( performanceOverlay = new PerformanceOverlay.allEnabled(
checkerboardRasterCacheImages: widget.checkerboardRasterCacheImages); checkerboardRasterCacheImages: widget.checkerboardRasterCacheImages);
} else if (widget.checkerboardRasterCacheImages) { } else if (widget.checkerboardRasterCacheImages) {
performanceOverlay = new PerformanceOverlay(checkerboardRasterCacheImages: true); performanceOverlay = const PerformanceOverlay(checkerboardRasterCacheImages: true);
} }
if (performanceOverlay != null) { if (performanceOverlay != null) {
......
...@@ -43,7 +43,7 @@ import 'package:meta/meta.dart' show required; ...@@ -43,7 +43,7 @@ import 'package:meta/meta.dart' show required;
/// recent interaction is needed for widget building. /// recent interaction is needed for widget building.
abstract class StreamBuilderBase<T, S> extends StatefulWidget { abstract class StreamBuilderBase<T, S> extends StatefulWidget {
/// Creates a [StreamBuilderBase] connected to the specified [stream]. /// Creates a [StreamBuilderBase] connected to the specified [stream].
StreamBuilderBase({ Key key, this.stream }) : super(key: key); const StreamBuilderBase({ Key key, this.stream }) : super(key: key);
/// The asynchronous computation to which this builder is currently connected, /// The asynchronous computation to which this builder is currently connected,
/// possibly null. When changed, the current summary is updated using /// possibly null. When changed, the current summary is updated using
......
...@@ -1787,7 +1787,7 @@ class Positioned extends ParentDataWidget<Stack> { ...@@ -1787,7 +1787,7 @@ class Positioned extends ParentDataWidget<Stack> {
/// Creates a Positioned object with [left], [top], [right], and [bottom] set /// Creates a Positioned object with [left], [top], [right], and [bottom] set
/// to 0.0 unless a value for them is passed. /// to 0.0 unless a value for them is passed.
Positioned.fill({ const Positioned.fill({
Key key, Key key,
this.left: 0.0, this.left: 0.0,
this.top: 0.0, this.top: 0.0,
......
...@@ -83,7 +83,7 @@ class Draggable<T> extends StatefulWidget { ...@@ -83,7 +83,7 @@ class Draggable<T> extends StatefulWidget {
/// ///
/// The [child] and [feedback] arguments must not be null. If /// The [child] and [feedback] arguments must not be null. If
/// [maxSimultaneousDrags] is non-null, it must be non-negative. /// [maxSimultaneousDrags] is non-null, it must be non-negative.
Draggable({ const Draggable({
Key key, Key key,
@required this.child, @required this.child,
@required this.feedback, @required this.feedback,
...@@ -95,11 +95,11 @@ class Draggable<T> extends StatefulWidget { ...@@ -95,11 +95,11 @@ class Draggable<T> extends StatefulWidget {
this.maxSimultaneousDrags, this.maxSimultaneousDrags,
this.onDragStarted, this.onDragStarted,
this.onDraggableCanceled this.onDraggableCanceled
}) : super(key: key) { }) : assert(child != null),
assert(child != null); assert(feedback != null),
assert(feedback != null); assert(maxSimultaneousDrags == null || maxSimultaneousDrags >= 0),
assert(maxSimultaneousDrags == null || maxSimultaneousDrags >= 0); super(key: key);
}
/// The data that will be dropped by this draggable. /// The data that will be dropped by this draggable.
final T data; final T data;
...@@ -207,7 +207,7 @@ class LongPressDraggable<T> extends Draggable<T> { ...@@ -207,7 +207,7 @@ class LongPressDraggable<T> extends Draggable<T> {
/// ///
/// The [child] and [feedback] arguments must not be null. If /// The [child] and [feedback] arguments must not be null. If
/// [maxSimultaneousDrags] is non-null, it must be non-negative. /// [maxSimultaneousDrags] is non-null, it must be non-negative.
LongPressDraggable({ const LongPressDraggable({
Key key, Key key,
@required Widget child, @required Widget child,
@required Widget feedback, @required Widget feedback,
......
...@@ -487,7 +487,7 @@ class EditableTextState extends State<EditableText> implements TextInputClient { ...@@ -487,7 +487,7 @@ class EditableTextState extends State<EditableText> implements TextInputClient {
} }
class _Editable extends LeafRenderObjectWidget { class _Editable extends LeafRenderObjectWidget {
_Editable({ const _Editable({
Key key, Key key,
this.value, this.value,
this.style, this.style,
......
...@@ -132,7 +132,7 @@ class FormState extends State<Form> { ...@@ -132,7 +132,7 @@ class FormState extends State<Form> {
} }
class _FormScope extends InheritedWidget { class _FormScope extends InheritedWidget {
_FormScope({ const _FormScope({
Key key, Key key,
Widget child, Widget child,
FormState formState, FormState formState,
......
...@@ -475,7 +475,7 @@ class RawGestureDetectorState extends State<RawGestureDetector> { ...@@ -475,7 +475,7 @@ class RawGestureDetectorState extends State<RawGestureDetector> {
} }
class _GestureSemantics extends SingleChildRenderObjectWidget { class _GestureSemantics extends SingleChildRenderObjectWidget {
_GestureSemantics({ const _GestureSemantics({
Key key, Key key,
Widget child, Widget child,
this.owner this.owner
......
...@@ -52,7 +52,7 @@ class _GridPaperPainter extends CustomPainter { ...@@ -52,7 +52,7 @@ class _GridPaperPainter extends CustomPainter {
/// Useful with a [Stack] for visualizing your layout along a grid. /// Useful with a [Stack] for visualizing your layout along a grid.
class GridPaper extends StatelessWidget { class GridPaper extends StatelessWidget {
/// Creates a widget that draws a rectilinear grid of 1px wide lines. /// Creates a widget that draws a rectilinear grid of 1px wide lines.
GridPaper({ const GridPaper({
Key key, Key key,
this.color: const Color(0x7FC3E8F3), this.color: const Color(0x7FC3E8F3),
this.interval: 100.0, this.interval: 100.0,
......
...@@ -12,7 +12,7 @@ import 'transitions.dart'; ...@@ -12,7 +12,7 @@ import 'transitions.dart';
/// A widget that prevents the user from interacting with widgets behind itself. /// A widget that prevents the user from interacting with widgets behind itself.
class ModalBarrier extends StatelessWidget { class ModalBarrier extends StatelessWidget {
/// Creates a widget that blocks user interaction. /// Creates a widget that blocks user interaction.
ModalBarrier({ const ModalBarrier({
Key key, Key key,
this.color, this.color,
this.dismissible: true this.dismissible: true
...@@ -50,7 +50,7 @@ class ModalBarrier extends StatelessWidget { ...@@ -50,7 +50,7 @@ class ModalBarrier extends StatelessWidget {
/// A widget that prevents the user from interacting with widgets behind itself. /// A widget that prevents the user from interacting with widgets behind itself.
class AnimatedModalBarrier extends AnimatedWidget { class AnimatedModalBarrier extends AnimatedWidget {
/// Creates a widget that blocks user interaction. /// Creates a widget that blocks user interaction.
AnimatedModalBarrier({ const AnimatedModalBarrier({
Key key, Key key,
Animation<Color> color, Animation<Color> color,
this.dismissible: true this.dismissible: true
......
...@@ -86,7 +86,7 @@ abstract class Notification { ...@@ -86,7 +86,7 @@ abstract class Notification {
/// To dispatch notifications, use the [Notification.dispatch] method. /// To dispatch notifications, use the [Notification.dispatch] method.
class NotificationListener<T extends Notification> extends StatelessWidget { class NotificationListener<T extends Notification> extends StatelessWidget {
/// Creates a widget that listens for notifications. /// Creates a widget that listens for notifications.
NotificationListener({ const NotificationListener({
Key key, Key key,
@required this.child, @required this.child,
this.onNotification this.onNotification
......
...@@ -27,7 +27,7 @@ class PerformanceOverlay extends LeafRenderObjectWidget { ...@@ -27,7 +27,7 @@ class PerformanceOverlay extends LeafRenderObjectWidget {
/// Create a performance overlay that only displays specific statistics. The /// Create a performance overlay that only displays specific statistics. The
/// mask is created by shifting 1 by the index of the specific /// mask is created by shifting 1 by the index of the specific
/// [StatisticOption] to enable. /// [StatisticOption] to enable.
PerformanceOverlay({ const PerformanceOverlay({
Key key, Key key,
this.optionsMask: 0, this.optionsMask: 0,
this.rasterizerThreshold: 0, this.rasterizerThreshold: 0,
......
...@@ -8,7 +8,7 @@ import 'framework.dart'; ...@@ -8,7 +8,7 @@ import 'framework.dart';
/// A widget whose child can be mutated. /// A widget whose child can be mutated.
class Placeholder extends StatefulWidget { class Placeholder extends StatefulWidget {
/// Creates a widget whose child can be mutated. /// Creates a widget whose child can be mutated.
Placeholder({ Key key }) : super(key: key); const Placeholder({ Key key }) : super(key: key);
@override @override
PlaceholderState createState() => new PlaceholderState(); PlaceholderState createState() => new PlaceholderState();
......
...@@ -416,7 +416,7 @@ enum RoutePopDisposition { ...@@ -416,7 +416,7 @@ enum RoutePopDisposition {
typedef Future<bool> WillPopCallback(); typedef Future<bool> WillPopCallback();
class _ModalScope extends StatefulWidget { class _ModalScope extends StatefulWidget {
_ModalScope({ const _ModalScope({
Key key, Key key,
this.route, this.route,
@required this.page, @required this.page,
......
...@@ -39,7 +39,7 @@ class SizeChangedLayoutNotification extends LayoutChangedNotification { } ...@@ -39,7 +39,7 @@ class SizeChangedLayoutNotification extends LayoutChangedNotification { }
class SizeChangedLayoutNotifier extends SingleChildRenderObjectWidget { class SizeChangedLayoutNotifier extends SingleChildRenderObjectWidget {
/// Creates a [SizeChangedLayoutNotifier] that dispatches layout changed /// Creates a [SizeChangedLayoutNotifier] that dispatches layout changed
/// notifications when [child] changes layout size. /// notifications when [child] changes layout size.
SizeChangedLayoutNotifier({ const SizeChangedLayoutNotifier({
Key key, Key key,
Widget child Widget child
}) : super(key: key, child: child); }) : super(key: key, child: child);
......
...@@ -230,12 +230,11 @@ class SliverChildListDelegate extends SliverChildDelegate { ...@@ -230,12 +230,11 @@ class SliverChildListDelegate extends SliverChildDelegate {
/// Helps subclasses build their children lazily using a [SliverChildDelegate]. /// Helps subclasses build their children lazily using a [SliverChildDelegate].
abstract class SliverMultiBoxAdaptorWidget extends RenderObjectWidget { abstract class SliverMultiBoxAdaptorWidget extends RenderObjectWidget {
/// Initializes fields for subclasses. /// Initializes fields for subclasses.
SliverMultiBoxAdaptorWidget({ const SliverMultiBoxAdaptorWidget({
Key key, Key key,
@required this.delegate, @required this.delegate,
}) : super(key: key) { }) : assert(delegate != null),
assert(delegate != null); super(key: key);
}
/// The delegate that provides the children for this widget. /// The delegate that provides the children for this widget.
/// ///
...@@ -308,7 +307,7 @@ abstract class SliverMultiBoxAdaptorWidget extends RenderObjectWidget { ...@@ -308,7 +307,7 @@ abstract class SliverMultiBoxAdaptorWidget extends RenderObjectWidget {
/// * [SliverGrid], which places its children in arbitrary positions. /// * [SliverGrid], which places its children in arbitrary positions.
class SliverList extends SliverMultiBoxAdaptorWidget { class SliverList extends SliverMultiBoxAdaptorWidget {
/// Creates a sliver that places box children in a linear array. /// Creates a sliver that places box children in a linear array.
SliverList({ const SliverList({
Key key, Key key,
@required SliverChildDelegate delegate, @required SliverChildDelegate delegate,
}) : super(key: key, delegate: delegate); }) : super(key: key, delegate: delegate);
...@@ -341,7 +340,7 @@ class SliverList extends SliverMultiBoxAdaptorWidget { ...@@ -341,7 +340,7 @@ class SliverList extends SliverMultiBoxAdaptorWidget {
class SliverFixedExtentList extends SliverMultiBoxAdaptorWidget { class SliverFixedExtentList extends SliverMultiBoxAdaptorWidget {
/// Creates a sliver that places box children with the same main axis extent /// Creates a sliver that places box children with the same main axis extent
/// in a linear array. /// in a linear array.
SliverFixedExtentList({ const SliverFixedExtentList({
Key key, Key key,
@required SliverChildDelegate delegate, @required SliverChildDelegate delegate,
@required this.itemExtent, @required this.itemExtent,
...@@ -376,7 +375,7 @@ class SliverFixedExtentList extends SliverMultiBoxAdaptorWidget { ...@@ -376,7 +375,7 @@ class SliverFixedExtentList extends SliverMultiBoxAdaptorWidget {
class SliverGrid extends SliverMultiBoxAdaptorWidget { class SliverGrid extends SliverMultiBoxAdaptorWidget {
/// Creates a sliver that places multiple box children in a two dimensional /// Creates a sliver that places multiple box children in a two dimensional
/// arrangement. /// arrangement.
SliverGrid({ const SliverGrid({
Key key, Key key,
@required SliverChildDelegate delegate, @required SliverChildDelegate delegate,
@required this.gridDelegate, @required this.gridDelegate,
...@@ -694,7 +693,7 @@ class SliverMultiBoxAdaptorElement extends RenderObjectElement implements Render ...@@ -694,7 +693,7 @@ class SliverMultiBoxAdaptorElement extends RenderObjectElement implements Render
/// * [SliverList], which shows a list of variable-sized children in a /// * [SliverList], which shows a list of variable-sized children in a
/// viewport. /// viewport.
class SliverFillRemaining extends SingleChildRenderObjectWidget { class SliverFillRemaining extends SingleChildRenderObjectWidget {
SliverFillRemaining({ const SliverFillRemaining({
Key key, Key key,
Widget child, Widget child,
}) : super(key: key, child: child); }) : super(key: key, child: child);
......
...@@ -146,12 +146,11 @@ class _SliverPersistentHeaderElement extends RenderObjectElement { ...@@ -146,12 +146,11 @@ class _SliverPersistentHeaderElement extends RenderObjectElement {
} }
abstract class _SliverPersistentHeaderRenderObjectWidget extends RenderObjectWidget { abstract class _SliverPersistentHeaderRenderObjectWidget extends RenderObjectWidget {
_SliverPersistentHeaderRenderObjectWidget({ const _SliverPersistentHeaderRenderObjectWidget({
Key key, Key key,
@required this.delegate, @required this.delegate,
}) : super(key: key) { }) : assert(delegate != null),
assert(delegate != null); super(key: key);
}
final SliverPersistentHeaderDelegate delegate; final SliverPersistentHeaderDelegate delegate;
...@@ -190,7 +189,7 @@ abstract class _RenderSliverPersistentHeaderForWidgetsMixin implements RenderSli ...@@ -190,7 +189,7 @@ abstract class _RenderSliverPersistentHeaderForWidgetsMixin implements RenderSli
} }
class _SliverScrollingPersistentHeader extends _SliverPersistentHeaderRenderObjectWidget { class _SliverScrollingPersistentHeader extends _SliverPersistentHeaderRenderObjectWidget {
_SliverScrollingPersistentHeader({ const _SliverScrollingPersistentHeader({
Key key, Key key,
@required SliverPersistentHeaderDelegate delegate, @required SliverPersistentHeaderDelegate delegate,
}) : super(key: key, delegate: delegate); }) : super(key: key, delegate: delegate);
...@@ -208,7 +207,7 @@ class _RenderSliverScrollingPersistentHeaderForWidgets extends _RenderSliverScro ...@@ -208,7 +207,7 @@ class _RenderSliverScrollingPersistentHeaderForWidgets extends _RenderSliverScro
with _RenderSliverPersistentHeaderForWidgetsMixin { } with _RenderSliverPersistentHeaderForWidgetsMixin { }
class _SliverPinnedPersistentHeader extends _SliverPersistentHeaderRenderObjectWidget { class _SliverPinnedPersistentHeader extends _SliverPersistentHeaderRenderObjectWidget {
_SliverPinnedPersistentHeader({ const _SliverPinnedPersistentHeader({
Key key, Key key,
@required SliverPersistentHeaderDelegate delegate, @required SliverPersistentHeaderDelegate delegate,
}) : super(key: key, delegate: delegate); }) : super(key: key, delegate: delegate);
...@@ -225,7 +224,7 @@ abstract class _RenderSliverPinnedPersistentHeader extends RenderSliverPinnedPer ...@@ -225,7 +224,7 @@ abstract class _RenderSliverPinnedPersistentHeader extends RenderSliverPinnedPer
class _RenderSliverPinnedPersistentHeaderForWidgets extends _RenderSliverPinnedPersistentHeader with _RenderSliverPersistentHeaderForWidgetsMixin { } class _RenderSliverPinnedPersistentHeaderForWidgets extends _RenderSliverPinnedPersistentHeader with _RenderSliverPersistentHeaderForWidgetsMixin { }
class _SliverFloatingPersistentHeader extends _SliverPersistentHeaderRenderObjectWidget { class _SliverFloatingPersistentHeader extends _SliverPersistentHeaderRenderObjectWidget {
_SliverFloatingPersistentHeader({ const _SliverFloatingPersistentHeader({
Key key, Key key,
@required SliverPersistentHeaderDelegate delegate, @required SliverPersistentHeaderDelegate delegate,
}) : super(key: key, delegate: delegate); }) : super(key: key, delegate: delegate);
...@@ -250,7 +249,7 @@ abstract class _RenderSliverFloatingPinnedPersistentHeader extends RenderSliverF ...@@ -250,7 +249,7 @@ abstract class _RenderSliverFloatingPinnedPersistentHeader extends RenderSliverF
class _RenderSliverFloatingPinnedPersistentHeaderForWidgets extends _RenderSliverFloatingPinnedPersistentHeader with _RenderSliverPersistentHeaderForWidgetsMixin { } class _RenderSliverFloatingPinnedPersistentHeaderForWidgets extends _RenderSliverFloatingPinnedPersistentHeader with _RenderSliverPersistentHeaderForWidgetsMixin { }
class _SliverFloatingPinnedPersistentHeader extends _SliverPersistentHeaderRenderObjectWidget { class _SliverFloatingPinnedPersistentHeader extends _SliverPersistentHeaderRenderObjectWidget {
_SliverFloatingPinnedPersistentHeader({ const _SliverFloatingPinnedPersistentHeader({
Key key, Key key,
@required SliverPersistentHeaderDelegate delegate, @required SliverPersistentHeaderDelegate delegate,
}) : super(key: key, delegate: delegate); }) : super(key: key, delegate: delegate);
......
...@@ -12,12 +12,11 @@ abstract class StatusTransitionWidget extends StatefulWidget { ...@@ -12,12 +12,11 @@ abstract class StatusTransitionWidget extends StatefulWidget {
/// Initializes fields for subclasses. /// Initializes fields for subclasses.
/// ///
/// The [animation] argument must not be null. /// The [animation] argument must not be null.
StatusTransitionWidget({ const StatusTransitionWidget({
Key key, Key key,
@required this.animation @required this.animation
}) : super(key: key) { }) : assert(animation != null),
assert(animation != null); super(key: key);
}
/// The animation to which this widget is listening. /// The animation to which this widget is listening.
final Animation<double> animation; final Animation<double> animation;
......
...@@ -355,7 +355,7 @@ class _TableElement extends RenderObjectElement { ...@@ -355,7 +355,7 @@ class _TableElement extends RenderObjectElement {
/// other kinds of widgets, like [RenderObjectWidget]s). /// other kinds of widgets, like [RenderObjectWidget]s).
class TableCell extends ParentDataWidget<Table> { class TableCell extends ParentDataWidget<Table> {
/// Creates a widget that controls how a child of a [Table] is aligned. /// Creates a widget that controls how a child of a [Table] is aligned.
TableCell({ const TableCell({
Key key, Key key,
this.verticalAlignment, this.verticalAlignment,
@required Widget child @required Widget child
......
...@@ -296,7 +296,7 @@ class TextSelectionOverlay implements TextSelectionDelegate { ...@@ -296,7 +296,7 @@ class TextSelectionOverlay implements TextSelectionDelegate {
/// This widget represents a single draggable text selection handle. /// This widget represents a single draggable text selection handle.
class _TextSelectionHandleOverlay extends StatefulWidget { class _TextSelectionHandleOverlay extends StatefulWidget {
_TextSelectionHandleOverlay({ const _TextSelectionHandleOverlay({
Key key, Key key,
this.selection, this.selection,
this.position, this.position,
......
This diff is collapsed.
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