apply upcoming lint prefer_const_literals_to_create_immutables (#14029)

This commit is contained in:
Alexandre Ardhuin 2018-01-11 08:38:55 +01:00 committed by GitHub
parent 5dc4ce85d9
commit 0fe1e5bf5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
63 changed files with 436 additions and 432 deletions

View File

@ -267,7 +267,7 @@ class IconBar extends StatelessWidget {
padding: const EdgeInsets.only(left: 16.0, right: 16.0), padding: const EdgeInsets.only(left: 16.0, right: 16.0),
child: new Row( child: new Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: const <Widget>[
const IconWithText(Icons.thumb_up, 'Like'), const IconWithText(Icons.thumb_up, 'Like'),
const IconWithText(Icons.comment, 'Comment'), const IconWithText(Icons.comment, 'Comment'),
const IconWithText(Icons.share, 'Share'), const IconWithText(Icons.share, 'Share'),
@ -438,10 +438,10 @@ class ItemImageBox extends StatelessWidget {
borderRadius: new BorderRadius.circular(2.0) borderRadius: new BorderRadius.circular(2.0)
), ),
padding: const EdgeInsets.all(4.0), padding: const EdgeInsets.all(4.0),
child: new RichText( child: const RichText(
text: new TextSpan( text: const TextSpan(
style: const TextStyle(color: Colors.white), style: const TextStyle(color: Colors.white),
children: <TextSpan>[ children: const <TextSpan>[
const TextSpan( const TextSpan(
text: 'Photo by ' text: 'Photo by '
), ),
@ -560,7 +560,7 @@ class BottomBar extends StatelessWidget {
), ),
child: new Row( child: new Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: const <Widget>[
const BottomBarButton(Icons.new_releases, 'News'), const BottomBarButton(Icons.new_releases, 'News'),
const BottomBarButton(Icons.people, 'Requests'), const BottomBarButton(Icons.people, 'Requests'),
const BottomBarButton(Icons.chat, 'Messenger'), const BottomBarButton(Icons.chat, 'Messenger'),

View File

@ -66,7 +66,7 @@ class DriverTestAppState extends State<DriverTestApp> {
_selectedValue = newValue; _selectedValue = newValue;
}); });
}, },
items: <DropdownMenuItem<Letter>>[ items: const <DropdownMenuItem<Letter>>[
const DropdownMenuItem<Letter>( const DropdownMenuItem<Letter>(
value: Letter.a, value: Letter.a,
child: const Text('Aaa', key: const ValueKey<String>('a')), child: const Text('Aaa', key: const ValueKey<String>('a')),

View File

@ -347,8 +347,8 @@ class CardCollectionState extends State<CardCollection> {
return new LinearGradient( return new LinearGradient(
begin: Alignment.topCenter, begin: Alignment.topCenter,
end: Alignment.bottomCenter, end: Alignment.bottomCenter,
colors: <Color>[const Color(0x00FFFFFF), const Color(0xFFFFFFFF)], colors: const <Color>[const Color(0x00FFFFFF), const Color(0xFFFFFFFF)],
stops: <double>[0.1, 0.35], stops: const <double>[0.1, 0.35],
) )
.createShader(bounds); .createShader(bounds);
} }

View File

@ -193,7 +193,7 @@ class ContactsDemoState extends State<ContactsDemo> {
content: const Text('Pretend that this opened your SMS application.') content: const Text('Pretend that this opened your SMS application.')
)); ));
}, },
lines: <String>[ lines: const <String>[
'(650) 555-1234', '(650) 555-1234',
'Mobile', 'Mobile',
], ],
@ -206,7 +206,7 @@ class ContactsDemoState extends State<ContactsDemo> {
content: const Text('In this demo, this button doesn\'t do anything.') content: const Text('In this demo, this button doesn\'t do anything.')
)); ));
}, },
lines: <String>[ lines: const <String>[
'(323) 555-6789', '(323) 555-6789',
'Work', 'Work',
], ],
@ -219,7 +219,7 @@ class ContactsDemoState extends State<ContactsDemo> {
content: const Text('Imagine if you will, a messaging application.') content: const Text('Imagine if you will, a messaging application.')
)); ));
}, },
lines: <String>[ lines: const <String>[
'(650) 555-6789', '(650) 555-6789',
'Home', 'Home',
], ],
@ -237,7 +237,7 @@ class ContactsDemoState extends State<ContactsDemo> {
content: const Text('Here, your e-mail application would open.') content: const Text('Here, your e-mail application would open.')
)); ));
}, },
lines: <String>[ lines: const <String>[
'ali_connors@example.com', 'ali_connors@example.com',
'Personal', 'Personal',
], ],
@ -250,7 +250,7 @@ class ContactsDemoState extends State<ContactsDemo> {
content: const Text('This is a demo, so this button does not actually work.') content: const Text('This is a demo, so this button does not actually work.')
)); ));
}, },
lines: <String>[ lines: const <String>[
'aliconnors@example.com', 'aliconnors@example.com',
'Work', 'Work',
], ],
@ -268,7 +268,7 @@ class ContactsDemoState extends State<ContactsDemo> {
content: const Text('This would show a map of San Francisco.') content: const Text('This would show a map of San Francisco.')
)); ));
}, },
lines: <String>[ lines: const <String>[
'2000 Main Street', '2000 Main Street',
'San Francisco, CA', 'San Francisco, CA',
'Home', 'Home',
@ -282,7 +282,7 @@ class ContactsDemoState extends State<ContactsDemo> {
content: const Text('This would show a map of Mountain View.') content: const Text('This would show a map of Mountain View.')
)); ));
}, },
lines: <String>[ lines: const <String>[
'1600 Amphitheater Parkway', '1600 Amphitheater Parkway',
'Mountain View, CA', 'Mountain View, CA',
'Work', 'Work',
@ -296,7 +296,7 @@ class ContactsDemoState extends State<ContactsDemo> {
content: const Text('This would also show a map, if this was not a demo.') content: const Text('This would also show a map, if this was not a demo.')
)); ));
}, },
lines: <String>[ lines: const <String>[
'126 Severyns Ave', '126 Severyns Ave',
'Mountain View, CA', 'Mountain View, CA',
'Jet Travel', 'Jet Travel',
@ -308,25 +308,25 @@ class ContactsDemoState extends State<ContactsDemo> {
icon: Icons.today, icon: Icons.today,
children: <Widget>[ children: <Widget>[
new _ContactItem( new _ContactItem(
lines: <String>[ lines: const <String>[
'Birthday', 'Birthday',
'January 9th, 1989', 'January 9th, 1989',
], ],
), ),
new _ContactItem( new _ContactItem(
lines: <String>[ lines: const <String>[
'Wedding anniversary', 'Wedding anniversary',
'June 21st, 2014', 'June 21st, 2014',
], ],
), ),
new _ContactItem( new _ContactItem(
lines: <String>[ lines: const <String>[
'First day in office', 'First day in office',
'January 20th, 2015', 'January 20th, 2015',
], ],
), ),
new _ContactItem( new _ContactItem(
lines: <String>[ lines: const <String>[
'Last day in office', 'Last day in office',
'August 9th, 2015', 'August 9th, 2015',
], ],

View File

@ -441,7 +441,7 @@ class Tab2Header extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 18.0, vertical: 12.0), padding: const EdgeInsets.symmetric(horizontal: 18.0, vertical: 12.0),
child: new Row( child: new Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: const <Widget>[
const Text( const Text(
'SUPPORT TICKET', 'SUPPORT TICKET',
style: const TextStyle( style: const TextStyle(
@ -725,10 +725,14 @@ class CupertinoDemoTab3 extends StatelessWidget {
child: new SafeArea( child: new SafeArea(
top: false, top: false,
bottom: false, bottom: false,
child: new Row(children: <Widget>[ const Text( child: new Row(
'Sign in', children: const <Widget>[
style: const TextStyle(color: CupertinoColors.activeBlue), const Text(
) ]), 'Sign in',
style: const TextStyle(color: CupertinoColors.activeBlue),
)
],
),
), ),
), ),
), ),

View File

@ -96,7 +96,7 @@ class _SelectionControlsDemoState extends State<SelectionControlsDemo> {
), ),
new Row( new Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: const <Widget>[
// Disabled checkboxes // Disabled checkboxes
const Checkbox(value: true, onChanged: null), const Checkbox(value: true, onChanged: null),
const Checkbox(value: false, onChanged: null) const Checkbox(value: false, onChanged: null)
@ -136,7 +136,7 @@ class _SelectionControlsDemoState extends State<SelectionControlsDemo> {
// Disabled radio buttons // Disabled radio buttons
new Row( new Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: const <Widget>[
const Radio<int>( const Radio<int>(
value: 0, value: 0,
groupValue: 0, groupValue: 0,

View File

@ -43,7 +43,7 @@ class _SliderDemoState extends State<SliderDemo> {
), ),
new Column( new Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget> [ children: const <Widget> [
const Slider(value: 0.25, thumbOpenAtMin: true, onChanged: null), const Slider(value: 0.25, thumbOpenAtMin: true, onChanged: null),
const Text('Disabled'), const Text('Disabled'),
] ]

View File

@ -17,7 +17,7 @@ class TwoLevelListDemo extends StatelessWidget {
new ExpansionTile( new ExpansionTile(
title: const Text('Sublist'), title: const Text('Sublist'),
backgroundColor: Theme.of(context).accentColor.withOpacity(0.025), backgroundColor: Theme.of(context).accentColor.withOpacity(0.025),
children: <Widget>[ children: const <Widget>[
const ListTile(title: const Text('One')), const ListTile(title: const Text('One')),
const ListTile(title: const Text('Two')), const ListTile(title: const Text('Two')),
// https://en.wikipedia.org/wiki/Free_Four // https://en.wikipedia.org/wiki/Free_Four

View File

@ -362,13 +362,13 @@ class _RecipePageState extends State<RecipePage> {
], ],
), ),
], ],
flexibleSpace: new FlexibleSpaceBar( flexibleSpace: const FlexibleSpaceBar(
background: new DecoratedBox( background: const DecoratedBox(
decoration: new BoxDecoration( decoration: const BoxDecoration(
gradient: new LinearGradient( gradient: const LinearGradient(
begin: const Alignment(0.0, -1.0), begin: const Alignment(0.0, -1.0),
end: const Alignment(0.0, -0.2), end: const Alignment(0.0, -0.2),
colors: <Color>[const Color(0x60000000), const Color(0x00000000)], colors: const<Color>[const Color(0x60000000), const Color(0x00000000)],
), ),
), ),
), ),
@ -444,7 +444,7 @@ class RecipeSheet extends StatelessWidget {
child: new Padding( child: new Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 40.0), padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 40.0),
child: new Table( child: new Table(
columnWidths: <int, TableColumnWidth>{ columnWidths: const <int, TableColumnWidth>{
0: const FixedColumnWidth(64.0) 0: const FixedColumnWidth(64.0)
}, },
children: <TableRow>[ children: <TableRow>[

View File

@ -336,7 +336,7 @@ class _CreateCompanySheet extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new Column( return new Column(
children: <Widget>[ children: const <Widget>[
const TextField( const TextField(
autofocus: true, autofocus: true,
decoration: const InputDecoration( decoration: const InputDecoration(

View File

@ -50,7 +50,7 @@ class _StockSymbolView extends StatelessWidget {
text: new TextSpan( text: new TextSpan(
style: DefaultTextStyle.of(context).style.merge(const TextStyle(fontSize: 8.0)), style: DefaultTextStyle.of(context).style.merge(const TextStyle(fontSize: 8.0)),
text: 'Prices may be delayed by ', text: 'Prices may be delayed by ',
children: <TextSpan>[ children: const <TextSpan>[
const TextSpan(text: 'several', style: const TextStyle(fontStyle: FontStyle.italic)), const TextSpan(text: 'several', style: const TextStyle(fontStyle: FontStyle.italic)),
const TextSpan(text: ' years.'), const TextSpan(text: ' years.'),
] ]

View File

@ -20,7 +20,7 @@ void main() {
testWidgets('Need at least 2 tabs', (WidgetTester tester) async { testWidgets('Need at least 2 tabs', (WidgetTester tester) async {
try { try {
await pumpWidgetWithBoilerplate(tester, new CupertinoTabBar( await pumpWidgetWithBoilerplate(tester, new CupertinoTabBar(
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const ImageIcon(const TestImageProvider(24, 24)), icon: const ImageIcon(const TestImageProvider(24, 24)),
title: const Text('Tab 1'), title: const Text('Tab 1'),
@ -38,7 +38,7 @@ void main() {
await pumpWidgetWithBoilerplate(tester, new MediaQuery( await pumpWidgetWithBoilerplate(tester, new MediaQuery(
data: const MediaQueryData(), data: const MediaQueryData(),
child: new CupertinoTabBar( child: new CupertinoTabBar(
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const ImageIcon(const TestImageProvider(24, 24)), icon: const ImageIcon(const TestImageProvider(24, 24)),
title: const Text('Tab 1'), title: const Text('Tab 1'),
@ -69,7 +69,7 @@ void main() {
testWidgets('Adjusts height to account for bottom padding', (WidgetTester tester) async { testWidgets('Adjusts height to account for bottom padding', (WidgetTester tester) async {
final CupertinoTabBar tabBar = new CupertinoTabBar( final CupertinoTabBar tabBar = new CupertinoTabBar(
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const ImageIcon(const TestImageProvider(24, 24)), icon: const ImageIcon(const TestImageProvider(24, 24)),
title: const Text('Aka'), title: const Text('Aka'),
@ -110,7 +110,7 @@ void main() {
await pumpWidgetWithBoilerplate(tester, new MediaQuery( await pumpWidgetWithBoilerplate(tester, new MediaQuery(
data: const MediaQueryData(), data: const MediaQueryData(),
child: new CupertinoTabBar( child: new CupertinoTabBar(
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const ImageIcon(const TestImageProvider(24, 24)), icon: const ImageIcon(const TestImageProvider(24, 24)),
title: const Text('Tab 1'), title: const Text('Tab 1'),
@ -128,7 +128,7 @@ void main() {
await pumpWidgetWithBoilerplate(tester, new MediaQuery( await pumpWidgetWithBoilerplate(tester, new MediaQuery(
data: const MediaQueryData(), data: const MediaQueryData(),
child: new CupertinoTabBar( child: new CupertinoTabBar(
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const ImageIcon(const TestImageProvider(24, 24)), icon: const ImageIcon(const TestImageProvider(24, 24)),
title: const Text('Tab 1'), title: const Text('Tab 1'),
@ -151,7 +151,7 @@ void main() {
await pumpWidgetWithBoilerplate(tester, new MediaQuery( await pumpWidgetWithBoilerplate(tester, new MediaQuery(
data: const MediaQueryData(), data: const MediaQueryData(),
child: new CupertinoTabBar( child: new CupertinoTabBar(
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const ImageIcon(const TestImageProvider(24, 24)), icon: const ImageIcon(const TestImageProvider(24, 24)),
title: const Text('Tab 1'), title: const Text('Tab 1'),

View File

@ -77,7 +77,7 @@ void main() {
testWidgets('test iOS page transition (RTL)', (WidgetTester tester) async { testWidgets('test iOS page transition (RTL)', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
new WidgetsApp( new WidgetsApp(
localizationsDelegates: <LocalizationsDelegate<dynamic>>[ localizationsDelegates: const <LocalizationsDelegate<dynamic>>[
const RtlOverrideWidgetsDelegate(), const RtlOverrideWidgetsDelegate(),
], ],
color: const Color(0xFFFFFFFF), color: const Color(0xFFFFFFFF),
@ -279,7 +279,7 @@ void main() {
testWidgets('test only edge swipes work (RTL)', (WidgetTester tester) async { testWidgets('test only edge swipes work (RTL)', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
new WidgetsApp( new WidgetsApp(
localizationsDelegates: <LocalizationsDelegate<dynamic>>[ localizationsDelegates: const <LocalizationsDelegate<dynamic>>[
const RtlOverrideWidgetsDelegate(), const RtlOverrideWidgetsDelegate(),
], ],
color: const Color(0xFFFFFFFF), color: const Color(0xFFFFFFFF),

View File

@ -46,7 +46,7 @@ void main() {
return new CupertinoTabScaffold( return new CupertinoTabScaffold(
tabBar: new CupertinoTabBar( tabBar: new CupertinoTabBar(
backgroundColor: CupertinoColors.white, backgroundColor: CupertinoColors.white,
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const ImageIcon(const TestImageProvider(24, 24)), icon: const ImageIcon(const TestImageProvider(24, 24)),
title: const Text('Tab 1'), title: const Text('Tab 1'),
@ -94,7 +94,7 @@ void main() {
), ),
child: new CupertinoTabScaffold( child: new CupertinoTabScaffold(
tabBar: new CupertinoTabBar( tabBar: new CupertinoTabBar(
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const ImageIcon(const TestImageProvider(24, 24)), icon: const ImageIcon(const TestImageProvider(24, 24)),
title: const Text('Tab 1'), title: const Text('Tab 1'),
@ -150,7 +150,7 @@ void main() {
builder: (BuildContext context) { builder: (BuildContext context) {
return new CupertinoTabScaffold( return new CupertinoTabScaffold(
tabBar: new CupertinoTabBar( tabBar: new CupertinoTabBar(
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const ImageIcon(const TestImageProvider(24, 24)), icon: const ImageIcon(const TestImageProvider(24, 24)),
title: const Text('Tab 1'), title: const Text('Tab 1'),

View File

@ -123,7 +123,7 @@ void main() {
CupertinoTabBar _buildTabBar() { CupertinoTabBar _buildTabBar() {
return new CupertinoTabBar( return new CupertinoTabBar(
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const ImageIcon(const TestImageProvider(24, 24)), icon: const ImageIcon(const TestImageProvider(24, 24)),
title: const Text('Tab 1'), title: const Text('Tab 1'),

View File

@ -19,12 +19,12 @@ void main() {
), ),
drawer: new Drawer( drawer: new Drawer(
child: new ListView( child: new ListView(
children: <Widget>[ children: const <Widget>[
new AboutListTile( const AboutListTile(
applicationVersion: '0.1.2', applicationVersion: '0.1.2',
applicationIcon: const FlutterLogo(), applicationIcon: const FlutterLogo(),
applicationLegalese: 'I am the very model of a modern major general.', applicationLegalese: 'I am the very model of a modern major general.',
aboutBoxChildren: <Widget>[ aboutBoxChildren: const <Widget>[
const Text('About box'), const Text('About box'),
] ]
), ),

View File

@ -109,7 +109,7 @@ void main() {
home: new Scaffold( home: new Scaffold(
appBar: new AppBar( appBar: new AppBar(
title: const Text('X'), title: const Text('X'),
actions: <Widget>[ actions: const <Widget>[
const Icon(Icons.thumb_up), const Icon(Icons.thumb_up),
], ],
), ),
@ -130,7 +130,7 @@ void main() {
home: new Scaffold( home: new Scaffold(
appBar: new AppBar( appBar: new AppBar(
title: const Text('X'), title: const Text('X'),
actions: <Widget>[ actions: const <Widget>[
const Icon(Icons.thumb_up), const Icon(Icons.thumb_up),
const Icon(Icons.thumb_up), const Icon(Icons.thumb_up),
], ],
@ -458,7 +458,7 @@ void main() {
child: new AppBar( child: new AppBar(
leading: const Text('L'), leading: const Text('L'),
title: const Text('No Scaffold'), title: const Text('No Scaffold'),
actions: <Widget>[const Text('A1'), const Text('A2')], actions: const <Widget>[const Text('A1'), const Text('A2')],
), ),
), ),
), ),
@ -548,7 +548,7 @@ void main() {
home: new Scaffold( home: new Scaffold(
appBar: new AppBar( appBar: new AppBar(
title: const Text('X'), title: const Text('X'),
actions: <Widget> [ actions: const <Widget> [
const IconButton( const IconButton(
icon: const Icon(Icons.share), icon: const Icon(Icons.share),
onPressed: null, onPressed: null,
@ -977,7 +977,7 @@ void main() {
child: new AppBar( child: new AppBar(
leading: new Placeholder(key: key), leading: new Placeholder(key: key),
title: const Text('Abc'), title: const Text('Abc'),
actions: <Widget>[ actions: const <Widget>[
const Placeholder(fallbackWidth: 10.0), const Placeholder(fallbackWidth: 10.0),
const Placeholder(fallbackWidth: 10.0), const Placeholder(fallbackWidth: 10.0),
const Placeholder(fallbackWidth: 10.0), const Placeholder(fallbackWidth: 10.0),
@ -998,7 +998,7 @@ void main() {
child: new AppBar( child: new AppBar(
leading: new Placeholder(key: key), leading: new Placeholder(key: key),
title: const Text('Abc'), title: const Text('Abc'),
actions: <Widget>[ actions: const <Widget>[
const Placeholder(fallbackWidth: 10.0), const Placeholder(fallbackWidth: 10.0),
const Placeholder(fallbackWidth: 10.0), const Placeholder(fallbackWidth: 10.0),
const Placeholder(fallbackWidth: 10.0), const Placeholder(fallbackWidth: 10.0),
@ -1028,7 +1028,7 @@ void main() {
child: new AppBar( child: new AppBar(
leading: new Placeholder(key: key), leading: new Placeholder(key: key),
title: const Text('Abc'), title: const Text('Abc'),
actions: <Widget>[ actions: const <Widget>[
const Placeholder(fallbackWidth: 10.0), const Placeholder(fallbackWidth: 10.0),
const Placeholder(fallbackWidth: 10.0), const Placeholder(fallbackWidth: 10.0),
const Placeholder(fallbackWidth: 10.0), const Placeholder(fallbackWidth: 10.0),
@ -1069,7 +1069,7 @@ void main() {
child: new AppBar( child: new AppBar(
leading: new Placeholder(key: key), leading: new Placeholder(key: key),
title: const Text('Abc'), title: const Text('Abc'),
actions: <Widget>[ actions: const <Widget>[
const Placeholder(fallbackWidth: 10.0), const Placeholder(fallbackWidth: 10.0),
const Placeholder(fallbackWidth: 10.0), const Placeholder(fallbackWidth: 10.0),
const Placeholder(fallbackWidth: 10.0), const Placeholder(fallbackWidth: 10.0),

View File

@ -16,7 +16,7 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
bottomNavigationBar: new BottomNavigationBar( bottomNavigationBar: new BottomNavigationBar(
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const Icon(Icons.ac_unit), icon: const Icon(Icons.ac_unit),
title: const Text('AC') title: const Text('AC')
@ -44,7 +44,7 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
bottomNavigationBar: new BottomNavigationBar( bottomNavigationBar: new BottomNavigationBar(
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const Icon(Icons.ac_unit), icon: const Icon(Icons.ac_unit),
title: const Text('AC') title: const Text('AC')
@ -72,7 +72,7 @@ void main() {
data: const MediaQueryData(padding: const EdgeInsets.only(bottom: 40.0)), data: const MediaQueryData(padding: const EdgeInsets.only(bottom: 40.0)),
child: new Scaffold( child: new Scaffold(
bottomNavigationBar: new BottomNavigationBar( bottomNavigationBar: new BottomNavigationBar(
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const Icon(Icons.ac_unit), icon: const Icon(Icons.ac_unit),
title: const Text('AC') title: const Text('AC')
@ -100,7 +100,7 @@ void main() {
home: new Scaffold( home: new Scaffold(
bottomNavigationBar: new BottomNavigationBar( bottomNavigationBar: new BottomNavigationBar(
type: BottomNavigationBarType.shifting, type: BottomNavigationBarType.shifting,
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const Icon(Icons.ac_unit), icon: const Icon(Icons.ac_unit),
title: const Text('AC') title: const Text('AC')
@ -126,7 +126,7 @@ void main() {
bottomNavigationBar: new BottomNavigationBar( bottomNavigationBar: new BottomNavigationBar(
currentIndex: 1, currentIndex: 1,
type: BottomNavigationBarType.shifting, type: BottomNavigationBarType.shifting,
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const Icon(Icons.ac_unit), icon: const Icon(Icons.ac_unit),
title: const Text('AC') title: const Text('AC')
@ -155,7 +155,7 @@ void main() {
home: new Scaffold( home: new Scaffold(
bottomNavigationBar: new BottomNavigationBar( bottomNavigationBar: new BottomNavigationBar(
type: BottomNavigationBarType.shifting, type: BottomNavigationBarType.shifting,
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const Icon(Icons.ac_unit), icon: const Icon(Icons.ac_unit),
title: const Text('AC') title: const Text('AC')
@ -216,7 +216,7 @@ void main() {
child: new Scaffold( child: new Scaffold(
bottomNavigationBar: new BottomNavigationBar( bottomNavigationBar: new BottomNavigationBar(
type: BottomNavigationBarType.shifting, type: BottomNavigationBarType.shifting,
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const Icon(Icons.ac_unit), icon: const Icon(Icons.ac_unit),
title: const Text('AC') title: const Text('AC')
@ -254,7 +254,7 @@ void main() {
child: new Scaffold( child: new Scaffold(
bottomNavigationBar: new BottomNavigationBar( bottomNavigationBar: new BottomNavigationBar(
type: BottomNavigationBarType.fixed, type: BottomNavigationBarType.fixed,
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
icon: const Icon(Icons.ac_unit), icon: const Icon(Icons.ac_unit),
title: const Text('AC') title: const Text('AC')
@ -326,7 +326,7 @@ void main() {
home: new Scaffold( home: new Scaffold(
bottomNavigationBar: new BottomNavigationBar( bottomNavigationBar: new BottomNavigationBar(
type: BottomNavigationBarType.fixed, type: BottomNavigationBarType.fixed,
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
title: const Text('A'), title: const Text('A'),
icon: const Icon(Icons.ac_unit), icon: const Icon(Icons.ac_unit),
@ -349,7 +349,7 @@ void main() {
home: new Scaffold( home: new Scaffold(
bottomNavigationBar: new BottomNavigationBar( bottomNavigationBar: new BottomNavigationBar(
type: BottomNavigationBarType.shifting, type: BottomNavigationBarType.shifting,
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
title: const Text('A'), title: const Text('A'),
icon: const Icon(Icons.ac_unit), icon: const Icon(Icons.ac_unit),
@ -373,7 +373,7 @@ void main() {
data: const MediaQueryData(textScaleFactor: 2.0), data: const MediaQueryData(textScaleFactor: 2.0),
child: new Scaffold( child: new Scaffold(
bottomNavigationBar: new BottomNavigationBar( bottomNavigationBar: new BottomNavigationBar(
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
title: const Text('A'), title: const Text('A'),
icon: const Icon(Icons.ac_unit), icon: const Icon(Icons.ac_unit),
@ -430,7 +430,7 @@ void main() {
boilerplate( boilerplate(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
bottomNavigationBar: new BottomNavigationBar( bottomNavigationBar: new BottomNavigationBar(
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
title: const Text('A'), title: const Text('A'),
icon: const Icon(Icons.ac_unit), icon: const Icon(Icons.ac_unit),
@ -462,7 +462,7 @@ void main() {
boilerplate( boilerplate(
textDirection: TextDirection.rtl, textDirection: TextDirection.rtl,
bottomNavigationBar: new BottomNavigationBar( bottomNavigationBar: new BottomNavigationBar(
items: <BottomNavigationBarItem>[ items: const <BottomNavigationBarItem>[
const BottomNavigationBarItem( const BottomNavigationBarItem(
title: const Text('A'), title: const Text('A'),
icon: const Icon(Icons.ac_unit), icon: const Icon(Icons.ac_unit),

View File

@ -274,7 +274,7 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Material( home: new Material(
child: new Column( child: new Column(
children: <Widget>[ children: const <Widget>[
const Chip( const Chip(
avatar: const CircleAvatar( avatar: const CircleAvatar(
child: const Text('A') child: const Text('A')
@ -318,7 +318,7 @@ void main() {
data: const MediaQueryData(textScaleFactor: 3.0), data: const MediaQueryData(textScaleFactor: 3.0),
child: new Material( child: new Material(
child: new Column( child: new Column(
children: <Widget>[ children: const <Widget>[
const Chip( const Chip(
avatar: const CircleAvatar( avatar: const CircleAvatar(
child: const Text('A') child: const Text('A')
@ -352,7 +352,7 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Material( home: new Material(
child: new Column( child: new Column(
children: <Widget>[ children: const <Widget>[
const Chip( const Chip(
avatar: const CircleAvatar( avatar: const CircleAvatar(
child: const Text('A') child: const Text('A')

View File

@ -71,10 +71,10 @@ void main() {
onPressed: () { onPressed: () {
showDialog<Null>( showDialog<Null>(
context: context, context: context,
child: new AlertDialog( child: const AlertDialog(
title: const Text('Title'), title: const Text('Title'),
content: const Text('Y'), content: const Text('Y'),
actions: <Widget>[ ], actions: const <Widget>[ ],
), ),
); );
}, },

View File

@ -53,7 +53,7 @@ void main() {
new ExpansionTile( new ExpansionTile(
key: defaultKey, key: defaultKey,
title: const Text('Default'), title: const Text('Default'),
children: <Widget>[ children: const <Widget>[
const ListTile(title: const Text('0')), const ListTile(title: const Text('0')),
] ]
) )

View File

@ -337,7 +337,7 @@ void main() {
child: new MediaQuery( child: new MediaQuery(
data: const MediaQueryData(), data: const MediaQueryData(),
child: new Column( child: new Column(
children: <Widget>[ children: const <Widget>[
const ListTile( const ListTile(
title: const Text('one'), title: const Text('one'),
), ),

View File

@ -85,8 +85,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -108,8 +108,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -133,8 +133,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -165,8 +165,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('B'), key: const ValueKey<String>('B'),
child: const SizedBox( child: const SizedBox(
@ -202,8 +202,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -233,8 +233,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -269,8 +269,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -310,8 +310,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -342,8 +342,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -386,8 +386,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -418,8 +418,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -460,8 +460,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -499,8 +499,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -543,8 +543,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -575,8 +575,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -615,8 +615,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -654,8 +654,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -688,8 +688,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -720,8 +720,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -776,8 +776,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -823,8 +823,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -864,8 +864,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -900,8 +900,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -956,8 +956,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -1003,8 +1003,8 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -1059,9 +1059,9 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
hasDividers: true, hasDividers: true,
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(
@ -1109,9 +1109,9 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Scaffold( home: new Scaffold(
body: new SingleChildScrollView( body: new SingleChildScrollView(
child: new MergeableMaterial( child: const MergeableMaterial(
hasDividers: true, hasDividers: true,
children: <MergeableMaterialItem>[ children: const <MergeableMaterialItem>[
const MaterialSlice( const MaterialSlice(
key: const ValueKey<String>('A'), key: const ValueKey<String>('A'),
child: const SizedBox( child: const SizedBox(

View File

@ -29,7 +29,7 @@ Widget buildFrame(TabController tabController, { Color color, Color selectedColo
new Flexible( new Flexible(
child: new TabBarView( child: new TabBarView(
controller: tabController, controller: tabController,
children: <Widget>[ children: const <Widget>[
const Center(child: const Text('0')), const Center(child: const Text('0')),
const Center(child: const Text('1')), const Center(child: const Text('1')),
const Center(child: const Text('2')), const Center(child: const Text('2')),

View File

@ -52,7 +52,7 @@ void main() {
header: const Text('Test table'), header: const Text('Test table'),
source: source, source: source,
rowsPerPage: 2, rowsPerPage: 2,
availableRowsPerPage: <int>[ availableRowsPerPage: const <int>[
2, 4, 8, 16, 2, 4, 8, 16,
], ],
onRowsPerPageChanged: (int rowsPerPage) { onRowsPerPageChanged: (int rowsPerPage) {
@ -61,7 +61,7 @@ void main() {
onPageChanged: (int rowIndex) { onPageChanged: (int rowIndex) {
log.add('page-changed: $rowIndex'); log.add('page-changed: $rowIndex');
}, },
columns: <DataColumn>[ columns: const <DataColumn>[
const DataColumn(label: const Text('Name')), const DataColumn(label: const Text('Name')),
const DataColumn(label: const Text('Calories'), numeric: true), const DataColumn(label: const Text('Calories'), numeric: true),
const DataColumn(label: const Text('Generation')), const DataColumn(label: const Text('Generation')),
@ -199,11 +199,11 @@ void main() {
header: const Text('HEADER'), header: const Text('HEADER'),
source: new TestDataSource(), source: new TestDataSource(),
rowsPerPage: 8, rowsPerPage: 8,
availableRowsPerPage: <int>[ availableRowsPerPage: const <int>[
8, 9, 8, 9,
], ],
onRowsPerPageChanged: (int rowsPerPage) { }, onRowsPerPageChanged: (int rowsPerPage) { },
columns: <DataColumn>[ columns: const <DataColumn>[
const DataColumn(label: const Text('COL1')), const DataColumn(label: const Text('COL1')),
const DataColumn(label: const Text('COL2')), const DataColumn(label: const Text('COL2')),
const DataColumn(label: const Text('COL3')), const DataColumn(label: const Text('COL3')),
@ -226,9 +226,9 @@ void main() {
header: const Text('HEADER'), header: const Text('HEADER'),
source: source, source: source,
rowsPerPage: 501, rowsPerPage: 501,
availableRowsPerPage: <int>[ 501 ], availableRowsPerPage: const <int>[ 501 ],
onRowsPerPageChanged: (int rowsPerPage) { }, onRowsPerPageChanged: (int rowsPerPage) { },
columns: <DataColumn>[ columns: const <DataColumn>[
const DataColumn(label: const Text('COL1')), const DataColumn(label: const Text('COL1')),
const DataColumn(label: const Text('COL2')), const DataColumn(label: const Text('COL2')),
const DataColumn(label: const Text('COL3')), const DataColumn(label: const Text('COL3')),
@ -257,9 +257,9 @@ void main() {
header: const Text('HEADER'), header: const Text('HEADER'),
source: source, source: source,
rowsPerPage: 5, rowsPerPage: 5,
availableRowsPerPage: <int>[ 5 ], availableRowsPerPage: const <int>[ 5 ],
onRowsPerPageChanged: (int rowsPerPage) { }, onRowsPerPageChanged: (int rowsPerPage) { },
columns: <DataColumn>[ columns: const <DataColumn>[
const DataColumn(label: const Text('COL1')), const DataColumn(label: const Text('COL1')),
const DataColumn(label: const Text('COL2')), const DataColumn(label: const Text('COL2')),
const DataColumn(label: const Text('COL3')), const DataColumn(label: const Text('COL3')),

View File

@ -187,12 +187,12 @@ void main() {
testWidgets('LinearProgressIndicator causes a repaint when it changes', (WidgetTester tester) async { testWidgets('LinearProgressIndicator causes a repaint when it changes', (WidgetTester tester) async {
await tester.pumpWidget(new Directionality( await tester.pumpWidget(new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new ListView(children: <Widget>[const LinearProgressIndicator(value: 0.0)]), child: new ListView(children: const <Widget>[const LinearProgressIndicator(value: 0.0)]),
)); ));
final List<Layer> layers1 = tester.layers; final List<Layer> layers1 = tester.layers;
await tester.pumpWidget(new Directionality( await tester.pumpWidget(new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new ListView(children: <Widget>[const LinearProgressIndicator(value: 0.5)])), child: new ListView(children: const <Widget>[const LinearProgressIndicator(value: 0.5)])),
); );
final List<Layer> layers2 = tester.layers; final List<Layer> layers2 = tester.layers;
expect(layers1, isNot(equals(layers2))); expect(layers1, isNot(equals(layers2)));

View File

@ -72,21 +72,21 @@ void main() {
), ),
), ),
); );
await tester.fling(find.text('A'), const Offset(300.0, 0.0), 1000.0); // horizontal fling await tester.fling(find.text('A'), const Offset(300.0, 0.0), 1000.0); // horizontal fling
await tester.pump(); await tester.pump();
await tester.pump(const Duration(seconds: 1)); // finish the scroll animation await tester.pump(const Duration(seconds: 1)); // finish the scroll animation
await tester.pump(const Duration(seconds: 1)); // finish the indicator settle animation await tester.pump(const Duration(seconds: 1)); // finish the indicator settle animation
await tester.pump(const Duration(seconds: 1)); // finish the indicator hide animation await tester.pump(const Duration(seconds: 1)); // finish the indicator hide animation
expect(refreshCalled, false); expect(refreshCalled, false);
await tester.fling(find.text('A'), const Offset(0.0, 300.0), 1000.0); // vertical fling await tester.fling(find.text('A'), const Offset(0.0, 300.0), 1000.0); // vertical fling
await tester.pump(); await tester.pump();
await tester.pump(const Duration(seconds: 1)); // finish the scroll animation await tester.pump(const Duration(seconds: 1)); // finish the scroll animation
await tester.pump(const Duration(seconds: 1)); // finish the indicator settle animation await tester.pump(const Duration(seconds: 1)); // finish the indicator settle animation
await tester.pump(const Duration(seconds: 1)); // finish the indicator hide animation await tester.pump(const Duration(seconds: 1)); // finish the indicator hide animation
expect(refreshCalled, true); expect(refreshCalled, true);
}); });
testWidgets('RefreshIndicator - bottom', (WidgetTester tester) async { testWidgets('RefreshIndicator - bottom', (WidgetTester tester) async {
@ -98,7 +98,7 @@ void main() {
child: new ListView( child: new ListView(
reverse: true, reverse: true,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
children: <Widget>[ children: const <Widget>[
const SizedBox( const SizedBox(
height: 200.0, height: 200.0,
child: const Text('X'), child: const Text('X'),
@ -125,7 +125,7 @@ void main() {
onRefresh: holdRefresh, onRefresh: holdRefresh,
child: new ListView( child: new ListView(
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
children: <Widget>[ children: const <Widget>[
const SizedBox( const SizedBox(
height: 200.0, height: 200.0,
child: const Text('X'), child: const Text('X'),
@ -152,7 +152,7 @@ void main() {
child: new ListView( child: new ListView(
reverse: true, reverse: true,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
children: <Widget>[ children: const <Widget>[
const SizedBox( const SizedBox(
height: 200.0, height: 200.0,
child: const Text('X'), child: const Text('X'),
@ -178,7 +178,7 @@ void main() {
onRefresh: refresh, onRefresh: refresh,
child: new ListView( child: new ListView(
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
children: <Widget>[ children: const <Widget>[
const SizedBox( const SizedBox(
height: 200.0, height: 200.0,
child: const Text('X'), child: const Text('X'),
@ -206,7 +206,7 @@ void main() {
onRefresh: refresh, onRefresh: refresh,
child: new ListView( child: new ListView(
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
children: <Widget>[ children: const <Widget>[
const SizedBox( const SizedBox(
height: 200.0, height: 200.0,
child: const Text('X'), child: const Text('X'),
@ -233,7 +233,7 @@ void main() {
onRefresh: holdRefresh, // this one never returns onRefresh: holdRefresh, // this one never returns
child: new ListView( child: new ListView(
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
children: <Widget>[ children: const <Widget>[
const SizedBox( const SizedBox(
height: 200.0, height: 200.0,
child: const Text('X'), child: const Text('X'),
@ -276,7 +276,7 @@ void main() {
onRefresh: refresh, onRefresh: refresh,
child: new ListView( child: new ListView(
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
children: <Widget>[ children: const <Widget>[
const SizedBox( const SizedBox(
height: 200.0, height: 200.0,
child: const Text('X'), child: const Text('X'),
@ -320,7 +320,7 @@ void main() {
onRefresh: refresh, onRefresh: refresh,
child: new ListView( child: new ListView(
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
children: <Widget>[ children: const <Widget>[
const SizedBox( const SizedBox(
height: 200.0, height: 200.0,
child: const Text('X'), child: const Text('X'),

View File

@ -500,9 +500,9 @@ void main() {
const String drawerLabel = 'I am the reason for this test'; const String drawerLabel = 'I am the reason for this test';
final SemanticsTester semantics = new SemanticsTester(tester); final SemanticsTester semantics = new SemanticsTester(tester);
await tester.pumpWidget(new MaterialApp(home: new Scaffold( await tester.pumpWidget(new MaterialApp(home: const Scaffold(
body: const Text(bodyLabel), body: const Text(bodyLabel),
persistentFooterButtons: <Widget>[const Text(persistentFooterButtonLabel)], persistentFooterButtons: const <Widget>[const Text(persistentFooterButtonLabel)],
bottomNavigationBar: const Text(bottomNavigationBarLabel), bottomNavigationBar: const Text(bottomNavigationBarLabel),
floatingActionButton: const Text(floatingActionButtonLabel), floatingActionButton: const Text(floatingActionButtonLabel),
drawer: const Drawer(child:const Text(drawerLabel)), drawer: const Drawer(child:const Text(drawerLabel)),

View File

@ -16,7 +16,7 @@ void main() {
onStepTapped: (int i) { onStepTapped: (int i) {
index = i; index = i;
}, },
steps: <Step>[ steps: const <Step>[
const Step( const Step(
title: const Text('Step 1'), title: const Text('Step 1'),
content: const SizedBox( content: const SizedBox(
@ -46,7 +46,7 @@ void main() {
home: new Center( home: new Center(
child: new Material( child: new Material(
child: new Stepper( child: new Stepper(
steps: <Step>[ steps: const <Step>[
const Step( const Step(
title: const Text('Step 1'), title: const Text('Step 1'),
content: const SizedBox( content: const SizedBox(
@ -77,7 +77,7 @@ void main() {
child: new Material( child: new Material(
child: new Stepper( child: new Stepper(
currentStep: 1, currentStep: 1,
steps: <Step>[ steps: const <Step>[
const Step( const Step(
title: const Text('Step 1'), title: const Text('Step 1'),
content: const SizedBox( content: const SizedBox(
@ -114,7 +114,7 @@ void main() {
child: new Material( child: new Material(
child: new Stepper( child: new Stepper(
type: StepperType.horizontal, type: StepperType.horizontal,
steps: <Step>[ steps: const <Step>[
const Step( const Step(
title: const Text('Step 1'), title: const Text('Step 1'),
content: const SizedBox( content: const SizedBox(
@ -139,7 +139,7 @@ void main() {
home: new Material( home: new Material(
child: new Stepper( child: new Stepper(
type: StepperType.horizontal, type: StepperType.horizontal,
steps: <Step>[ steps: const <Step>[
const Step( const Step(
title: const Text('Step 1'), title: const Text('Step 1'),
content: const Text('A'), content: const Text('A'),
@ -163,7 +163,7 @@ void main() {
child: new Stepper( child: new Stepper(
currentStep: 1, currentStep: 1,
type: StepperType.horizontal, type: StepperType.horizontal,
steps: <Step>[ steps: const <Step>[
const Step( const Step(
title: const Text('Step 1'), title: const Text('Step 1'),
content: const Text('A'), content: const Text('A'),
@ -197,7 +197,7 @@ void main() {
onStepCancel: () { onStepCancel: () {
cancelPressed = true; cancelPressed = true;
}, },
steps: <Step>[ steps: const <Step>[
const Step( const Step(
title: const Text('Step 1'), title: const Text('Step 1'),
content: const SizedBox( content: const SizedBox(
@ -235,7 +235,7 @@ void main() {
onStepTapped: (int i) { onStepTapped: (int i) {
index = i; index = i;
}, },
steps: <Step>[ steps: const <Step>[
const Step( const Step(
title: const Text('Step 1'), title: const Text('Step 1'),
content: const SizedBox( content: const SizedBox(
@ -266,7 +266,7 @@ void main() {
new MaterialApp( new MaterialApp(
home: new Material( home: new Material(
child: new Stepper( child: new Stepper(
steps: <Step>[ steps: const <Step>[
const Step( const Step(
title: const Text('Step 1'), title: const Text('Step 1'),
content: const SizedBox( content: const SizedBox(
@ -303,7 +303,7 @@ void main() {
home: new Material( home: new Material(
child: new Stepper( child: new Stepper(
currentStep: 2, currentStep: 2,
steps: <Step>[ steps: const <Step>[
const Step( const Step(
title: const Text('Step 1'), title: const Text('Step 1'),
content: const SizedBox( content: const SizedBox(
@ -341,7 +341,7 @@ void main() {
home: new Center( home: new Center(
child: new Material( child: new Material(
child: new Stepper( child: new Stepper(
steps: <Step>[ steps: const <Step>[
const Step( const Step(
title: const Text('A'), title: const Text('A'),
state: StepState.complete, state: StepState.complete,
@ -374,7 +374,7 @@ void main() {
home: new Center( home: new Center(
child: new Material( child: new Material(
child: new Stepper( child: new Stepper(
steps: <Step>[ steps: const <Step>[
const Step( const Step(
title: const Text('A'), title: const Text('A'),
state: StepState.error, state: StepState.error,

View File

@ -122,8 +122,8 @@ Widget buildLeftRightApp({ List<String> tabs, String value }) {
tabs: tabs.map((String tab) => new Tab(text: tab)).toList(), tabs: tabs.map((String tab) => new Tab(text: tab)).toList(),
), ),
), ),
body: new TabBarView( body: const TabBarView(
children: <Widget>[ children: const <Widget>[
const Center(child: const Text('LEFT CHILD')), const Center(child: const Text('LEFT CHILD')),
const Center(child: const Text('RIGHT CHILD')) const Center(child: const Text('RIGHT CHILD'))
] ]
@ -538,7 +538,7 @@ void main() {
), ),
body: new TabBarView( body: new TabBarView(
controller: controller, controller: controller,
children: <Widget>[ children: const <Widget>[
const Center(child: const Text('LEFT CHILD')), const Center(child: const Text('LEFT CHILD')),
const Center(child: const Text('RIGHT CHILD')) const Center(child: const Text('RIGHT CHILD'))
] ]
@ -597,7 +597,7 @@ void main() {
), ),
body: new TabBarView( body: new TabBarView(
controller: controller, controller: controller,
children: <Widget>[ children: const <Widget>[
const Center(child: const Text('CHILD A')), const Center(child: const Text('CHILD A')),
const Center(child: const Text('CHILD B')), const Center(child: const Text('CHILD B')),
const Center(child: const Text('CHILD C')), const Center(child: const Text('CHILD C')),
@ -690,7 +690,7 @@ void main() {
boilerplate( boilerplate(
child: new TabBarView( child: new TabBarView(
controller: controller, controller: controller,
children: <Widget>[ const Text('First'), const Text('Second') ], children: const <Widget>[ const Text('First'), const Text('Second') ],
), ),
), ),
); );
@ -789,7 +789,7 @@ void main() {
child: new TabBar( child: new TabBar(
key: new UniqueKey(), key: new UniqueKey(),
controller: controller, controller: controller,
tabs: <Widget>[ const Text('A'), const Text('B') ], tabs: const <Widget>[ const Text('A'), const Text('B') ],
), ),
); );
} }
@ -822,7 +822,7 @@ void main() {
height: 400.0, height: 400.0,
child: new TabBarView( child: new TabBarView(
controller: tabController, controller: tabController,
children: <Widget>[ children: const <Widget>[
const Center(child: const Text('0')), const Center(child: const Text('0')),
const Center(child: const Text('1')), const Center(child: const Text('1')),
const Center(child: const Text('2')), const Center(child: const Text('2')),
@ -870,7 +870,7 @@ void main() {
child: new TabBarView( child: new TabBarView(
controller: tabController, controller: tabController,
physics: const TestScrollPhysics(), physics: const TestScrollPhysics(),
children: <Widget>[ children: const <Widget>[
const Center(child: const Text('0')), const Center(child: const Text('0')),
const Center(child: const Text('1')), const Center(child: const Text('1')),
const Center(child: const Text('2')), const Center(child: const Text('2')),

View File

@ -128,7 +128,7 @@ void main() {
key: dropdownMenuButtonKey, key: dropdownMenuButtonKey,
onChanged: (String newValue) { }, onChanged: (String newValue) { },
value: 'menuItem', value: 'menuItem',
items: <DropdownMenuItem<String>>[ items: const <DropdownMenuItem<String>>[
const DropdownMenuItem<String>( const DropdownMenuItem<String>(
value: 'menuItem', value: 'menuItem',
child: const Text('menuItem'), child: const Text('menuItem'),

View File

@ -22,7 +22,7 @@ void main() {
new ExpansionTile( new ExpansionTile(
key: sublistKey, key: sublistKey,
title: const Text('Sublist'), title: const Text('Sublist'),
children: <Widget>[ children: const <Widget>[
const ListTile(title: const Text('0')), const ListTile(title: const Text('0')),
const ListTile(title: const Text('1')) const ListTile(title: const Text('1'))
] ]
@ -81,7 +81,7 @@ void main() {
onExpansionChanged: (bool opened) { onExpansionChanged: (bool opened) {
didChangeOpen = opened; didChangeOpen = opened;
}, },
children: <Widget>[ children: const <Widget>[
const ListTile(title: const Text('0')), const ListTile(title: const Text('0')),
const ListTile(title: const Text('1')) const ListTile(title: const Text('1'))
] ]
@ -110,11 +110,11 @@ void main() {
return new Material( return new Material(
child: new SingleChildScrollView( child: new SingleChildScrollView(
child: new Column( child: new Column(
children: <Widget>[ children: const <Widget>[
const ListTile(title: const Text('Top')), const ListTile(title: const Text('Top')),
new ExpansionTile( const ExpansionTile(
title: const Text('Sublist'), title: const Text('Sublist'),
children: <Widget>[ children: const <Widget>[
const ListTile(title: const Text('0')), const ListTile(title: const Text('0')),
const ListTile(title: const Text('1')) const ListTile(title: const Text('1'))
], ],

View File

@ -40,7 +40,7 @@ Future<Null> pumpTestWidget(WidgetTester tester, {
child: const Text('A'), child: const Text('A'),
), ),
), ),
otherAccountsPictures: <Widget>[ otherAccountsPictures: const <Widget>[
const CircleAvatar( const CircleAvatar(
child: const Text('B'), child: const Text('B'),
), ),

View File

@ -12,7 +12,7 @@ void main() {
await tester.pumpWidget( await tester.pumpWidget(
new Center( new Center(
child: new Column( child: new Column(
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 200.0, height: 200.0), const SizedBox(width: 200.0, height: 200.0),
], ],
), ),
@ -26,7 +26,7 @@ void main() {
child: new SizedBox( child: new SizedBox(
height: 100.0, height: 100.0,
child: new Column( child: new Column(
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 200.0, height: 200.0), const SizedBox(width: 200.0, height: 200.0),
], ],
), ),
@ -43,7 +43,7 @@ void main() {
child: new SizedBox( child: new SizedBox(
height: 0.0, height: 0.0,
child: new Column( child: new Column(
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 200.0, height: 200.0), const SizedBox(width: 200.0, height: 200.0),
], ],
), ),

View File

@ -11,7 +11,7 @@ const String kTitleString = 'Hello World';
Future<Null> pumpApp(WidgetTester tester, { GenerateAppTitle onGenerateTitle }) async { Future<Null> pumpApp(WidgetTester tester, { GenerateAppTitle onGenerateTitle }) async {
await tester.pumpWidget( await tester.pumpWidget(
new WidgetsApp( new WidgetsApp(
supportedLocales: <Locale>[ supportedLocales: const <Locale>[
const Locale('en', 'US'), const Locale('en', 'US'),
const Locale('en', 'GB'), const Locale('en', 'GB'),
], ],

View File

@ -221,7 +221,7 @@ void main() {
new AutomaticKeepAlive( new AutomaticKeepAlive(
child: new Container( child: new Container(
height: 400.0, height: 400.0,
child: new Stack(children: <Widget>[ child: new Stack(children: const <Widget>[
const Leaf(key: const GlobalObjectKey<_LeafState>(0), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(0), child: const Placeholder()),
const Leaf(key: const GlobalObjectKey<_LeafState>(1), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(1), child: const Placeholder()),
]), ]),
@ -297,7 +297,7 @@ void main() {
new AutomaticKeepAlive( new AutomaticKeepAlive(
child: new Container( child: new Container(
height: 400.0, height: 400.0,
child: new Stack(children: <Widget>[ child: new Stack(children: const <Widget>[
const Leaf(key: const GlobalObjectKey<_LeafState>(0), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(0), child: const Placeholder()),
const Leaf(key: const GlobalObjectKey<_LeafState>(1), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(1), child: const Placeholder()),
]), ]),
@ -306,7 +306,7 @@ void main() {
new AutomaticKeepAlive( new AutomaticKeepAlive(
child: new Container( child: new Container(
height: 400.0, height: 400.0,
child: new Stack(children: <Widget>[ child: new Stack(children: const <Widget>[
const Leaf(key: const GlobalObjectKey<_LeafState>(2), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(2), child: const Placeholder()),
const Leaf(key: const GlobalObjectKey<_LeafState>(3), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(3), child: const Placeholder()),
]), ]),
@ -315,7 +315,7 @@ void main() {
new AutomaticKeepAlive( new AutomaticKeepAlive(
child: new Container( child: new Container(
height: 400.0, height: 400.0,
child: new Stack(children: <Widget>[ child: new Stack(children: const <Widget>[
const Leaf(key: const GlobalObjectKey<_LeafState>(4), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(4), child: const Placeholder()),
const Leaf(key: const GlobalObjectKey<_LeafState>(5), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(5), child: const Placeholder()),
]), ]),
@ -349,7 +349,7 @@ void main() {
new AutomaticKeepAlive( new AutomaticKeepAlive(
child: new Container( child: new Container(
height: 400.0, height: 400.0,
child: new Stack(children: <Widget>[ child: new Stack(children: const <Widget>[
const Leaf(key: const GlobalObjectKey<_LeafState>(1), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(1), child: const Placeholder()),
]), ]),
), ),
@ -357,7 +357,7 @@ void main() {
new AutomaticKeepAlive( new AutomaticKeepAlive(
child: new Container( child: new Container(
height: 400.0, height: 400.0,
child: new Stack(children: <Widget>[ child: new Stack(children: const <Widget>[
const Leaf(key: const GlobalObjectKey<_LeafState>(2), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(2), child: const Placeholder()),
const Leaf(key: const GlobalObjectKey<_LeafState>(3), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(3), child: const Placeholder()),
]), ]),
@ -366,7 +366,7 @@ void main() {
new AutomaticKeepAlive( new AutomaticKeepAlive(
child: new Container( child: new Container(
height: 400.0, height: 400.0,
child: new Stack(children: <Widget>[ child: new Stack(children: const <Widget>[
const Leaf(key: const GlobalObjectKey<_LeafState>(4), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(4), child: const Placeholder()),
const Leaf(key: const GlobalObjectKey<_LeafState>(5), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(5), child: const Placeholder()),
const Leaf(key: const GlobalObjectKey<_LeafState>(0), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(0), child: const Placeholder()),
@ -408,7 +408,7 @@ void main() {
new AutomaticKeepAlive( new AutomaticKeepAlive(
child: new Container( child: new Container(
height: 400.0, height: 400.0,
child: new Stack(children: <Widget>[ child: new Stack(children: const <Widget>[
const Leaf(key: const GlobalObjectKey<_LeafState>(1), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(1), child: const Placeholder()),
const Leaf(key: const GlobalObjectKey<_LeafState>(2), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(2), child: const Placeholder()),
]), ]),
@ -417,14 +417,14 @@ void main() {
new AutomaticKeepAlive( new AutomaticKeepAlive(
child: new Container( child: new Container(
height: 400.0, height: 400.0,
child: new Stack(children: <Widget>[ child: new Stack(children: const <Widget>[
]), ]),
), ),
), ),
new AutomaticKeepAlive( new AutomaticKeepAlive(
child: new Container( child: new Container(
height: 400.0, height: 400.0,
child: new Stack(children: <Widget>[ child: new Stack(children: const <Widget>[
const Leaf(key: const GlobalObjectKey<_LeafState>(3), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(3), child: const Placeholder()),
const Leaf(key: const GlobalObjectKey<_LeafState>(4), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(4), child: const Placeholder()),
const Leaf(key: const GlobalObjectKey<_LeafState>(5), child: const Placeholder()), const Leaf(key: const GlobalObjectKey<_LeafState>(5), child: const Placeholder()),

View File

@ -21,7 +21,7 @@ void main() {
await tester.pumpWidget( await tester.pumpWidget(
new Row( new Row(
children: <Widget>[ children: const <Widget>[
const SliverList( const SliverList(
delegate: const SliverChildListDelegate(const <Widget>[]), delegate: const SliverChildListDelegate(const <Widget>[]),
), ),
@ -37,7 +37,7 @@ void main() {
new Viewport( new Viewport(
crossAxisDirection: AxisDirection.right, crossAxisDirection: AxisDirection.right,
offset: new ViewportOffset.zero(), offset: new ViewportOffset.zero(),
slivers: <Widget>[ slivers: const <Widget>[
const SizedBox(), const SizedBox(),
], ],
), ),
@ -49,7 +49,7 @@ void main() {
new Viewport( new Viewport(
crossAxisDirection: AxisDirection.right, crossAxisDirection: AxisDirection.right,
offset: new ViewportOffset.zero(), offset: new ViewportOffset.zero(),
slivers: <Widget>[ slivers: const <Widget>[
const SliverPadding( const SliverPadding(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
sliver: const SizedBox(), sliver: const SizedBox(),

View File

@ -10,7 +10,7 @@ void main() {
await tester.pumpWidget( await tester.pumpWidget(
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new ListView(children: <Widget>[const Center()]) child: new ListView(children: const <Widget>[const Center()])
), ),
); );
}); });

View File

@ -518,7 +518,7 @@ void main() {
width: 100.0, width: 100.0,
height: 1000.0, height: 1000.0,
child: new Column( child: new Column(
children: <Widget>[ children: const <Widget>[
const Test1215DismissibleWidget('1'), const Test1215DismissibleWidget('1'),
const Test1215DismissibleWidget('2'), const Test1215DismissibleWidget('2'),
], ],

View File

@ -1224,7 +1224,7 @@ void main() {
await tester.pumpWidget(new MaterialApp( await tester.pumpWidget(new MaterialApp(
home: new Column( home: new Column(
children: <Widget>[ children: const <Widget>[
const Draggable<int>( const Draggable<int>(
data: 1, data: 1,
child: const Text('Source'), child: const Text('Source'),

View File

@ -51,7 +51,7 @@ void main() {
await tester.pumpWidget( await tester.pumpWidget(
new Row( new Row(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const Flexible(child: const SizedBox(width: 100.0, height: 200.0)), const Flexible(child: const SizedBox(width: 100.0, height: 200.0)),
], ],
), ),
@ -65,7 +65,7 @@ void main() {
await tester.pumpWidget( await tester.pumpWidget(
new Row( new Row(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const Expanded(flex: null, child: const Text('one', textDirection: TextDirection.ltr)), const Expanded(flex: null, child: const Text('one', textDirection: TextDirection.ltr)),
const Flexible(flex: null, child: const Text('two', textDirection: TextDirection.ltr)), const Flexible(flex: null, child: const Text('two', textDirection: TextDirection.ltr)),
], ],

View File

@ -58,7 +58,7 @@ void main() {
testWidgets('Can have multiple focused children and they update accordingly', (WidgetTester tester) async { testWidgets('Can have multiple focused children and they update accordingly', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
new Column( new Column(
children: <Widget>[ children: const <Widget>[
const TestFocusable( const TestFocusable(
no: 'a', no: 'a',
yes: 'A FOCUSED', yes: 'A FOCUSED',
@ -146,7 +146,7 @@ void main() {
autofocus: true, autofocus: true,
child: new Row( child: new Row(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const TestFocusable( const TestFocusable(
no: 'a', no: 'a',
yes: 'A FOCUSED', yes: 'A FOCUSED',
@ -221,7 +221,7 @@ void main() {
node: parentFocusScope, node: parentFocusScope,
child: new Row( child: new Row(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const TestFocusable( const TestFocusable(
no: 'a', no: 'a',
yes: 'A FOCUSED', yes: 'A FOCUSED',

View File

@ -22,7 +22,7 @@ void main() {
}); });
await tester.pumpWidget(new Image.network( await tester.pumpWidget(new Image.network(
'https://www.example.com/images/frame.png', 'https://www.example.com/images/frame.png',
headers: <String, String>{'flutter': 'flutter'}, headers: const <String, String>{'flutter': 'flutter'},
)); ));
}); });
} }

View File

@ -22,7 +22,7 @@ void main() {
container: true, container: true,
explicitChildNodes: false, explicitChildNodes: false,
child: new Column( child: new Column(
children: <Widget>[ children: const <Widget>[
const Text('Michael Goderbauer'), const Text('Michael Goderbauer'),
const Text('goderbauer@google.com'), const Text('goderbauer@google.com'),
], ],
@ -56,7 +56,7 @@ void main() {
container: true, container: true,
explicitChildNodes: true, explicitChildNodes: true,
child: new Column( child: new Column(
children: <Widget>[ children: const <Widget>[
const Text('Michael Goderbauer'), const Text('Michael Goderbauer'),
const Text('goderbauer@google.com'), const Text('goderbauer@google.com'),
], ],
@ -103,7 +103,7 @@ void main() {
child: new Semantics( child: new Semantics(
label: 'Signed in as', label: 'Signed in as',
child: new Column( child: new Column(
children: <Widget>[ children: const <Widget>[
const Text('Michael Goderbauer'), const Text('Michael Goderbauer'),
const Text('goderbauer@google.com'), const Text('goderbauer@google.com'),
], ],
@ -146,7 +146,7 @@ void main() {
child: new Semantics( child: new Semantics(
label: 'Signed in as', label: 'Signed in as',
child: new Column( child: new Column(
children: <Widget>[ children: const <Widget>[
const Text('Michael Goderbauer'), const Text('Michael Goderbauer'),
const Text('goderbauer@google.com'), const Text('goderbauer@google.com'),
], ],

View File

@ -120,7 +120,7 @@ void main() {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new ListView( child: new ListView(
controller: controller, controller: controller,
children: <Widget>[const Text('A'), const Text('B'), const Text('C')], children: const <Widget>[const Text('A'), const Text('B'), const Text('C')],
), ),
); );
} }
@ -178,7 +178,7 @@ void main() {
new Flexible( new Flexible(
// The overall height of the ListView's contents is 500 // The overall height of the ListView's contents is 500
child: new ListView( child: new ListView(
children: <Widget>[ children: const <Widget>[
const SizedBox( const SizedBox(
height: 150.0, height: 150.0,
child: const Center( child: const Center(

View File

@ -16,7 +16,7 @@ void main() {
children: <Widget>[ children: <Widget>[
new ListView( new ListView(
shrinkWrap: true, shrinkWrap: true,
children: <Widget>[ children: const <Widget>[
const Text('1'), const Text('1'),
const Text('2'), const Text('2'),
const Text('3'), const Text('3'),
@ -24,7 +24,7 @@ void main() {
), ),
new ListView( new ListView(
shrinkWrap: true, shrinkWrap: true,
children: <Widget>[ children: const <Widget>[
const Text('4'), const Text('4'),
const Text('5'), const Text('5'),
const Text('6'), const Text('6'),
@ -43,7 +43,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new ListView( child: new ListView(
children: <Widget>[ children: const <Widget>[
const SizedBox(height: 100.0, child: const Text('100')), const SizedBox(height: 100.0, child: const Text('100')),
], ],
), ),
@ -54,7 +54,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new ListView( child: new ListView(
children: <Widget>[ children: const <Widget>[
const SizedBox(height: 100.0, child: const Text('100')), const SizedBox(height: 100.0, child: const Text('100')),
const SizedBox(height: 200.0, child: const Text('200')), const SizedBox(height: 200.0, child: const Text('200')),
], ],
@ -70,7 +70,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new ListView( child: new ListView(
children: <Widget>[ children: const <Widget>[
const SizedBox(height: 100.0, child: const Text('100')), const SizedBox(height: 100.0, child: const Text('100')),
], ],
), ),
@ -84,7 +84,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new ListView( child: new ListView(
children: <Widget>[ children: const <Widget>[
const SizedBox(height: 100.0, child: const Text('100')), const SizedBox(height: 100.0, child: const Text('100')),
const SizedBox(height: 200.0, child: const Text('200')), const SizedBox(height: 200.0, child: const Text('200')),
], ],
@ -97,7 +97,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new ListView( child: new ListView(
children: <Widget>[] children: const <Widget>[]
), ),
), ),
); );
@ -109,7 +109,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new ListView( child: new ListView(
children: <Widget>[ children: const <Widget>[
const SizedBox(height: 300.0, child: const Text('300')), const SizedBox(height: 300.0, child: const Text('300')),
const SizedBox(height: 400.0, child: const Text('400')), const SizedBox(height: 400.0, child: const Text('400')),
], ],
@ -124,7 +124,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new ListView( child: new ListView(
children: <Widget>[ children: const <Widget>[
const SizedBox(height: 300.0, child: const Text('300')), const SizedBox(height: 300.0, child: const Text('300')),
], ],
), ),
@ -138,7 +138,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new ListView( child: new ListView(
children: <Widget>[] children: const <Widget>[]
), ),
), ),
); );
@ -152,7 +152,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new ListView( child: new ListView(
children: <Widget>[ children: const <Widget>[
const SizedBox(height: 300.0, child: const Text('300')), const SizedBox(height: 300.0, child: const Text('300')),
const SizedBox(height: 400.0, child: const Text('400')), const SizedBox(height: 400.0, child: const Text('400')),
], ],
@ -167,7 +167,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new ListView( child: new ListView(
children: <Widget>[ children: const <Widget>[
const SizedBox(height: 300.0, child: const Text('300')), const SizedBox(height: 300.0, child: const Text('300')),
const SizedBox(height: 400.0, child: const Text('400')), const SizedBox(height: 400.0, child: const Text('400')),
const SizedBox(height: 100.0, child: const Text('100')), const SizedBox(height: 100.0, child: const Text('100')),
@ -191,7 +191,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new ListView( child: new ListView(
children: <Widget>[ children: const <Widget>[
const SizedBox(height: 100.0, child: const Text('100')), const SizedBox(height: 100.0, child: const Text('100')),
], ],
), ),
@ -205,7 +205,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new ListView( child: new ListView(
children: <Widget>[ children: const <Widget>[
const SizedBox(height: 100.0, child: const Text('100')), const SizedBox(height: 100.0, child: const Text('100')),
const SizedBox(height: 200.0, child: const Text('200')), const SizedBox(height: 200.0, child: const Text('200')),
const SizedBox(height: 400.0, child: const Text('400')), const SizedBox(height: 400.0, child: const Text('400')),

View File

@ -188,7 +188,7 @@ void main() {
height: 0.0, height: 0.0,
child: new ListView( child: new ListView(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
children: <Widget>[ children: const <Widget>[
const Text('padded', textDirection: TextDirection.ltr), const Text('padded', textDirection: TextDirection.ltr),
], ],
), ),

View File

@ -27,7 +27,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new CustomScrollView( child: new CustomScrollView(
slivers: <Widget>[ slivers: const <Widget>[
const SliverToBoxAdapter(child: const SizedBox(height: 2000.0)), const SliverToBoxAdapter(child: const SizedBox(height: 2000.0)),
], ],
), ),
@ -57,7 +57,7 @@ void main() {
await tester.pumpAndSettle(const Duration(seconds: 1)); await tester.pumpAndSettle(const Duration(seconds: 1));
expect(painter, doesNotOverscroll); expect(painter, doesNotOverscroll);
}); });
testWidgets('Nested scrollable', (WidgetTester tester) async { testWidgets('Nested scrollable', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
new Directionality( new Directionality(
@ -71,7 +71,7 @@ void main() {
child: new Container( child: new Container(
width: 600.0, width: 600.0,
child: new CustomScrollView( child: new CustomScrollView(
slivers: <Widget>[ slivers: const <Widget>[
const SliverToBoxAdapter(child: const SizedBox(height: 2000.0)), const SliverToBoxAdapter(child: const SizedBox(height: 2000.0)),
], ],
), ),
@ -80,21 +80,21 @@ void main() {
), ),
), ),
); );
final RenderObject outerPainter = tester.renderObject(find.byType(CustomPaint).first); final RenderObject outerPainter = tester.renderObject(find.byType(CustomPaint).first);
final RenderObject innerPainter = tester.renderObject(find.byType(CustomPaint).last); final RenderObject innerPainter = tester.renderObject(find.byType(CustomPaint).last);
await slowDrag(tester, const Offset(200.0, 200.0), const Offset(0.0, 5.0)); await slowDrag(tester, const Offset(200.0, 200.0), const Offset(0.0, 5.0));
expect(outerPainter, paints..circle()); expect(outerPainter, paints..circle());
expect(innerPainter, paints..circle()); expect(innerPainter, paints..circle());
}); });
testWidgets('Overscroll indicator changes side when you drag on the other side', (WidgetTester tester) async { testWidgets('Overscroll indicator changes side when you drag on the other side', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new CustomScrollView( child: new CustomScrollView(
slivers: <Widget>[ slivers: const <Widget>[
const SliverToBoxAdapter(child: const SizedBox(height: 2000.0)), const SliverToBoxAdapter(child: const SizedBox(height: 2000.0)),
], ],
), ),
@ -132,7 +132,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new CustomScrollView( child: new CustomScrollView(
slivers: <Widget>[ slivers: const <Widget>[
const SliverToBoxAdapter(child: const SizedBox(height: 2000.0)), const SliverToBoxAdapter(child: const SizedBox(height: 2000.0)),
], ],
), ),
@ -169,7 +169,7 @@ void main() {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new CustomScrollView( child: new CustomScrollView(
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
slivers: <Widget>[ slivers: const <Widget>[
const SliverToBoxAdapter(child: const SizedBox(height: 20.0)), const SliverToBoxAdapter(child: const SizedBox(height: 20.0)),
], ],
), ),
@ -190,7 +190,7 @@ void main() {
child: new CustomScrollView( child: new CustomScrollView(
reverse: true, reverse: true,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
slivers: <Widget>[ slivers: const <Widget>[
const SliverToBoxAdapter(child: const SizedBox(height: 20.0)), const SliverToBoxAdapter(child: const SizedBox(height: 20.0)),
], ],
), ),
@ -211,7 +211,7 @@ void main() {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new CustomScrollView( child: new CustomScrollView(
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
slivers: <Widget>[ slivers: const <Widget>[
const SliverToBoxAdapter(child: const SizedBox(height: 20.0)), const SliverToBoxAdapter(child: const SizedBox(height: 20.0)),
], ],
), ),
@ -235,7 +235,7 @@ void main() {
child: new CustomScrollView( child: new CustomScrollView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
slivers: <Widget>[ slivers: const <Widget>[
const SliverToBoxAdapter(child: const SizedBox(height: 20.0)), const SliverToBoxAdapter(child: const SizedBox(height: 20.0)),
], ],
), ),
@ -287,7 +287,7 @@ void main() {
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
reverse: true, reverse: true,
slivers: <Widget>[ slivers: const <Widget>[
const SliverToBoxAdapter(child: const SizedBox(height: 20.0)), const SliverToBoxAdapter(child: const SizedBox(height: 20.0)),
], ],
), ),
@ -308,7 +308,7 @@ void main() {
child: new CustomScrollView( child: new CustomScrollView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
slivers: <Widget>[ slivers: const <Widget>[
const SliverToBoxAdapter(child: const SizedBox(height: 20.0)), const SliverToBoxAdapter(child: const SizedBox(height: 20.0)),
], ],
), ),

View File

@ -611,7 +611,7 @@ void main() {
child: new PageView( child: new PageView(
key: const PageStorageKey<String>('PageView'), key: const PageStorageKey<String>('PageView'),
controller: controller, controller: controller,
children: <Widget>[ children: const <Widget>[
const Placeholder(), const Placeholder(),
const Placeholder(), const Placeholder(),
const Placeholder(), const Placeholder(),
@ -645,7 +645,7 @@ void main() {
child: new PageView( child: new PageView(
key: const PageStorageKey<String>('PageView'), key: const PageStorageKey<String>('PageView'),
controller: controller, controller: controller,
children: <Widget>[ children: const <Widget>[
const Placeholder(), const Placeholder(),
const Placeholder(), const Placeholder(),
const Placeholder(), const Placeholder(),
@ -663,7 +663,7 @@ void main() {
child: new PageView( child: new PageView(
key: const PageStorageKey<String>('Check it again against your list and see consistency!'), key: const PageStorageKey<String>('Check it again against your list and see consistency!'),
controller: controller2, controller: controller2,
children: <Widget>[ children: const <Widget>[
const Placeholder(), const Placeholder(),
const Placeholder(), const Placeholder(),
const Placeholder(), const Placeholder(),

View File

@ -13,11 +13,11 @@ void main() {
expect(tester.renderObject<RenderBox>(find.byType(Placeholder)).size, const Size(800.0, 600.0)); expect(tester.renderObject<RenderBox>(find.byType(Placeholder)).size, const Size(800.0, 600.0));
await tester.pumpWidget(const Center(child: const Placeholder())); await tester.pumpWidget(const Center(child: const Placeholder()));
expect(tester.renderObject<RenderBox>(find.byType(Placeholder)).size, const Size(800.0, 600.0)); expect(tester.renderObject<RenderBox>(find.byType(Placeholder)).size, const Size(800.0, 600.0));
await tester.pumpWidget(new Stack(textDirection: TextDirection.ltr, children: <Widget>[const Positioned(top: 0.0, bottom: 0.0, child: const Placeholder())])); await tester.pumpWidget(new Stack(textDirection: TextDirection.ltr, children: const <Widget>[const Positioned(top: 0.0, bottom: 0.0, child: const Placeholder())]));
expect(tester.renderObject<RenderBox>(find.byType(Placeholder)).size, const Size(400.0, 600.0)); expect(tester.renderObject<RenderBox>(find.byType(Placeholder)).size, const Size(400.0, 600.0));
await tester.pumpWidget(new Stack(textDirection: TextDirection.ltr, children: <Widget>[const Positioned(left: 0.0, right: 0.0, child: const Placeholder())])); await tester.pumpWidget(new Stack(textDirection: TextDirection.ltr, children: const <Widget>[const Positioned(left: 0.0, right: 0.0, child: const Placeholder())]));
expect(tester.renderObject<RenderBox>(find.byType(Placeholder)).size, const Size(800.0, 400.0)); expect(tester.renderObject<RenderBox>(find.byType(Placeholder)).size, const Size(800.0, 400.0));
await tester.pumpWidget(new Stack(textDirection: TextDirection.ltr, children: <Widget>[const Positioned(top: 0.0, child: const Placeholder(fallbackWidth: 200.0, fallbackHeight: 300.0))])); await tester.pumpWidget(new Stack(textDirection: TextDirection.ltr, children: const <Widget>[const Positioned(top: 0.0, child: const Placeholder(fallbackWidth: 200.0, fallbackHeight: 300.0))]));
expect(tester.renderObject<RenderBox>(find.byType(Placeholder)).size, const Size(200.0, 300.0)); expect(tester.renderObject<RenderBox>(find.byType(Placeholder)).size, const Size(200.0, 300.0));
}); });

View File

@ -346,7 +346,7 @@ void main() {
onNotification: (OverscrollNotification message) { scrolled = true; return false; }, onNotification: (OverscrollNotification message) { scrolled = true; return false; },
child: new ListView( child: new ListView(
primary: true, primary: true,
children: <Widget>[], children: const <Widget>[],
), ),
), ),
), ),
@ -364,7 +364,7 @@ void main() {
onNotification: (OverscrollNotification message) { scrolled = true; return false; }, onNotification: (OverscrollNotification message) { scrolled = true; return false; },
child: new ListView( child: new ListView(
primary: false, primary: false,
children: <Widget>[], children: const <Widget>[],
), ),
), ),
), ),
@ -383,7 +383,7 @@ void main() {
child: new ListView( child: new ListView(
primary: false, primary: false,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
children: <Widget>[], children: const <Widget>[],
), ),
), ),
), ),
@ -402,7 +402,7 @@ void main() {
child: new ListView( child: new ListView(
primary: true, primary: true,
physics: const ScrollPhysics(), physics: const ScrollPhysics(),
children: <Widget>[], children: const <Widget>[],
), ),
), ),
), ),

View File

@ -12,7 +12,7 @@ Future<Null> pumpTest(WidgetTester tester, TargetPlatform platform) async {
platform: platform, platform: platform,
), ),
home: new CustomScrollView( home: new CustomScrollView(
slivers: <Widget>[ slivers: const <Widget>[
const SliverToBoxAdapter(child: const SizedBox(height: 2000.0)), const SliverToBoxAdapter(child: const SizedBox(height: 2000.0)),
], ],
), ),

View File

@ -8,11 +8,11 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
Shader createShader(Rect bounds) { Shader createShader(Rect bounds) {
return new LinearGradient( return const LinearGradient(
begin: Alignment.topCenter, begin: Alignment.topCenter,
end: Alignment.bottomCenter, end: Alignment.bottomCenter,
colors: <Color>[const Color(0x00FFFFFF), const Color(0xFFFFFFFF)], colors: const <Color>[const Color(0x00FFFFFF), const Color(0xFFFFFFFF)],
stops: <double>[0.1, 0.35] stops: const <double>[0.1, 0.35]
).createShader(bounds); ).createShader(bounds);
} }

View File

@ -195,7 +195,7 @@ void main() {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Viewport( child: new Viewport(
offset: new ViewportOffset.zero(), offset: new ViewportOffset.zero(),
slivers: <Widget>[ slivers: const <Widget>[
const SliverToBoxAdapter( const SliverToBoxAdapter(
child: const SizedBox(height: 400.0, child: const Text('a')), child: const SizedBox(height: 400.0, child: const Text('a')),
), ),
@ -211,7 +211,7 @@ void main() {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Viewport( child: new Viewport(
offset: new ViewportOffset.fixed(100.0), offset: new ViewportOffset.fixed(100.0),
slivers: <Widget>[ slivers: const <Widget>[
const SliverToBoxAdapter( const SliverToBoxAdapter(
child: const SizedBox(height: 400.0, child: const Text('a')), child: const SizedBox(height: 400.0, child: const Text('a')),
), ),
@ -227,7 +227,7 @@ void main() {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Viewport( child: new Viewport(
offset: new ViewportOffset.fixed(100.0), offset: new ViewportOffset.fixed(100.0),
slivers: <Widget>[ slivers: const <Widget>[
const SliverToBoxAdapter( const SliverToBoxAdapter(
child: const SizedBox(height: 4000.0, child: const Text('a')), child: const SizedBox(height: 4000.0, child: const Text('a')),
), ),
@ -243,7 +243,7 @@ void main() {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Viewport( child: new Viewport(
offset: new ViewportOffset.zero(), offset: new ViewportOffset.zero(),
slivers: <Widget>[ slivers: const <Widget>[
const SliverToBoxAdapter( const SliverToBoxAdapter(
child: const SizedBox(height: 4000.0, child: const Text('a')), child: const SizedBox(height: 4000.0, child: const Text('a')),
), ),

View File

@ -249,7 +249,7 @@ void main() {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Viewport( child: new Viewport(
offset: new ViewportOffset.fixed(0.0), offset: new ViewportOffset.fixed(0.0),
slivers: <Widget>[ slivers: const <Widget>[
const SliverPadding(padding: const EdgeInsets.all(100.0)), const SliverPadding(padding: const EdgeInsets.all(100.0)),
const SliverToBoxAdapter(child: const SizedBox(width: 400.0, height: 400.0, child: const Text('x'))), const SliverToBoxAdapter(child: const SizedBox(width: 400.0, height: 400.0, child: const Text('x'))),
], ],
@ -266,7 +266,7 @@ void main() {
child: new Viewport( child: new Viewport(
axisDirection: AxisDirection.left, axisDirection: AxisDirection.left,
offset: new ViewportOffset.fixed(0.0), offset: new ViewportOffset.fixed(0.0),
slivers: <Widget>[ slivers: const <Widget>[
const SliverPadding(padding: const EdgeInsets.fromLTRB(90.0, 1.0, 110.0, 2.0)), const SliverPadding(padding: const EdgeInsets.fromLTRB(90.0, 1.0, 110.0, 2.0)),
const SliverToBoxAdapter(child: const SizedBox(width: 201.0, child: const Text('x'))), const SliverToBoxAdapter(child: const SizedBox(width: 201.0, child: const Text('x'))),
], ],
@ -280,7 +280,7 @@ void main() {
child: new Viewport( child: new Viewport(
axisDirection: AxisDirection.left, axisDirection: AxisDirection.left,
offset: new ViewportOffset.fixed(0.0), offset: new ViewportOffset.fixed(0.0),
slivers: <Widget>[ slivers: const <Widget>[
const SliverPadding(padding: const EdgeInsets.fromLTRB(110.0, 1.0, 80.0, 2.0)), const SliverPadding(padding: const EdgeInsets.fromLTRB(110.0, 1.0, 80.0, 2.0)),
const SliverToBoxAdapter(child: const SizedBox(width: 201.0, child: const Text('x'))), const SliverToBoxAdapter(child: const SizedBox(width: 201.0, child: const Text('x'))),
], ],
@ -297,7 +297,7 @@ void main() {
child: new Viewport( child: new Viewport(
axisDirection: AxisDirection.up, axisDirection: AxisDirection.up,
offset: new ViewportOffset.fixed(0.0), offset: new ViewportOffset.fixed(0.0),
slivers: <Widget>[ slivers: const <Widget>[
const SliverPadding(padding: const EdgeInsets.fromLTRB(1.0, 2.0, 4.0, 8.0)), const SliverPadding(padding: const EdgeInsets.fromLTRB(1.0, 2.0, 4.0, 8.0)),
], ],
), ),
@ -310,7 +310,7 @@ void main() {
child: new Viewport( child: new Viewport(
axisDirection: AxisDirection.down, axisDirection: AxisDirection.down,
offset: new ViewportOffset.fixed(0.0), offset: new ViewportOffset.fixed(0.0),
slivers: <Widget>[ slivers: const <Widget>[
const SliverPadding(padding: const EdgeInsets.fromLTRB(1.0, 2.0, 4.0, 8.0)), const SliverPadding(padding: const EdgeInsets.fromLTRB(1.0, 2.0, 4.0, 8.0)),
], ],
), ),
@ -323,7 +323,7 @@ void main() {
child: new Viewport( child: new Viewport(
axisDirection: AxisDirection.right, axisDirection: AxisDirection.right,
offset: new ViewportOffset.fixed(0.0), offset: new ViewportOffset.fixed(0.0),
slivers: <Widget>[ slivers: const <Widget>[
const SliverPadding(padding: const EdgeInsets.fromLTRB(1.0, 2.0, 4.0, 8.0)), const SliverPadding(padding: const EdgeInsets.fromLTRB(1.0, 2.0, 4.0, 8.0)),
], ],
), ),
@ -336,7 +336,7 @@ void main() {
child: new Viewport( child: new Viewport(
axisDirection: AxisDirection.left, axisDirection: AxisDirection.left,
offset: new ViewportOffset.fixed(0.0), offset: new ViewportOffset.fixed(0.0),
slivers: <Widget>[ slivers: const <Widget>[
const SliverPadding(padding: const EdgeInsets.fromLTRB(1.0, 2.0, 4.0, 8.0)), const SliverPadding(padding: const EdgeInsets.fromLTRB(1.0, 2.0, 4.0, 8.0)),
], ],
), ),
@ -349,7 +349,7 @@ void main() {
child: new Viewport( child: new Viewport(
axisDirection: AxisDirection.left, axisDirection: AxisDirection.left,
offset: new ViewportOffset.fixed(99999.9), offset: new ViewportOffset.fixed(99999.9),
slivers: <Widget>[ slivers: const <Widget>[
const SliverPadding(padding: const EdgeInsets.fromLTRB(1.0, 2.0, 4.0, 8.0)), const SliverPadding(padding: const EdgeInsets.fromLTRB(1.0, 2.0, 4.0, 8.0)),
], ],
), ),

View File

@ -13,7 +13,7 @@ Future<Null> test(WidgetTester tester, double offset, { double anchor: 0.0 }) {
child: new Viewport( child: new Viewport(
anchor: anchor / 600.0, anchor: anchor / 600.0,
offset: new ViewportOffset.fixed(offset), offset: new ViewportOffset.fixed(offset),
slivers: <Widget>[ slivers: const <Widget>[
const SliverToBoxAdapter(child: const SizedBox(height: 400.0)), const SliverToBoxAdapter(child: const SizedBox(height: 400.0)),
const SliverToBoxAdapter(child: const SizedBox(height: 400.0)), const SliverToBoxAdapter(child: const SizedBox(height: 400.0)),
const SliverToBoxAdapter(child: const SizedBox(height: 400.0)), const SliverToBoxAdapter(child: const SizedBox(height: 400.0)),

View File

@ -636,7 +636,7 @@ void main() {
textDirection: TextDirection.rtl, textDirection: TextDirection.rtl,
child: new Stack( child: new Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 100.0), const SizedBox(width: 100.0, height: 100.0),
const Positioned(left: 0.0, child: const SizedBox(width: 100.0, height: 100.0)), const Positioned(left: 0.0, child: const SizedBox(width: 100.0, height: 100.0)),
const Positioned(right: 0.0, child: const SizedBox(width: 100.0, height: 100.0)), const Positioned(right: 0.0, child: const SizedBox(width: 100.0, height: 100.0)),
@ -665,7 +665,7 @@ void main() {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Stack( child: new Stack(
alignment: Alignment.center, alignment: Alignment.center,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 100.0), const SizedBox(width: 100.0, height: 100.0),
const Positioned(left: 0.0, child: const SizedBox(width: 100.0, height: 100.0)), const Positioned(left: 0.0, child: const SizedBox(width: 100.0, height: 100.0)),
const Positioned(right: 0.0, child: const SizedBox(width: 100.0, height: 100.0)), const Positioned(right: 0.0, child: const SizedBox(width: 100.0, height: 100.0)),
@ -694,7 +694,7 @@ void main() {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Stack( child: new Stack(
alignment: Alignment.bottomRight, alignment: Alignment.bottomRight,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 100.0), const SizedBox(width: 100.0, height: 100.0),
const Positioned(left: 0.0, child: const SizedBox(width: 100.0, height: 100.0)), const Positioned(left: 0.0, child: const SizedBox(width: 100.0, height: 100.0)),
const Positioned(right: 0.0, child: const SizedBox(width: 100.0, height: 100.0)), const Positioned(right: 0.0, child: const SizedBox(width: 100.0, height: 100.0)),
@ -723,7 +723,7 @@ void main() {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Stack( child: new Stack(
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 100.0), const SizedBox(width: 100.0, height: 100.0),
const Positioned(left: 0.0, child: const SizedBox(width: 100.0, height: 100.0)), const Positioned(left: 0.0, child: const SizedBox(width: 100.0, height: 100.0)),
const Positioned(right: 0.0, child: const SizedBox(width: 100.0, height: 100.0)), const Positioned(right: 0.0, child: const SizedBox(width: 100.0, height: 100.0)),

View File

@ -25,19 +25,19 @@ void main() {
new Directionality( new Directionality(
textDirection: textDirection, textDirection: textDirection,
child: new Table( child: new Table(
children: <TableRow>[ children: const <TableRow>[
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('AAAAAA'), const Text('B'), const Text('C'), const Text('AAAAAA'), const Text('B'), const Text('C'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('D'), const Text('EEE'), const Text('F'), const Text('D'), const Text('EEE'), const Text('F'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('G'), const Text('H'), const Text('III'), const Text('G'), const Text('H'), const Text('III'),
], ],
), ),
@ -71,19 +71,19 @@ void main() {
2: const FixedColumnWidth(125.0), 2: const FixedColumnWidth(125.0),
}, },
defaultColumnWidth: const FixedColumnWidth(333.0), defaultColumnWidth: const FixedColumnWidth(333.0),
children: <TableRow>[ children: const <TableRow>[
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('A1'), const Text('B1'), const Text('C1'), const Text('A1'), const Text('B1'), const Text('C1'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('A2'), const Text('B2'), const Text('C2'), const Text('A2'), const Text('B2'), const Text('C2'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('A3'), const Text('B3'), const Text('C3'), const Text('A3'), const Text('B3'), const Text('C3'),
], ],
), ),
@ -141,19 +141,19 @@ void main() {
2: const FixedColumnWidth(125.0), 2: const FixedColumnWidth(125.0),
}, },
defaultColumnWidth: const FixedColumnWidth(333.0), defaultColumnWidth: const FixedColumnWidth(333.0),
children: <TableRow>[ children: const <TableRow>[
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('A1'), const Text('B1'), const Text('C1'), const Text('A1'), const Text('B1'), const Text('C1'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('A2'), const Text('B2'), const Text('C2'), const Text('A2'), const Text('B2'), const Text('C2'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('A3'), const Text('B3'), const Text('C3'), const Text('A3'), const Text('B3'), const Text('C3'),
], ],
), ),
@ -206,19 +206,19 @@ void main() {
textDirection: textDirection, textDirection: textDirection,
child: new Table( child: new Table(
border: new TableBorder.all(), border: new TableBorder.all(),
children: <TableRow>[ children: const <TableRow>[
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('AAAAAA'), const Text('B'), const Text('C'), const Text('AAAAAA'), const Text('B'), const Text('C'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('D'), const Text('EEE'), const Text('F'), const Text('D'), const Text('EEE'), const Text('F'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('G'), const Text('H'), const Text('III'), const Text('G'), const Text('H'), const Text('III'),
], ],
), ),
@ -238,19 +238,19 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Table( child: new Table(
children: <TableRow>[ children: const <TableRow>[
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('A'), const Text('B'), const Text('C'), const Text('A'), const Text('B'), const Text('C'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('D'), const Text('E'), const Text('F'), const Text('D'), const Text('E'), const Text('F'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('G'), const Text('H'), const Text('I'), const Text('G'), const Text('H'), const Text('I'),
], ],
), ),
@ -266,14 +266,14 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Table( child: new Table(
children: <TableRow>[ children: const <TableRow>[
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('a'), const Text('b'), const Text('c'), const Text('d'), const Text('a'), const Text('b'), const Text('c'), const Text('d'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('e'), const Text('f'), const Text('g'), const Text('h'), const Text('e'), const Text('f'), const Text('g'), const Text('h'),
], ],
), ),
@ -294,19 +294,19 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Table( child: new Table(
children: <TableRow>[ children: const <TableRow>[
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('AAAAAA'), const Text('B'), const Text('C'), const Text('AAAAAA'), const Text('B'), const Text('C'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('D'), const Text('EEE'), const Text('F'), const Text('D'), const Text('EEE'), const Text('F'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('G'), const Text('H'), const Text('III'), const Text('G'), const Text('H'), const Text('III'),
], ],
), ),
@ -318,19 +318,19 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Table( child: new Table(
children: <TableRow>[ children: const <TableRow>[
new TableRow( const TableRow(
children: <Widget>[ children: const<Widget>[
const Text('AAA'), const Text('B'), const Text('C'), const Text('AAA'), const Text('B'), const Text('C'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('D'), const Text('E'), const Text('FFFFFF'), const Text('D'), const Text('E'), const Text('FFFFFF'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('G'), const Text('H'), const Text('III'), const Text('G'), const Text('H'), const Text('III'),
], ],
), ),
@ -353,19 +353,19 @@ void main() {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Table( child: new Table(
defaultColumnWidth: const IntrinsicColumnWidth(), defaultColumnWidth: const IntrinsicColumnWidth(),
children: <TableRow>[ children: const <TableRow>[
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('AAA'), const Text('B'), const Text('C'), const Text('AAA'), const Text('B'), const Text('C'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('D'), const Text('E'), const Text('FFFFFF'), const Text('D'), const Text('E'), const Text('FFFFFF'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('G'), const Text('H'), const Text('III'), const Text('G'), const Text('H'), const Text('III'),
], ],
), ),
@ -389,19 +389,19 @@ void main() {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Table( child: new Table(
defaultColumnWidth: const IntrinsicColumnWidth(), defaultColumnWidth: const IntrinsicColumnWidth(),
children: <TableRow>[ children: const <TableRow>[
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('AAAAAA'), const Text('B'), const Text('C'), const Text('AAAAAA'), const Text('B'), const Text('C'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('D'), const Text('EEE'), const Text('F'), const Text('D'), const Text('EEE'), const Text('F'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('G'), const Text('H'), const Text('III'), const Text('G'), const Text('H'), const Text('III'),
], ],
), ),
@ -414,19 +414,19 @@ void main() {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Table( child: new Table(
defaultColumnWidth: const IntrinsicColumnWidth(), defaultColumnWidth: const IntrinsicColumnWidth(),
children: <TableRow>[ children: const <TableRow>[
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('A'), const Text('B'), const Text('C'), const Text('A'), const Text('B'), const Text('C'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('D'), const Text('EEE'), const Text('F'), const Text('D'), const Text('EEE'), const Text('F'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('G'), const Text('H'), const Text('III'), const Text('G'), const Text('H'), const Text('III'),
], ],
), ),
@ -449,19 +449,19 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Table( child: new Table(
children: <TableRow>[ children: const <TableRow>[
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('AAA'), const Text('B'), const Text('C'), const Text('AAA'), const Text('B'), const Text('C'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('D'), const Text('E'), const Text('FFFFFF'), const Text('D'), const Text('E'), const Text('FFFFFF'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('G'), const Text('H'), const Text('III'), const Text('G'), const Text('H'), const Text('III'),
], ],
), ),
@ -474,19 +474,19 @@ void main() {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Table( child: new Table(
defaultColumnWidth: const IntrinsicColumnWidth(), defaultColumnWidth: const IntrinsicColumnWidth(),
children: <TableRow>[ children: const <TableRow>[
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('AAA'), const Text('B'), const Text('C'), const Text('AAA'), const Text('B'), const Text('C'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('D'), const Text('E'), const Text('FFFFFF'), const Text('D'), const Text('E'), const Text('FFFFFF'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('G'), const Text('H'), const Text('III'), const Text('G'), const Text('H'), const Text('III'),
], ],
), ),
@ -522,8 +522,8 @@ void main() {
), ),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('b'), const Text('b'),
], ],
), ),
@ -536,8 +536,8 @@ void main() {
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Table( child: new Table(
children: <TableRow>[ children: <TableRow>[
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('b'), const Text('b'),
], ],
), ),
@ -565,17 +565,17 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Table( child: new Table(
children: <TableRow>[ children: const <TableRow>[
new TableRow( const TableRow(
key: const ValueKey<int>(1), key: const ValueKey<int>(1),
children: <Widget>[ children: const <Widget>[
const TestStatefulWidget(key: const ValueKey<int>(11)), const TestStatefulWidget(key: const ValueKey<int>(11)),
const TestStatefulWidget(key: const ValueKey<int>(12)), const TestStatefulWidget(key: const ValueKey<int>(12)),
], ],
), ),
new TableRow( const TableRow(
key: const ValueKey<int>(2), key: const ValueKey<int>(2),
children: <Widget>[ children: const <Widget>[
const TestStatefulWidget(key: const ValueKey<int>(21)), const TestStatefulWidget(key: const ValueKey<int>(21)),
const TestStatefulWidget(key: const ValueKey<int>(22)), const TestStatefulWidget(key: const ValueKey<int>(22)),
], ],
@ -599,10 +599,10 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Table( child: new Table(
children: <TableRow>[ children: const <TableRow>[
new TableRow( const TableRow(
key: const ValueKey<int>(2), key: const ValueKey<int>(2),
children: <Widget>[ children: const <Widget>[
const TestStatefulWidget(key: const ValueKey<int>(21)), const TestStatefulWidget(key: const ValueKey<int>(21)),
const TestStatefulWidget(key: const ValueKey<int>(22)), const TestStatefulWidget(key: const ValueKey<int>(22)),
], ],
@ -738,19 +738,19 @@ void main() {
child: new Table( child: new Table(
key: key0 = new GlobalKey(), key: key0 = new GlobalKey(),
defaultColumnWidth: const IntrinsicColumnWidth(), defaultColumnWidth: const IntrinsicColumnWidth(),
children: <TableRow>[ children: const <TableRow>[
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('A'), const Text('B'), const Text('C'), const Text('A'), const Text('B'), const Text('C'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('D'), const Text('EEE'), const Text('F'), const Text('D'), const Text('EEE'), const Text('F'),
], ],
), ),
new TableRow( const TableRow(
children: <Widget>[ children: const <Widget>[
const Text('G'), const Text('H'), const Text('III'), const Text('G'), const Text('H'), const Text('III'),
], ],
), ),

View File

@ -16,7 +16,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Stack( child: new Stack(
children: <Widget>[ children: const <Widget>[
const Text('a', textDirection: TextDirection.ltr), const Text('a', textDirection: TextDirection.ltr),
const Text('b', textDirection: TextDirection.ltr), const Text('b', textDirection: TextDirection.ltr),
const Text('c', textDirection: TextDirection.ltr), const Text('c', textDirection: TextDirection.ltr),
@ -31,7 +31,7 @@ void main() {
child: new WidgetInspector( child: new WidgetInspector(
selectButtonBuilder: null, selectButtonBuilder: null,
child: new Stack( child: new Stack(
children: <Widget>[ children: const <Widget>[
const Text('a', textDirection: TextDirection.ltr), const Text('a', textDirection: TextDirection.ltr),
const Text('b', textDirection: TextDirection.ltr), const Text('b', textDirection: TextDirection.ltr),
const Text('c', textDirection: TextDirection.ltr), const Text('c', textDirection: TextDirection.ltr),
@ -353,7 +353,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Stack( child: new Stack(
children: <Widget>[ children: const <Widget>[
const Text('a', textDirection: TextDirection.ltr), const Text('a', textDirection: TextDirection.ltr),
const Text('b', textDirection: TextDirection.ltr), const Text('b', textDirection: TextDirection.ltr),
const Text('c', textDirection: TextDirection.ltr), const Text('c', textDirection: TextDirection.ltr),
@ -403,7 +403,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Stack( child: new Stack(
children: <Widget>[ children: const <Widget>[
const Text('a', textDirection: TextDirection.ltr), const Text('a', textDirection: TextDirection.ltr),
const Text('b', textDirection: TextDirection.ltr), const Text('b', textDirection: TextDirection.ltr),
const Text('c', textDirection: TextDirection.ltr), const Text('c', textDirection: TextDirection.ltr),
@ -476,7 +476,7 @@ void main() {
new Directionality( new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child: new Stack( child: new Stack(
children: <Widget>[ children: const <Widget>[
const Text('a', textDirection: TextDirection.ltr), const Text('a', textDirection: TextDirection.ltr),
const Text('b', textDirection: TextDirection.ltr), const Text('b', textDirection: TextDirection.ltr),
const Text('c', textDirection: TextDirection.ltr), const Text('c', textDirection: TextDirection.ltr),

View File

@ -21,7 +21,7 @@ void main() {
new Wrap( new Wrap(
alignment: WrapAlignment.start, alignment: WrapAlignment.start,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
@ -40,7 +40,7 @@ void main() {
new Wrap( new Wrap(
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
@ -59,7 +59,7 @@ void main() {
new Wrap( new Wrap(
alignment: WrapAlignment.end, alignment: WrapAlignment.end,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
@ -79,7 +79,7 @@ void main() {
alignment: WrapAlignment.start, alignment: WrapAlignment.start,
crossAxisAlignment: WrapCrossAlignment.start, crossAxisAlignment: WrapCrossAlignment.start,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 300.0, height: 50.0), const SizedBox(width: 300.0, height: 50.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
@ -99,7 +99,7 @@ void main() {
alignment: WrapAlignment.start, alignment: WrapAlignment.start,
crossAxisAlignment: WrapCrossAlignment.center, crossAxisAlignment: WrapCrossAlignment.center,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 300.0, height: 50.0), const SizedBox(width: 300.0, height: 50.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
@ -119,7 +119,7 @@ void main() {
alignment: WrapAlignment.start, alignment: WrapAlignment.start,
crossAxisAlignment: WrapCrossAlignment.end, crossAxisAlignment: WrapCrossAlignment.end,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 300.0, height: 50.0), const SizedBox(width: 300.0, height: 50.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
@ -141,7 +141,7 @@ void main() {
new Wrap( new Wrap(
alignment: WrapAlignment.start, alignment: WrapAlignment.start,
textDirection: TextDirection.rtl, textDirection: TextDirection.rtl,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
@ -160,7 +160,7 @@ void main() {
new Wrap( new Wrap(
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
textDirection: TextDirection.rtl, textDirection: TextDirection.rtl,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
@ -179,7 +179,7 @@ void main() {
new Wrap( new Wrap(
alignment: WrapAlignment.end, alignment: WrapAlignment.end,
textDirection: TextDirection.rtl, textDirection: TextDirection.rtl,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
@ -200,7 +200,7 @@ void main() {
crossAxisAlignment: WrapCrossAlignment.start, crossAxisAlignment: WrapCrossAlignment.start,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
verticalDirection: VerticalDirection.up, verticalDirection: VerticalDirection.up,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 300.0, height: 50.0), const SizedBox(width: 300.0, height: 50.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
@ -221,7 +221,7 @@ void main() {
crossAxisAlignment: WrapCrossAlignment.center, crossAxisAlignment: WrapCrossAlignment.center,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
verticalDirection: VerticalDirection.up, verticalDirection: VerticalDirection.up,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 300.0, height: 50.0), const SizedBox(width: 300.0, height: 50.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
@ -242,7 +242,7 @@ void main() {
crossAxisAlignment: WrapCrossAlignment.end, crossAxisAlignment: WrapCrossAlignment.end,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
verticalDirection: VerticalDirection.up, verticalDirection: VerticalDirection.up,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 300.0, height: 50.0), const SizedBox(width: 300.0, height: 50.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
const SizedBox(width: 300.0, height: 100.0), const SizedBox(width: 300.0, height: 100.0),
@ -269,7 +269,7 @@ void main() {
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
spacing: 5.0, spacing: 5.0,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 300.0, height: 30.0), const SizedBox(width: 300.0, height: 30.0),
@ -286,7 +286,7 @@ void main() {
alignment: WrapAlignment.spaceBetween, alignment: WrapAlignment.spaceBetween,
spacing: 5.0, spacing: 5.0,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 300.0, height: 30.0), const SizedBox(width: 300.0, height: 30.0),
@ -303,7 +303,7 @@ void main() {
alignment: WrapAlignment.spaceAround, alignment: WrapAlignment.spaceAround,
spacing: 5.0, spacing: 5.0,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 310.0, height: 30.0), const SizedBox(width: 310.0, height: 30.0),
@ -320,7 +320,7 @@ void main() {
alignment: WrapAlignment.spaceEvenly, alignment: WrapAlignment.spaceEvenly,
spacing: 5.0, spacing: 5.0,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 310.0, height: 30.0), const SizedBox(width: 310.0, height: 30.0),
@ -339,7 +339,7 @@ void main() {
alignment: WrapAlignment.center, alignment: WrapAlignment.center,
spacing: 5.0, spacing: 5.0,
textDirection: TextDirection.rtl, textDirection: TextDirection.rtl,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 300.0, height: 30.0), const SizedBox(width: 300.0, height: 30.0),
@ -356,7 +356,7 @@ void main() {
alignment: WrapAlignment.spaceBetween, alignment: WrapAlignment.spaceBetween,
spacing: 5.0, spacing: 5.0,
textDirection: TextDirection.rtl, textDirection: TextDirection.rtl,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 300.0, height: 30.0), const SizedBox(width: 300.0, height: 30.0),
@ -373,7 +373,7 @@ void main() {
alignment: WrapAlignment.spaceAround, alignment: WrapAlignment.spaceAround,
spacing: 5.0, spacing: 5.0,
textDirection: TextDirection.rtl, textDirection: TextDirection.rtl,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 310.0, height: 30.0), const SizedBox(width: 310.0, height: 30.0),
@ -390,7 +390,7 @@ void main() {
alignment: WrapAlignment.spaceEvenly, alignment: WrapAlignment.spaceEvenly,
spacing: 5.0, spacing: 5.0,
textDirection: TextDirection.rtl, textDirection: TextDirection.rtl,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 310.0, height: 30.0), const SizedBox(width: 310.0, height: 30.0),
@ -409,7 +409,7 @@ void main() {
runAlignment: WrapAlignment.center, runAlignment: WrapAlignment.center,
runSpacing: 5.0, runSpacing: 5.0,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 300.0, height: 30.0), const SizedBox(width: 300.0, height: 30.0),
@ -430,7 +430,7 @@ void main() {
runAlignment: WrapAlignment.spaceBetween, runAlignment: WrapAlignment.spaceBetween,
runSpacing: 5.0, runSpacing: 5.0,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 300.0, height: 30.0), const SizedBox(width: 300.0, height: 30.0),
@ -451,7 +451,7 @@ void main() {
runAlignment: WrapAlignment.spaceAround, runAlignment: WrapAlignment.spaceAround,
runSpacing: 5.0, runSpacing: 5.0,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 300.0, height: 30.0), const SizedBox(width: 300.0, height: 30.0),
@ -472,7 +472,7 @@ void main() {
runAlignment: WrapAlignment.spaceEvenly, runAlignment: WrapAlignment.spaceEvenly,
runSpacing: 5.0, runSpacing: 5.0,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 300.0, height: 30.0), const SizedBox(width: 300.0, height: 30.0),
@ -497,7 +497,7 @@ void main() {
runSpacing: 5.0, runSpacing: 5.0,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
verticalDirection: VerticalDirection.up, verticalDirection: VerticalDirection.up,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 300.0, height: 30.0), const SizedBox(width: 300.0, height: 30.0),
@ -519,7 +519,7 @@ void main() {
runSpacing: 5.0, runSpacing: 5.0,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
verticalDirection: VerticalDirection.up, verticalDirection: VerticalDirection.up,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 300.0, height: 30.0), const SizedBox(width: 300.0, height: 30.0),
@ -541,7 +541,7 @@ void main() {
runSpacing: 5.0, runSpacing: 5.0,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
verticalDirection: VerticalDirection.up, verticalDirection: VerticalDirection.up,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 300.0, height: 30.0), const SizedBox(width: 300.0, height: 30.0),
@ -563,7 +563,7 @@ void main() {
runSpacing: 5.0, runSpacing: 5.0,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
verticalDirection: VerticalDirection.up, verticalDirection: VerticalDirection.up,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 300.0, height: 30.0), const SizedBox(width: 300.0, height: 30.0),
@ -590,7 +590,7 @@ void main() {
alignment: WrapAlignment.end, alignment: WrapAlignment.end,
crossAxisAlignment: WrapCrossAlignment.end, crossAxisAlignment: WrapCrossAlignment.end,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 100.0, height: 10.0), const SizedBox(width: 100.0, height: 10.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
const SizedBox(width: 300.0, height: 30.0), const SizedBox(width: 300.0, height: 30.0),
@ -614,7 +614,7 @@ void main() {
alignment: WrapAlignment.end, alignment: WrapAlignment.end,
crossAxisAlignment: WrapCrossAlignment.end, crossAxisAlignment: WrapCrossAlignment.end,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 400.0, height: 40.0), const SizedBox(width: 400.0, height: 40.0),
const SizedBox(width: 300.0, height: 30.0), const SizedBox(width: 300.0, height: 30.0),
const SizedBox(width: 200.0, height: 20.0), const SizedBox(width: 200.0, height: 20.0),
@ -641,7 +641,7 @@ void main() {
alignment: WrapAlignment.start, alignment: WrapAlignment.start,
crossAxisAlignment: WrapCrossAlignment.start, crossAxisAlignment: WrapCrossAlignment.start,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 500.0, height: 10.0), const SizedBox(width: 500.0, height: 10.0),
const SizedBox(width: 500.0, height: 20.0), const SizedBox(width: 500.0, height: 20.0),
const SizedBox(width: 500.0, height: 30.0), const SizedBox(width: 500.0, height: 30.0),
@ -670,7 +670,7 @@ void main() {
alignment: WrapAlignment.start, alignment: WrapAlignment.start,
crossAxisAlignment: WrapCrossAlignment.start, crossAxisAlignment: WrapCrossAlignment.start,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 10.0, height: 250.0), const SizedBox(width: 10.0, height: 250.0),
const SizedBox(width: 20.0, height: 250.0), const SizedBox(width: 20.0, height: 250.0),
const SizedBox(width: 30.0, height: 250.0), const SizedBox(width: 30.0, height: 250.0),
@ -699,7 +699,7 @@ void main() {
spacing: 12.0, spacing: 12.0,
runSpacing: 8.0, runSpacing: 8.0,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 10.0, height: 250.0), const SizedBox(width: 10.0, height: 250.0),
const SizedBox(width: 20.0, height: 250.0), const SizedBox(width: 20.0, height: 250.0),
const SizedBox(width: 30.0, height: 250.0), const SizedBox(width: 30.0, height: 250.0),
@ -724,7 +724,7 @@ void main() {
testWidgets('Visual overflow generates a clip', (WidgetTester tester) async { testWidgets('Visual overflow generates a clip', (WidgetTester tester) async {
await tester.pumpWidget(new Wrap( await tester.pumpWidget(new Wrap(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 500.0, height: 500.0), const SizedBox(width: 500.0, height: 500.0),
], ],
)); ));
@ -733,7 +733,7 @@ void main() {
await tester.pumpWidget(new Wrap( await tester.pumpWidget(new Wrap(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 500.0, height: 500.0), const SizedBox(width: 500.0, height: 500.0),
const SizedBox(width: 500.0, height: 500.0), const SizedBox(width: 500.0, height: 500.0),
], ],
@ -790,7 +790,7 @@ void main() {
direction: Axis.vertical, direction: Axis.vertical,
runSpacing: 7.0, runSpacing: 7.0,
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const SizedBox(width: 500.0, height: 400.0), const SizedBox(width: 500.0, height: 400.0),
const SizedBox(width: 500.0, height: 400.0), const SizedBox(width: 500.0, height: 400.0),
const SizedBox(width: 500.0, height: 400.0), const SizedBox(width: 500.0, height: 400.0),
@ -816,7 +816,7 @@ void main() {
), ),
child: new Wrap( child: new Wrap(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: const <Widget>[
const Text('X', textDirection: TextDirection.ltr), const Text('X', textDirection: TextDirection.ltr),
], ],
), ),

View File

@ -134,7 +134,7 @@ void main() {
await tester.pumpWidget( await tester.pumpWidget(
new Localizations( new Localizations(
locale: const Locale('en', 'US'), locale: const Locale('en', 'US'),
delegates: <LocalizationsDelegate<dynamic>>[ delegates: const <LocalizationsDelegate<dynamic>>[
GlobalMaterialLocalizations.delegate, GlobalMaterialLocalizations.delegate,
DefaultWidgetsLocalizations.delegate, DefaultWidgetsLocalizations.delegate,
], ],

View File

@ -606,7 +606,7 @@ void main() {
buildContent: (BuildContext context) { buildContent: (BuildContext context) {
return new Localizations.override( return new Localizations.override(
context: context, context: context,
delegates: <OnlyRTLDefaultWidgetsLocalizationsDelegate>[ delegates: const <OnlyRTLDefaultWidgetsLocalizationsDelegate>[
// Override: no matter what the locale, textDirection is always RTL. // Override: no matter what the locale, textDirection is always RTL.
const OnlyRTLDefaultWidgetsLocalizationsDelegate(), const OnlyRTLDefaultWidgetsLocalizationsDelegate(),
], ],

View File

@ -177,7 +177,7 @@ void main() {
await tester.pumpWidget(new Row( await tester.pumpWidget(new Row(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: <Widget>[
new Column(children: <Text>[const Text('foo', textDirection: TextDirection.ltr)]), new Column(children: const <Text>[const Text('foo', textDirection: TextDirection.ltr)]),
const Text('bar', textDirection: TextDirection.ltr), const Text('bar', textDirection: TextDirection.ltr),
], ],
)); ));
@ -237,7 +237,7 @@ void main() {
await tester.pumpWidget(new Row( await tester.pumpWidget(new Row(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
children: <Widget>[ children: <Widget>[
new Column(children: <Text>[const Text('foo', textDirection: TextDirection.ltr)]), new Column(children: const <Text>[const Text('foo', textDirection: TextDirection.ltr)]),
const Text('bar', textDirection: TextDirection.ltr), const Text('bar', textDirection: TextDirection.ltr),
], ],
)); ));