apply upcoming lint prefer_const_literals_to_create_immutables (#14029)
This commit is contained in:
parent
5dc4ce85d9
commit
0fe1e5bf5b
@ -267,7 +267,7 @@ class IconBar extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(left: 16.0, right: 16.0),
|
||||
child: new Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const IconWithText(Icons.thumb_up, 'Like'),
|
||||
const IconWithText(Icons.comment, 'Comment'),
|
||||
const IconWithText(Icons.share, 'Share'),
|
||||
@ -438,10 +438,10 @@ class ItemImageBox extends StatelessWidget {
|
||||
borderRadius: new BorderRadius.circular(2.0)
|
||||
),
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: new RichText(
|
||||
text: new TextSpan(
|
||||
child: const RichText(
|
||||
text: const TextSpan(
|
||||
style: const TextStyle(color: Colors.white),
|
||||
children: <TextSpan>[
|
||||
children: const <TextSpan>[
|
||||
const TextSpan(
|
||||
text: 'Photo by '
|
||||
),
|
||||
@ -560,7 +560,7 @@ class BottomBar extends StatelessWidget {
|
||||
),
|
||||
child: new Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const BottomBarButton(Icons.new_releases, 'News'),
|
||||
const BottomBarButton(Icons.people, 'Requests'),
|
||||
const BottomBarButton(Icons.chat, 'Messenger'),
|
||||
|
@ -66,7 +66,7 @@ class DriverTestAppState extends State<DriverTestApp> {
|
||||
_selectedValue = newValue;
|
||||
});
|
||||
},
|
||||
items: <DropdownMenuItem<Letter>>[
|
||||
items: const <DropdownMenuItem<Letter>>[
|
||||
const DropdownMenuItem<Letter>(
|
||||
value: Letter.a,
|
||||
child: const Text('Aaa', key: const ValueKey<String>('a')),
|
||||
|
@ -347,8 +347,8 @@ class CardCollectionState extends State<CardCollection> {
|
||||
return new LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: <Color>[const Color(0x00FFFFFF), const Color(0xFFFFFFFF)],
|
||||
stops: <double>[0.1, 0.35],
|
||||
colors: const <Color>[const Color(0x00FFFFFF), const Color(0xFFFFFFFF)],
|
||||
stops: const <double>[0.1, 0.35],
|
||||
)
|
||||
.createShader(bounds);
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ class ContactsDemoState extends State<ContactsDemo> {
|
||||
content: const Text('Pretend that this opened your SMS application.')
|
||||
));
|
||||
},
|
||||
lines: <String>[
|
||||
lines: const <String>[
|
||||
'(650) 555-1234',
|
||||
'Mobile',
|
||||
],
|
||||
@ -206,7 +206,7 @@ class ContactsDemoState extends State<ContactsDemo> {
|
||||
content: const Text('In this demo, this button doesn\'t do anything.')
|
||||
));
|
||||
},
|
||||
lines: <String>[
|
||||
lines: const <String>[
|
||||
'(323) 555-6789',
|
||||
'Work',
|
||||
],
|
||||
@ -219,7 +219,7 @@ class ContactsDemoState extends State<ContactsDemo> {
|
||||
content: const Text('Imagine if you will, a messaging application.')
|
||||
));
|
||||
},
|
||||
lines: <String>[
|
||||
lines: const <String>[
|
||||
'(650) 555-6789',
|
||||
'Home',
|
||||
],
|
||||
@ -237,7 +237,7 @@ class ContactsDemoState extends State<ContactsDemo> {
|
||||
content: const Text('Here, your e-mail application would open.')
|
||||
));
|
||||
},
|
||||
lines: <String>[
|
||||
lines: const <String>[
|
||||
'ali_connors@example.com',
|
||||
'Personal',
|
||||
],
|
||||
@ -250,7 +250,7 @@ class ContactsDemoState extends State<ContactsDemo> {
|
||||
content: const Text('This is a demo, so this button does not actually work.')
|
||||
));
|
||||
},
|
||||
lines: <String>[
|
||||
lines: const <String>[
|
||||
'aliconnors@example.com',
|
||||
'Work',
|
||||
],
|
||||
@ -268,7 +268,7 @@ class ContactsDemoState extends State<ContactsDemo> {
|
||||
content: const Text('This would show a map of San Francisco.')
|
||||
));
|
||||
},
|
||||
lines: <String>[
|
||||
lines: const <String>[
|
||||
'2000 Main Street',
|
||||
'San Francisco, CA',
|
||||
'Home',
|
||||
@ -282,7 +282,7 @@ class ContactsDemoState extends State<ContactsDemo> {
|
||||
content: const Text('This would show a map of Mountain View.')
|
||||
));
|
||||
},
|
||||
lines: <String>[
|
||||
lines: const <String>[
|
||||
'1600 Amphitheater Parkway',
|
||||
'Mountain View, CA',
|
||||
'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.')
|
||||
));
|
||||
},
|
||||
lines: <String>[
|
||||
lines: const <String>[
|
||||
'126 Severyns Ave',
|
||||
'Mountain View, CA',
|
||||
'Jet Travel',
|
||||
@ -308,25 +308,25 @@ class ContactsDemoState extends State<ContactsDemo> {
|
||||
icon: Icons.today,
|
||||
children: <Widget>[
|
||||
new _ContactItem(
|
||||
lines: <String>[
|
||||
lines: const <String>[
|
||||
'Birthday',
|
||||
'January 9th, 1989',
|
||||
],
|
||||
),
|
||||
new _ContactItem(
|
||||
lines: <String>[
|
||||
lines: const <String>[
|
||||
'Wedding anniversary',
|
||||
'June 21st, 2014',
|
||||
],
|
||||
),
|
||||
new _ContactItem(
|
||||
lines: <String>[
|
||||
lines: const <String>[
|
||||
'First day in office',
|
||||
'January 20th, 2015',
|
||||
],
|
||||
),
|
||||
new _ContactItem(
|
||||
lines: <String>[
|
||||
lines: const <String>[
|
||||
'Last day in office',
|
||||
'August 9th, 2015',
|
||||
],
|
||||
|
@ -441,7 +441,7 @@ class Tab2Header extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 18.0, vertical: 12.0),
|
||||
child: new Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Text(
|
||||
'SUPPORT TICKET',
|
||||
style: const TextStyle(
|
||||
@ -725,10 +725,14 @@ class CupertinoDemoTab3 extends StatelessWidget {
|
||||
child: new SafeArea(
|
||||
top: false,
|
||||
bottom: false,
|
||||
child: new Row(children: <Widget>[ const Text(
|
||||
'Sign in',
|
||||
style: const TextStyle(color: CupertinoColors.activeBlue),
|
||||
) ]),
|
||||
child: new Row(
|
||||
children: const <Widget>[
|
||||
const Text(
|
||||
'Sign in',
|
||||
style: const TextStyle(color: CupertinoColors.activeBlue),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -96,7 +96,7 @@ class _SelectionControlsDemoState extends State<SelectionControlsDemo> {
|
||||
),
|
||||
new Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
// Disabled checkboxes
|
||||
const Checkbox(value: true, onChanged: null),
|
||||
const Checkbox(value: false, onChanged: null)
|
||||
@ -136,7 +136,7 @@ class _SelectionControlsDemoState extends State<SelectionControlsDemo> {
|
||||
// Disabled radio buttons
|
||||
new Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Radio<int>(
|
||||
value: 0,
|
||||
groupValue: 0,
|
||||
|
@ -43,7 +43,7 @@ class _SliderDemoState extends State<SliderDemo> {
|
||||
),
|
||||
new Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget> [
|
||||
children: const <Widget> [
|
||||
const Slider(value: 0.25, thumbOpenAtMin: true, onChanged: null),
|
||||
const Text('Disabled'),
|
||||
]
|
||||
|
@ -17,7 +17,7 @@ class TwoLevelListDemo extends StatelessWidget {
|
||||
new ExpansionTile(
|
||||
title: const Text('Sublist'),
|
||||
backgroundColor: Theme.of(context).accentColor.withOpacity(0.025),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const ListTile(title: const Text('One')),
|
||||
const ListTile(title: const Text('Two')),
|
||||
// https://en.wikipedia.org/wiki/Free_Four
|
||||
|
@ -362,13 +362,13 @@ class _RecipePageState extends State<RecipePage> {
|
||||
],
|
||||
),
|
||||
],
|
||||
flexibleSpace: new FlexibleSpaceBar(
|
||||
background: new DecoratedBox(
|
||||
decoration: new BoxDecoration(
|
||||
gradient: new LinearGradient(
|
||||
flexibleSpace: const FlexibleSpaceBar(
|
||||
background: const DecoratedBox(
|
||||
decoration: const BoxDecoration(
|
||||
gradient: const LinearGradient(
|
||||
begin: const Alignment(0.0, -1.0),
|
||||
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(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 40.0),
|
||||
child: new Table(
|
||||
columnWidths: <int, TableColumnWidth>{
|
||||
columnWidths: const <int, TableColumnWidth>{
|
||||
0: const FixedColumnWidth(64.0)
|
||||
},
|
||||
children: <TableRow>[
|
||||
|
@ -336,7 +336,7 @@ class _CreateCompanySheet extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return new Column(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const TextField(
|
||||
autofocus: true,
|
||||
decoration: const InputDecoration(
|
||||
|
@ -50,7 +50,7 @@ class _StockSymbolView extends StatelessWidget {
|
||||
text: new TextSpan(
|
||||
style: DefaultTextStyle.of(context).style.merge(const TextStyle(fontSize: 8.0)),
|
||||
text: 'Prices may be delayed by ',
|
||||
children: <TextSpan>[
|
||||
children: const <TextSpan>[
|
||||
const TextSpan(text: 'several', style: const TextStyle(fontStyle: FontStyle.italic)),
|
||||
const TextSpan(text: ' years.'),
|
||||
]
|
||||
|
@ -20,7 +20,7 @@ void main() {
|
||||
testWidgets('Need at least 2 tabs', (WidgetTester tester) async {
|
||||
try {
|
||||
await pumpWidgetWithBoilerplate(tester, new CupertinoTabBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const ImageIcon(const TestImageProvider(24, 24)),
|
||||
title: const Text('Tab 1'),
|
||||
@ -38,7 +38,7 @@ void main() {
|
||||
await pumpWidgetWithBoilerplate(tester, new MediaQuery(
|
||||
data: const MediaQueryData(),
|
||||
child: new CupertinoTabBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const ImageIcon(const TestImageProvider(24, 24)),
|
||||
title: const Text('Tab 1'),
|
||||
@ -69,7 +69,7 @@ void main() {
|
||||
|
||||
testWidgets('Adjusts height to account for bottom padding', (WidgetTester tester) async {
|
||||
final CupertinoTabBar tabBar = new CupertinoTabBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const ImageIcon(const TestImageProvider(24, 24)),
|
||||
title: const Text('Aka'),
|
||||
@ -110,7 +110,7 @@ void main() {
|
||||
await pumpWidgetWithBoilerplate(tester, new MediaQuery(
|
||||
data: const MediaQueryData(),
|
||||
child: new CupertinoTabBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const ImageIcon(const TestImageProvider(24, 24)),
|
||||
title: const Text('Tab 1'),
|
||||
@ -128,7 +128,7 @@ void main() {
|
||||
await pumpWidgetWithBoilerplate(tester, new MediaQuery(
|
||||
data: const MediaQueryData(),
|
||||
child: new CupertinoTabBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const ImageIcon(const TestImageProvider(24, 24)),
|
||||
title: const Text('Tab 1'),
|
||||
@ -151,7 +151,7 @@ void main() {
|
||||
await pumpWidgetWithBoilerplate(tester, new MediaQuery(
|
||||
data: const MediaQueryData(),
|
||||
child: new CupertinoTabBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const ImageIcon(const TestImageProvider(24, 24)),
|
||||
title: const Text('Tab 1'),
|
||||
|
@ -77,7 +77,7 @@ void main() {
|
||||
testWidgets('test iOS page transition (RTL)', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
new WidgetsApp(
|
||||
localizationsDelegates: <LocalizationsDelegate<dynamic>>[
|
||||
localizationsDelegates: const <LocalizationsDelegate<dynamic>>[
|
||||
const RtlOverrideWidgetsDelegate(),
|
||||
],
|
||||
color: const Color(0xFFFFFFFF),
|
||||
@ -279,7 +279,7 @@ void main() {
|
||||
testWidgets('test only edge swipes work (RTL)', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
new WidgetsApp(
|
||||
localizationsDelegates: <LocalizationsDelegate<dynamic>>[
|
||||
localizationsDelegates: const <LocalizationsDelegate<dynamic>>[
|
||||
const RtlOverrideWidgetsDelegate(),
|
||||
],
|
||||
color: const Color(0xFFFFFFFF),
|
||||
|
@ -46,7 +46,7 @@ void main() {
|
||||
return new CupertinoTabScaffold(
|
||||
tabBar: new CupertinoTabBar(
|
||||
backgroundColor: CupertinoColors.white,
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const ImageIcon(const TestImageProvider(24, 24)),
|
||||
title: const Text('Tab 1'),
|
||||
@ -94,7 +94,7 @@ void main() {
|
||||
),
|
||||
child: new CupertinoTabScaffold(
|
||||
tabBar: new CupertinoTabBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const ImageIcon(const TestImageProvider(24, 24)),
|
||||
title: const Text('Tab 1'),
|
||||
@ -150,7 +150,7 @@ void main() {
|
||||
builder: (BuildContext context) {
|
||||
return new CupertinoTabScaffold(
|
||||
tabBar: new CupertinoTabBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const ImageIcon(const TestImageProvider(24, 24)),
|
||||
title: const Text('Tab 1'),
|
||||
|
@ -123,7 +123,7 @@ void main() {
|
||||
|
||||
CupertinoTabBar _buildTabBar() {
|
||||
return new CupertinoTabBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const ImageIcon(const TestImageProvider(24, 24)),
|
||||
title: const Text('Tab 1'),
|
||||
|
@ -19,12 +19,12 @@ void main() {
|
||||
),
|
||||
drawer: new Drawer(
|
||||
child: new ListView(
|
||||
children: <Widget>[
|
||||
new AboutListTile(
|
||||
children: const <Widget>[
|
||||
const AboutListTile(
|
||||
applicationVersion: '0.1.2',
|
||||
applicationIcon: const FlutterLogo(),
|
||||
applicationLegalese: 'I am the very model of a modern major general.',
|
||||
aboutBoxChildren: <Widget>[
|
||||
aboutBoxChildren: const <Widget>[
|
||||
const Text('About box'),
|
||||
]
|
||||
),
|
||||
|
@ -109,7 +109,7 @@ void main() {
|
||||
home: new Scaffold(
|
||||
appBar: new AppBar(
|
||||
title: const Text('X'),
|
||||
actions: <Widget>[
|
||||
actions: const <Widget>[
|
||||
const Icon(Icons.thumb_up),
|
||||
],
|
||||
),
|
||||
@ -130,7 +130,7 @@ void main() {
|
||||
home: new Scaffold(
|
||||
appBar: new AppBar(
|
||||
title: const Text('X'),
|
||||
actions: <Widget>[
|
||||
actions: const <Widget>[
|
||||
const Icon(Icons.thumb_up),
|
||||
const Icon(Icons.thumb_up),
|
||||
],
|
||||
@ -458,7 +458,7 @@ void main() {
|
||||
child: new AppBar(
|
||||
leading: const Text('L'),
|
||||
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(
|
||||
appBar: new AppBar(
|
||||
title: const Text('X'),
|
||||
actions: <Widget> [
|
||||
actions: const <Widget> [
|
||||
const IconButton(
|
||||
icon: const Icon(Icons.share),
|
||||
onPressed: null,
|
||||
@ -977,7 +977,7 @@ void main() {
|
||||
child: new AppBar(
|
||||
leading: new Placeholder(key: key),
|
||||
title: const Text('Abc'),
|
||||
actions: <Widget>[
|
||||
actions: const <Widget>[
|
||||
const Placeholder(fallbackWidth: 10.0),
|
||||
const Placeholder(fallbackWidth: 10.0),
|
||||
const Placeholder(fallbackWidth: 10.0),
|
||||
@ -998,7 +998,7 @@ void main() {
|
||||
child: new AppBar(
|
||||
leading: new Placeholder(key: key),
|
||||
title: const Text('Abc'),
|
||||
actions: <Widget>[
|
||||
actions: const <Widget>[
|
||||
const Placeholder(fallbackWidth: 10.0),
|
||||
const Placeholder(fallbackWidth: 10.0),
|
||||
const Placeholder(fallbackWidth: 10.0),
|
||||
@ -1028,7 +1028,7 @@ void main() {
|
||||
child: new AppBar(
|
||||
leading: new Placeholder(key: key),
|
||||
title: const Text('Abc'),
|
||||
actions: <Widget>[
|
||||
actions: const <Widget>[
|
||||
const Placeholder(fallbackWidth: 10.0),
|
||||
const Placeholder(fallbackWidth: 10.0),
|
||||
const Placeholder(fallbackWidth: 10.0),
|
||||
@ -1069,7 +1069,7 @@ void main() {
|
||||
child: new AppBar(
|
||||
leading: new Placeholder(key: key),
|
||||
title: const Text('Abc'),
|
||||
actions: <Widget>[
|
||||
actions: const <Widget>[
|
||||
const Placeholder(fallbackWidth: 10.0),
|
||||
const Placeholder(fallbackWidth: 10.0),
|
||||
const Placeholder(fallbackWidth: 10.0),
|
||||
|
@ -16,7 +16,7 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
bottomNavigationBar: new BottomNavigationBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const Icon(Icons.ac_unit),
|
||||
title: const Text('AC')
|
||||
@ -44,7 +44,7 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
bottomNavigationBar: new BottomNavigationBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const Icon(Icons.ac_unit),
|
||||
title: const Text('AC')
|
||||
@ -72,7 +72,7 @@ void main() {
|
||||
data: const MediaQueryData(padding: const EdgeInsets.only(bottom: 40.0)),
|
||||
child: new Scaffold(
|
||||
bottomNavigationBar: new BottomNavigationBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const Icon(Icons.ac_unit),
|
||||
title: const Text('AC')
|
||||
@ -100,7 +100,7 @@ void main() {
|
||||
home: new Scaffold(
|
||||
bottomNavigationBar: new BottomNavigationBar(
|
||||
type: BottomNavigationBarType.shifting,
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const Icon(Icons.ac_unit),
|
||||
title: const Text('AC')
|
||||
@ -126,7 +126,7 @@ void main() {
|
||||
bottomNavigationBar: new BottomNavigationBar(
|
||||
currentIndex: 1,
|
||||
type: BottomNavigationBarType.shifting,
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const Icon(Icons.ac_unit),
|
||||
title: const Text('AC')
|
||||
@ -155,7 +155,7 @@ void main() {
|
||||
home: new Scaffold(
|
||||
bottomNavigationBar: new BottomNavigationBar(
|
||||
type: BottomNavigationBarType.shifting,
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const Icon(Icons.ac_unit),
|
||||
title: const Text('AC')
|
||||
@ -216,7 +216,7 @@ void main() {
|
||||
child: new Scaffold(
|
||||
bottomNavigationBar: new BottomNavigationBar(
|
||||
type: BottomNavigationBarType.shifting,
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const Icon(Icons.ac_unit),
|
||||
title: const Text('AC')
|
||||
@ -254,7 +254,7 @@ void main() {
|
||||
child: new Scaffold(
|
||||
bottomNavigationBar: new BottomNavigationBar(
|
||||
type: BottomNavigationBarType.fixed,
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
icon: const Icon(Icons.ac_unit),
|
||||
title: const Text('AC')
|
||||
@ -326,7 +326,7 @@ void main() {
|
||||
home: new Scaffold(
|
||||
bottomNavigationBar: new BottomNavigationBar(
|
||||
type: BottomNavigationBarType.fixed,
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
title: const Text('A'),
|
||||
icon: const Icon(Icons.ac_unit),
|
||||
@ -349,7 +349,7 @@ void main() {
|
||||
home: new Scaffold(
|
||||
bottomNavigationBar: new BottomNavigationBar(
|
||||
type: BottomNavigationBarType.shifting,
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
title: const Text('A'),
|
||||
icon: const Icon(Icons.ac_unit),
|
||||
@ -373,7 +373,7 @@ void main() {
|
||||
data: const MediaQueryData(textScaleFactor: 2.0),
|
||||
child: new Scaffold(
|
||||
bottomNavigationBar: new BottomNavigationBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
title: const Text('A'),
|
||||
icon: const Icon(Icons.ac_unit),
|
||||
@ -430,7 +430,7 @@ void main() {
|
||||
boilerplate(
|
||||
textDirection: TextDirection.ltr,
|
||||
bottomNavigationBar: new BottomNavigationBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
title: const Text('A'),
|
||||
icon: const Icon(Icons.ac_unit),
|
||||
@ -462,7 +462,7 @@ void main() {
|
||||
boilerplate(
|
||||
textDirection: TextDirection.rtl,
|
||||
bottomNavigationBar: new BottomNavigationBar(
|
||||
items: <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>[
|
||||
const BottomNavigationBarItem(
|
||||
title: const Text('A'),
|
||||
icon: const Icon(Icons.ac_unit),
|
||||
|
@ -274,7 +274,7 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Material(
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Chip(
|
||||
avatar: const CircleAvatar(
|
||||
child: const Text('A')
|
||||
@ -318,7 +318,7 @@ void main() {
|
||||
data: const MediaQueryData(textScaleFactor: 3.0),
|
||||
child: new Material(
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Chip(
|
||||
avatar: const CircleAvatar(
|
||||
child: const Text('A')
|
||||
@ -352,7 +352,7 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Material(
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Chip(
|
||||
avatar: const CircleAvatar(
|
||||
child: const Text('A')
|
||||
|
@ -71,10 +71,10 @@ void main() {
|
||||
onPressed: () {
|
||||
showDialog<Null>(
|
||||
context: context,
|
||||
child: new AlertDialog(
|
||||
child: const AlertDialog(
|
||||
title: const Text('Title'),
|
||||
content: const Text('Y'),
|
||||
actions: <Widget>[ ],
|
||||
actions: const <Widget>[ ],
|
||||
),
|
||||
);
|
||||
},
|
||||
|
@ -53,7 +53,7 @@ void main() {
|
||||
new ExpansionTile(
|
||||
key: defaultKey,
|
||||
title: const Text('Default'),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const ListTile(title: const Text('0')),
|
||||
]
|
||||
)
|
||||
|
@ -337,7 +337,7 @@ void main() {
|
||||
child: new MediaQuery(
|
||||
data: const MediaQueryData(),
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const ListTile(
|
||||
title: const Text('one'),
|
||||
),
|
||||
|
@ -85,8 +85,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -108,8 +108,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -133,8 +133,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -165,8 +165,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('B'),
|
||||
child: const SizedBox(
|
||||
@ -202,8 +202,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -233,8 +233,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -269,8 +269,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -310,8 +310,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -342,8 +342,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -386,8 +386,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -418,8 +418,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -460,8 +460,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -499,8 +499,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -543,8 +543,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -575,8 +575,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -615,8 +615,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -654,8 +654,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -688,8 +688,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -720,8 +720,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -776,8 +776,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -823,8 +823,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -864,8 +864,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -900,8 +900,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -956,8 +956,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -1003,8 +1003,8 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
children: <MergeableMaterialItem>[
|
||||
child: const MergeableMaterial(
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -1059,9 +1059,9 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
child: const MergeableMaterial(
|
||||
hasDividers: true,
|
||||
children: <MergeableMaterialItem>[
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
@ -1109,9 +1109,9 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Scaffold(
|
||||
body: new SingleChildScrollView(
|
||||
child: new MergeableMaterial(
|
||||
child: const MergeableMaterial(
|
||||
hasDividers: true,
|
||||
children: <MergeableMaterialItem>[
|
||||
children: const <MergeableMaterialItem>[
|
||||
const MaterialSlice(
|
||||
key: const ValueKey<String>('A'),
|
||||
child: const SizedBox(
|
||||
|
@ -29,7 +29,7 @@ Widget buildFrame(TabController tabController, { Color color, Color selectedColo
|
||||
new Flexible(
|
||||
child: new TabBarView(
|
||||
controller: tabController,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Center(child: const Text('0')),
|
||||
const Center(child: const Text('1')),
|
||||
const Center(child: const Text('2')),
|
||||
|
@ -52,7 +52,7 @@ void main() {
|
||||
header: const Text('Test table'),
|
||||
source: source,
|
||||
rowsPerPage: 2,
|
||||
availableRowsPerPage: <int>[
|
||||
availableRowsPerPage: const <int>[
|
||||
2, 4, 8, 16,
|
||||
],
|
||||
onRowsPerPageChanged: (int rowsPerPage) {
|
||||
@ -61,7 +61,7 @@ void main() {
|
||||
onPageChanged: (int rowIndex) {
|
||||
log.add('page-changed: $rowIndex');
|
||||
},
|
||||
columns: <DataColumn>[
|
||||
columns: const <DataColumn>[
|
||||
const DataColumn(label: const Text('Name')),
|
||||
const DataColumn(label: const Text('Calories'), numeric: true),
|
||||
const DataColumn(label: const Text('Generation')),
|
||||
@ -199,11 +199,11 @@ void main() {
|
||||
header: const Text('HEADER'),
|
||||
source: new TestDataSource(),
|
||||
rowsPerPage: 8,
|
||||
availableRowsPerPage: <int>[
|
||||
availableRowsPerPage: const <int>[
|
||||
8, 9,
|
||||
],
|
||||
onRowsPerPageChanged: (int rowsPerPage) { },
|
||||
columns: <DataColumn>[
|
||||
columns: const <DataColumn>[
|
||||
const DataColumn(label: const Text('COL1')),
|
||||
const DataColumn(label: const Text('COL2')),
|
||||
const DataColumn(label: const Text('COL3')),
|
||||
@ -226,9 +226,9 @@ void main() {
|
||||
header: const Text('HEADER'),
|
||||
source: source,
|
||||
rowsPerPage: 501,
|
||||
availableRowsPerPage: <int>[ 501 ],
|
||||
availableRowsPerPage: const <int>[ 501 ],
|
||||
onRowsPerPageChanged: (int rowsPerPage) { },
|
||||
columns: <DataColumn>[
|
||||
columns: const <DataColumn>[
|
||||
const DataColumn(label: const Text('COL1')),
|
||||
const DataColumn(label: const Text('COL2')),
|
||||
const DataColumn(label: const Text('COL3')),
|
||||
@ -257,9 +257,9 @@ void main() {
|
||||
header: const Text('HEADER'),
|
||||
source: source,
|
||||
rowsPerPage: 5,
|
||||
availableRowsPerPage: <int>[ 5 ],
|
||||
availableRowsPerPage: const <int>[ 5 ],
|
||||
onRowsPerPageChanged: (int rowsPerPage) { },
|
||||
columns: <DataColumn>[
|
||||
columns: const <DataColumn>[
|
||||
const DataColumn(label: const Text('COL1')),
|
||||
const DataColumn(label: const Text('COL2')),
|
||||
const DataColumn(label: const Text('COL3')),
|
||||
|
@ -187,12 +187,12 @@ void main() {
|
||||
testWidgets('LinearProgressIndicator causes a repaint when it changes', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(new Directionality(
|
||||
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;
|
||||
await tester.pumpWidget(new Directionality(
|
||||
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;
|
||||
expect(layers1, isNot(equals(layers2)));
|
||||
|
@ -72,21 +72,21 @@ void main() {
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
await tester.fling(find.text('A'), const Offset(300.0, 0.0), 1000.0); // horizontal fling
|
||||
await tester.pump();
|
||||
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 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.pump();
|
||||
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 hide animation
|
||||
expect(refreshCalled, true);
|
||||
expect(refreshCalled, true);
|
||||
});
|
||||
|
||||
testWidgets('RefreshIndicator - bottom', (WidgetTester tester) async {
|
||||
@ -98,7 +98,7 @@ void main() {
|
||||
child: new ListView(
|
||||
reverse: true,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(
|
||||
height: 200.0,
|
||||
child: const Text('X'),
|
||||
@ -125,7 +125,7 @@ void main() {
|
||||
onRefresh: holdRefresh,
|
||||
child: new ListView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(
|
||||
height: 200.0,
|
||||
child: const Text('X'),
|
||||
@ -152,7 +152,7 @@ void main() {
|
||||
child: new ListView(
|
||||
reverse: true,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(
|
||||
height: 200.0,
|
||||
child: const Text('X'),
|
||||
@ -178,7 +178,7 @@ void main() {
|
||||
onRefresh: refresh,
|
||||
child: new ListView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(
|
||||
height: 200.0,
|
||||
child: const Text('X'),
|
||||
@ -206,7 +206,7 @@ void main() {
|
||||
onRefresh: refresh,
|
||||
child: new ListView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(
|
||||
height: 200.0,
|
||||
child: const Text('X'),
|
||||
@ -233,7 +233,7 @@ void main() {
|
||||
onRefresh: holdRefresh, // this one never returns
|
||||
child: new ListView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(
|
||||
height: 200.0,
|
||||
child: const Text('X'),
|
||||
@ -276,7 +276,7 @@ void main() {
|
||||
onRefresh: refresh,
|
||||
child: new ListView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(
|
||||
height: 200.0,
|
||||
child: const Text('X'),
|
||||
@ -320,7 +320,7 @@ void main() {
|
||||
onRefresh: refresh,
|
||||
child: new ListView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(
|
||||
height: 200.0,
|
||||
child: const Text('X'),
|
||||
|
@ -500,9 +500,9 @@ void main() {
|
||||
const String drawerLabel = 'I am the reason for this test';
|
||||
|
||||
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),
|
||||
persistentFooterButtons: <Widget>[const Text(persistentFooterButtonLabel)],
|
||||
persistentFooterButtons: const <Widget>[const Text(persistentFooterButtonLabel)],
|
||||
bottomNavigationBar: const Text(bottomNavigationBarLabel),
|
||||
floatingActionButton: const Text(floatingActionButtonLabel),
|
||||
drawer: const Drawer(child:const Text(drawerLabel)),
|
||||
|
@ -16,7 +16,7 @@ void main() {
|
||||
onStepTapped: (int i) {
|
||||
index = i;
|
||||
},
|
||||
steps: <Step>[
|
||||
steps: const <Step>[
|
||||
const Step(
|
||||
title: const Text('Step 1'),
|
||||
content: const SizedBox(
|
||||
@ -46,7 +46,7 @@ void main() {
|
||||
home: new Center(
|
||||
child: new Material(
|
||||
child: new Stepper(
|
||||
steps: <Step>[
|
||||
steps: const <Step>[
|
||||
const Step(
|
||||
title: const Text('Step 1'),
|
||||
content: const SizedBox(
|
||||
@ -77,7 +77,7 @@ void main() {
|
||||
child: new Material(
|
||||
child: new Stepper(
|
||||
currentStep: 1,
|
||||
steps: <Step>[
|
||||
steps: const <Step>[
|
||||
const Step(
|
||||
title: const Text('Step 1'),
|
||||
content: const SizedBox(
|
||||
@ -114,7 +114,7 @@ void main() {
|
||||
child: new Material(
|
||||
child: new Stepper(
|
||||
type: StepperType.horizontal,
|
||||
steps: <Step>[
|
||||
steps: const <Step>[
|
||||
const Step(
|
||||
title: const Text('Step 1'),
|
||||
content: const SizedBox(
|
||||
@ -139,7 +139,7 @@ void main() {
|
||||
home: new Material(
|
||||
child: new Stepper(
|
||||
type: StepperType.horizontal,
|
||||
steps: <Step>[
|
||||
steps: const <Step>[
|
||||
const Step(
|
||||
title: const Text('Step 1'),
|
||||
content: const Text('A'),
|
||||
@ -163,7 +163,7 @@ void main() {
|
||||
child: new Stepper(
|
||||
currentStep: 1,
|
||||
type: StepperType.horizontal,
|
||||
steps: <Step>[
|
||||
steps: const <Step>[
|
||||
const Step(
|
||||
title: const Text('Step 1'),
|
||||
content: const Text('A'),
|
||||
@ -197,7 +197,7 @@ void main() {
|
||||
onStepCancel: () {
|
||||
cancelPressed = true;
|
||||
},
|
||||
steps: <Step>[
|
||||
steps: const <Step>[
|
||||
const Step(
|
||||
title: const Text('Step 1'),
|
||||
content: const SizedBox(
|
||||
@ -235,7 +235,7 @@ void main() {
|
||||
onStepTapped: (int i) {
|
||||
index = i;
|
||||
},
|
||||
steps: <Step>[
|
||||
steps: const <Step>[
|
||||
const Step(
|
||||
title: const Text('Step 1'),
|
||||
content: const SizedBox(
|
||||
@ -266,7 +266,7 @@ void main() {
|
||||
new MaterialApp(
|
||||
home: new Material(
|
||||
child: new Stepper(
|
||||
steps: <Step>[
|
||||
steps: const <Step>[
|
||||
const Step(
|
||||
title: const Text('Step 1'),
|
||||
content: const SizedBox(
|
||||
@ -303,7 +303,7 @@ void main() {
|
||||
home: new Material(
|
||||
child: new Stepper(
|
||||
currentStep: 2,
|
||||
steps: <Step>[
|
||||
steps: const <Step>[
|
||||
const Step(
|
||||
title: const Text('Step 1'),
|
||||
content: const SizedBox(
|
||||
@ -341,7 +341,7 @@ void main() {
|
||||
home: new Center(
|
||||
child: new Material(
|
||||
child: new Stepper(
|
||||
steps: <Step>[
|
||||
steps: const <Step>[
|
||||
const Step(
|
||||
title: const Text('A'),
|
||||
state: StepState.complete,
|
||||
@ -374,7 +374,7 @@ void main() {
|
||||
home: new Center(
|
||||
child: new Material(
|
||||
child: new Stepper(
|
||||
steps: <Step>[
|
||||
steps: const <Step>[
|
||||
const Step(
|
||||
title: const Text('A'),
|
||||
state: StepState.error,
|
||||
|
@ -122,8 +122,8 @@ Widget buildLeftRightApp({ List<String> tabs, String value }) {
|
||||
tabs: tabs.map((String tab) => new Tab(text: tab)).toList(),
|
||||
),
|
||||
),
|
||||
body: new TabBarView(
|
||||
children: <Widget>[
|
||||
body: const TabBarView(
|
||||
children: const <Widget>[
|
||||
const Center(child: const Text('LEFT CHILD')),
|
||||
const Center(child: const Text('RIGHT CHILD'))
|
||||
]
|
||||
@ -538,7 +538,7 @@ void main() {
|
||||
),
|
||||
body: new TabBarView(
|
||||
controller: controller,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Center(child: const Text('LEFT CHILD')),
|
||||
const Center(child: const Text('RIGHT CHILD'))
|
||||
]
|
||||
@ -597,7 +597,7 @@ void main() {
|
||||
),
|
||||
body: new TabBarView(
|
||||
controller: controller,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Center(child: const Text('CHILD A')),
|
||||
const Center(child: const Text('CHILD B')),
|
||||
const Center(child: const Text('CHILD C')),
|
||||
@ -690,7 +690,7 @@ void main() {
|
||||
boilerplate(
|
||||
child: new TabBarView(
|
||||
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(
|
||||
key: new UniqueKey(),
|
||||
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,
|
||||
child: new TabBarView(
|
||||
controller: tabController,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Center(child: const Text('0')),
|
||||
const Center(child: const Text('1')),
|
||||
const Center(child: const Text('2')),
|
||||
@ -870,7 +870,7 @@ void main() {
|
||||
child: new TabBarView(
|
||||
controller: tabController,
|
||||
physics: const TestScrollPhysics(),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Center(child: const Text('0')),
|
||||
const Center(child: const Text('1')),
|
||||
const Center(child: const Text('2')),
|
||||
|
@ -128,7 +128,7 @@ void main() {
|
||||
key: dropdownMenuButtonKey,
|
||||
onChanged: (String newValue) { },
|
||||
value: 'menuItem',
|
||||
items: <DropdownMenuItem<String>>[
|
||||
items: const <DropdownMenuItem<String>>[
|
||||
const DropdownMenuItem<String>(
|
||||
value: 'menuItem',
|
||||
child: const Text('menuItem'),
|
||||
|
@ -22,7 +22,7 @@ void main() {
|
||||
new ExpansionTile(
|
||||
key: sublistKey,
|
||||
title: const Text('Sublist'),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const ListTile(title: const Text('0')),
|
||||
const ListTile(title: const Text('1'))
|
||||
]
|
||||
@ -81,7 +81,7 @@ void main() {
|
||||
onExpansionChanged: (bool opened) {
|
||||
didChangeOpen = opened;
|
||||
},
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const ListTile(title: const Text('0')),
|
||||
const ListTile(title: const Text('1'))
|
||||
]
|
||||
@ -110,11 +110,11 @@ void main() {
|
||||
return new Material(
|
||||
child: new SingleChildScrollView(
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const ListTile(title: const Text('Top')),
|
||||
new ExpansionTile(
|
||||
const ExpansionTile(
|
||||
title: const Text('Sublist'),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const ListTile(title: const Text('0')),
|
||||
const ListTile(title: const Text('1'))
|
||||
],
|
||||
|
@ -40,7 +40,7 @@ Future<Null> pumpTestWidget(WidgetTester tester, {
|
||||
child: const Text('A'),
|
||||
),
|
||||
),
|
||||
otherAccountsPictures: <Widget>[
|
||||
otherAccountsPictures: const <Widget>[
|
||||
const CircleAvatar(
|
||||
child: const Text('B'),
|
||||
),
|
||||
|
@ -12,7 +12,7 @@ void main() {
|
||||
await tester.pumpWidget(
|
||||
new Center(
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 200.0, height: 200.0),
|
||||
],
|
||||
),
|
||||
@ -26,7 +26,7 @@ void main() {
|
||||
child: new SizedBox(
|
||||
height: 100.0,
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 200.0, height: 200.0),
|
||||
],
|
||||
),
|
||||
@ -43,7 +43,7 @@ void main() {
|
||||
child: new SizedBox(
|
||||
height: 0.0,
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 200.0, height: 200.0),
|
||||
],
|
||||
),
|
||||
|
@ -11,7 +11,7 @@ const String kTitleString = 'Hello World';
|
||||
Future<Null> pumpApp(WidgetTester tester, { GenerateAppTitle onGenerateTitle }) async {
|
||||
await tester.pumpWidget(
|
||||
new WidgetsApp(
|
||||
supportedLocales: <Locale>[
|
||||
supportedLocales: const <Locale>[
|
||||
const Locale('en', 'US'),
|
||||
const Locale('en', 'GB'),
|
||||
],
|
||||
|
@ -221,7 +221,7 @@ void main() {
|
||||
new AutomaticKeepAlive(
|
||||
child: new Container(
|
||||
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>(1), child: const Placeholder()),
|
||||
]),
|
||||
@ -297,7 +297,7 @@ void main() {
|
||||
new AutomaticKeepAlive(
|
||||
child: new Container(
|
||||
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>(1), child: const Placeholder()),
|
||||
]),
|
||||
@ -306,7 +306,7 @@ void main() {
|
||||
new AutomaticKeepAlive(
|
||||
child: new Container(
|
||||
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>(3), child: const Placeholder()),
|
||||
]),
|
||||
@ -315,7 +315,7 @@ void main() {
|
||||
new AutomaticKeepAlive(
|
||||
child: new Container(
|
||||
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>(5), child: const Placeholder()),
|
||||
]),
|
||||
@ -349,7 +349,7 @@ void main() {
|
||||
new AutomaticKeepAlive(
|
||||
child: new Container(
|
||||
height: 400.0,
|
||||
child: new Stack(children: <Widget>[
|
||||
child: new Stack(children: const <Widget>[
|
||||
const Leaf(key: const GlobalObjectKey<_LeafState>(1), child: const Placeholder()),
|
||||
]),
|
||||
),
|
||||
@ -357,7 +357,7 @@ void main() {
|
||||
new AutomaticKeepAlive(
|
||||
child: new Container(
|
||||
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>(3), child: const Placeholder()),
|
||||
]),
|
||||
@ -366,7 +366,7 @@ void main() {
|
||||
new AutomaticKeepAlive(
|
||||
child: new Container(
|
||||
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>(5), child: const Placeholder()),
|
||||
const Leaf(key: const GlobalObjectKey<_LeafState>(0), child: const Placeholder()),
|
||||
@ -408,7 +408,7 @@ void main() {
|
||||
new AutomaticKeepAlive(
|
||||
child: new Container(
|
||||
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>(2), child: const Placeholder()),
|
||||
]),
|
||||
@ -417,14 +417,14 @@ void main() {
|
||||
new AutomaticKeepAlive(
|
||||
child: new Container(
|
||||
height: 400.0,
|
||||
child: new Stack(children: <Widget>[
|
||||
child: new Stack(children: const <Widget>[
|
||||
]),
|
||||
),
|
||||
),
|
||||
new AutomaticKeepAlive(
|
||||
child: new Container(
|
||||
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>(4), child: const Placeholder()),
|
||||
const Leaf(key: const GlobalObjectKey<_LeafState>(5), child: const Placeholder()),
|
||||
|
@ -21,7 +21,7 @@ void main() {
|
||||
|
||||
await tester.pumpWidget(
|
||||
new Row(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SliverList(
|
||||
delegate: const SliverChildListDelegate(const <Widget>[]),
|
||||
),
|
||||
@ -37,7 +37,7 @@ void main() {
|
||||
new Viewport(
|
||||
crossAxisDirection: AxisDirection.right,
|
||||
offset: new ViewportOffset.zero(),
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SizedBox(),
|
||||
],
|
||||
),
|
||||
@ -49,7 +49,7 @@ void main() {
|
||||
new Viewport(
|
||||
crossAxisDirection: AxisDirection.right,
|
||||
offset: new ViewportOffset.zero(),
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SliverPadding(
|
||||
padding: EdgeInsets.zero,
|
||||
sliver: const SizedBox(),
|
||||
|
@ -10,7 +10,7 @@ void main() {
|
||||
await tester.pumpWidget(
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new ListView(children: <Widget>[const Center()])
|
||||
child: new ListView(children: const <Widget>[const Center()])
|
||||
),
|
||||
);
|
||||
});
|
||||
|
@ -518,7 +518,7 @@ void main() {
|
||||
width: 100.0,
|
||||
height: 1000.0,
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Test1215DismissibleWidget('1'),
|
||||
const Test1215DismissibleWidget('2'),
|
||||
],
|
||||
|
@ -1224,7 +1224,7 @@ void main() {
|
||||
|
||||
await tester.pumpWidget(new MaterialApp(
|
||||
home: new Column(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Draggable<int>(
|
||||
data: 1,
|
||||
child: const Text('Source'),
|
||||
|
@ -51,7 +51,7 @@ void main() {
|
||||
await tester.pumpWidget(
|
||||
new Row(
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Flexible(child: const SizedBox(width: 100.0, height: 200.0)),
|
||||
],
|
||||
),
|
||||
@ -65,7 +65,7 @@ void main() {
|
||||
await tester.pumpWidget(
|
||||
new Row(
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Expanded(flex: null, child: const Text('one', textDirection: TextDirection.ltr)),
|
||||
const Flexible(flex: null, child: const Text('two', textDirection: TextDirection.ltr)),
|
||||
],
|
||||
|
@ -58,7 +58,7 @@ void main() {
|
||||
testWidgets('Can have multiple focused children and they update accordingly', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
new Column(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const TestFocusable(
|
||||
no: 'a',
|
||||
yes: 'A FOCUSED',
|
||||
@ -146,7 +146,7 @@ void main() {
|
||||
autofocus: true,
|
||||
child: new Row(
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const TestFocusable(
|
||||
no: 'a',
|
||||
yes: 'A FOCUSED',
|
||||
@ -221,7 +221,7 @@ void main() {
|
||||
node: parentFocusScope,
|
||||
child: new Row(
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const TestFocusable(
|
||||
no: 'a',
|
||||
yes: 'A FOCUSED',
|
||||
|
@ -22,7 +22,7 @@ void main() {
|
||||
});
|
||||
await tester.pumpWidget(new Image.network(
|
||||
'https://www.example.com/images/frame.png',
|
||||
headers: <String, String>{'flutter': 'flutter'},
|
||||
headers: const <String, String>{'flutter': 'flutter'},
|
||||
));
|
||||
});
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ void main() {
|
||||
container: true,
|
||||
explicitChildNodes: false,
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Text('Michael Goderbauer'),
|
||||
const Text('goderbauer@google.com'),
|
||||
],
|
||||
@ -56,7 +56,7 @@ void main() {
|
||||
container: true,
|
||||
explicitChildNodes: true,
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Text('Michael Goderbauer'),
|
||||
const Text('goderbauer@google.com'),
|
||||
],
|
||||
@ -103,7 +103,7 @@ void main() {
|
||||
child: new Semantics(
|
||||
label: 'Signed in as',
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Text('Michael Goderbauer'),
|
||||
const Text('goderbauer@google.com'),
|
||||
],
|
||||
@ -146,7 +146,7 @@ void main() {
|
||||
child: new Semantics(
|
||||
label: 'Signed in as',
|
||||
child: new Column(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Text('Michael Goderbauer'),
|
||||
const Text('goderbauer@google.com'),
|
||||
],
|
||||
|
@ -120,7 +120,7 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new ListView(
|
||||
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(
|
||||
// The overall height of the ListView's contents is 500
|
||||
child: new ListView(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(
|
||||
height: 150.0,
|
||||
child: const Center(
|
||||
|
@ -16,7 +16,7 @@ void main() {
|
||||
children: <Widget>[
|
||||
new ListView(
|
||||
shrinkWrap: true,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Text('1'),
|
||||
const Text('2'),
|
||||
const Text('3'),
|
||||
@ -24,7 +24,7 @@ void main() {
|
||||
),
|
||||
new ListView(
|
||||
shrinkWrap: true,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Text('4'),
|
||||
const Text('5'),
|
||||
const Text('6'),
|
||||
@ -43,7 +43,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new ListView(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(height: 100.0, child: const Text('100')),
|
||||
],
|
||||
),
|
||||
@ -54,7 +54,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new ListView(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(height: 100.0, child: const Text('100')),
|
||||
const SizedBox(height: 200.0, child: const Text('200')),
|
||||
],
|
||||
@ -70,7 +70,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new ListView(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(height: 100.0, child: const Text('100')),
|
||||
],
|
||||
),
|
||||
@ -84,7 +84,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new ListView(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(height: 100.0, child: const Text('100')),
|
||||
const SizedBox(height: 200.0, child: const Text('200')),
|
||||
],
|
||||
@ -97,7 +97,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new ListView(
|
||||
children: <Widget>[]
|
||||
children: const <Widget>[]
|
||||
),
|
||||
),
|
||||
);
|
||||
@ -109,7 +109,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new ListView(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(height: 300.0, child: const Text('300')),
|
||||
const SizedBox(height: 400.0, child: const Text('400')),
|
||||
],
|
||||
@ -124,7 +124,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new ListView(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(height: 300.0, child: const Text('300')),
|
||||
],
|
||||
),
|
||||
@ -138,7 +138,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new ListView(
|
||||
children: <Widget>[]
|
||||
children: const <Widget>[]
|
||||
),
|
||||
),
|
||||
);
|
||||
@ -152,7 +152,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new ListView(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(height: 300.0, child: const Text('300')),
|
||||
const SizedBox(height: 400.0, child: const Text('400')),
|
||||
],
|
||||
@ -167,7 +167,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new ListView(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(height: 300.0, child: const Text('300')),
|
||||
const SizedBox(height: 400.0, child: const Text('400')),
|
||||
const SizedBox(height: 100.0, child: const Text('100')),
|
||||
@ -191,7 +191,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new ListView(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(height: 100.0, child: const Text('100')),
|
||||
],
|
||||
),
|
||||
@ -205,7 +205,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new ListView(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(height: 100.0, child: const Text('100')),
|
||||
const SizedBox(height: 200.0, child: const Text('200')),
|
||||
const SizedBox(height: 400.0, child: const Text('400')),
|
||||
|
@ -188,7 +188,7 @@ void main() {
|
||||
height: 0.0,
|
||||
child: new ListView(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Text('padded', textDirection: TextDirection.ltr),
|
||||
],
|
||||
),
|
||||
|
@ -27,7 +27,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new CustomScrollView(
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SliverToBoxAdapter(child: const SizedBox(height: 2000.0)),
|
||||
],
|
||||
),
|
||||
@ -57,7 +57,7 @@ void main() {
|
||||
await tester.pumpAndSettle(const Duration(seconds: 1));
|
||||
expect(painter, doesNotOverscroll);
|
||||
});
|
||||
|
||||
|
||||
testWidgets('Nested scrollable', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
new Directionality(
|
||||
@ -71,7 +71,7 @@ void main() {
|
||||
child: new Container(
|
||||
width: 600.0,
|
||||
child: new CustomScrollView(
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
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 innerPainter = tester.renderObject(find.byType(CustomPaint).last);
|
||||
|
||||
|
||||
await slowDrag(tester, const Offset(200.0, 200.0), const Offset(0.0, 5.0));
|
||||
expect(outerPainter, paints..circle());
|
||||
expect(innerPainter, paints..circle());
|
||||
});
|
||||
|
||||
|
||||
testWidgets('Overscroll indicator changes side when you drag on the other side', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new CustomScrollView(
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SliverToBoxAdapter(child: const SizedBox(height: 2000.0)),
|
||||
],
|
||||
),
|
||||
@ -132,7 +132,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new CustomScrollView(
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SliverToBoxAdapter(child: const SizedBox(height: 2000.0)),
|
||||
],
|
||||
),
|
||||
@ -169,7 +169,7 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new CustomScrollView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SliverToBoxAdapter(child: const SizedBox(height: 20.0)),
|
||||
],
|
||||
),
|
||||
@ -190,7 +190,7 @@ void main() {
|
||||
child: new CustomScrollView(
|
||||
reverse: true,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SliverToBoxAdapter(child: const SizedBox(height: 20.0)),
|
||||
],
|
||||
),
|
||||
@ -211,7 +211,7 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new CustomScrollView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SliverToBoxAdapter(child: const SizedBox(height: 20.0)),
|
||||
],
|
||||
),
|
||||
@ -235,7 +235,7 @@ void main() {
|
||||
child: new CustomScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SliverToBoxAdapter(child: const SizedBox(height: 20.0)),
|
||||
],
|
||||
),
|
||||
@ -287,7 +287,7 @@ void main() {
|
||||
scrollDirection: Axis.horizontal,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
reverse: true,
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SliverToBoxAdapter(child: const SizedBox(height: 20.0)),
|
||||
],
|
||||
),
|
||||
@ -308,7 +308,7 @@ void main() {
|
||||
child: new CustomScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SliverToBoxAdapter(child: const SizedBox(height: 20.0)),
|
||||
],
|
||||
),
|
||||
|
@ -611,7 +611,7 @@ void main() {
|
||||
child: new PageView(
|
||||
key: const PageStorageKey<String>('PageView'),
|
||||
controller: controller,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Placeholder(),
|
||||
const Placeholder(),
|
||||
const Placeholder(),
|
||||
@ -645,7 +645,7 @@ void main() {
|
||||
child: new PageView(
|
||||
key: const PageStorageKey<String>('PageView'),
|
||||
controller: controller,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Placeholder(),
|
||||
const Placeholder(),
|
||||
const Placeholder(),
|
||||
@ -663,7 +663,7 @@ void main() {
|
||||
child: new PageView(
|
||||
key: const PageStorageKey<String>('Check it again against your list and see consistency!'),
|
||||
controller: controller2,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Placeholder(),
|
||||
const Placeholder(),
|
||||
const Placeholder(),
|
||||
|
@ -13,11 +13,11 @@ void main() {
|
||||
expect(tester.renderObject<RenderBox>(find.byType(Placeholder)).size, const Size(800.0, 600.0));
|
||||
await tester.pumpWidget(const Center(child: const Placeholder()));
|
||||
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));
|
||||
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));
|
||||
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));
|
||||
});
|
||||
|
||||
|
@ -346,7 +346,7 @@ void main() {
|
||||
onNotification: (OverscrollNotification message) { scrolled = true; return false; },
|
||||
child: new ListView(
|
||||
primary: true,
|
||||
children: <Widget>[],
|
||||
children: const <Widget>[],
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -364,7 +364,7 @@ void main() {
|
||||
onNotification: (OverscrollNotification message) { scrolled = true; return false; },
|
||||
child: new ListView(
|
||||
primary: false,
|
||||
children: <Widget>[],
|
||||
children: const <Widget>[],
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -383,7 +383,7 @@ void main() {
|
||||
child: new ListView(
|
||||
primary: false,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
children: <Widget>[],
|
||||
children: const <Widget>[],
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -402,7 +402,7 @@ void main() {
|
||||
child: new ListView(
|
||||
primary: true,
|
||||
physics: const ScrollPhysics(),
|
||||
children: <Widget>[],
|
||||
children: const <Widget>[],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -12,7 +12,7 @@ Future<Null> pumpTest(WidgetTester tester, TargetPlatform platform) async {
|
||||
platform: platform,
|
||||
),
|
||||
home: new CustomScrollView(
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SliverToBoxAdapter(child: const SizedBox(height: 2000.0)),
|
||||
],
|
||||
),
|
||||
|
@ -8,11 +8,11 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
Shader createShader(Rect bounds) {
|
||||
return new LinearGradient(
|
||||
return const LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: <Color>[const Color(0x00FFFFFF), const Color(0xFFFFFFFF)],
|
||||
stops: <double>[0.1, 0.35]
|
||||
colors: const <Color>[const Color(0x00FFFFFF), const Color(0xFFFFFFFF)],
|
||||
stops: const <double>[0.1, 0.35]
|
||||
).createShader(bounds);
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Viewport(
|
||||
offset: new ViewportOffset.zero(),
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SliverToBoxAdapter(
|
||||
child: const SizedBox(height: 400.0, child: const Text('a')),
|
||||
),
|
||||
@ -211,7 +211,7 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Viewport(
|
||||
offset: new ViewportOffset.fixed(100.0),
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SliverToBoxAdapter(
|
||||
child: const SizedBox(height: 400.0, child: const Text('a')),
|
||||
),
|
||||
@ -227,7 +227,7 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Viewport(
|
||||
offset: new ViewportOffset.fixed(100.0),
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SliverToBoxAdapter(
|
||||
child: const SizedBox(height: 4000.0, child: const Text('a')),
|
||||
),
|
||||
@ -243,7 +243,7 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Viewport(
|
||||
offset: new ViewportOffset.zero(),
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SliverToBoxAdapter(
|
||||
child: const SizedBox(height: 4000.0, child: const Text('a')),
|
||||
),
|
||||
|
@ -249,7 +249,7 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Viewport(
|
||||
offset: new ViewportOffset.fixed(0.0),
|
||||
slivers: <Widget>[
|
||||
slivers: const <Widget>[
|
||||
const SliverPadding(padding: const EdgeInsets.all(100.0)),
|
||||
const SliverToBoxAdapter(child: const SizedBox(width: 400.0, height: 400.0, child: const Text('x'))),
|
||||
],
|
||||
@ -266,7 +266,7 @@ void main() {
|
||||
child: new Viewport(
|
||||
axisDirection: AxisDirection.left,
|
||||
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 SliverToBoxAdapter(child: const SizedBox(width: 201.0, child: const Text('x'))),
|
||||
],
|
||||
@ -280,7 +280,7 @@ void main() {
|
||||
child: new Viewport(
|
||||
axisDirection: AxisDirection.left,
|
||||
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 SliverToBoxAdapter(child: const SizedBox(width: 201.0, child: const Text('x'))),
|
||||
],
|
||||
@ -297,7 +297,7 @@ void main() {
|
||||
child: new Viewport(
|
||||
axisDirection: AxisDirection.up,
|
||||
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)),
|
||||
],
|
||||
),
|
||||
@ -310,7 +310,7 @@ void main() {
|
||||
child: new Viewport(
|
||||
axisDirection: AxisDirection.down,
|
||||
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)),
|
||||
],
|
||||
),
|
||||
@ -323,7 +323,7 @@ void main() {
|
||||
child: new Viewport(
|
||||
axisDirection: AxisDirection.right,
|
||||
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)),
|
||||
],
|
||||
),
|
||||
@ -336,7 +336,7 @@ void main() {
|
||||
child: new Viewport(
|
||||
axisDirection: AxisDirection.left,
|
||||
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)),
|
||||
],
|
||||
),
|
||||
@ -349,7 +349,7 @@ void main() {
|
||||
child: new Viewport(
|
||||
axisDirection: AxisDirection.left,
|
||||
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)),
|
||||
],
|
||||
),
|
||||
|
@ -13,7 +13,7 @@ Future<Null> test(WidgetTester tester, double offset, { double anchor: 0.0 }) {
|
||||
child: new Viewport(
|
||||
anchor: anchor / 600.0,
|
||||
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)),
|
||||
|
@ -636,7 +636,7 @@ void main() {
|
||||
textDirection: TextDirection.rtl,
|
||||
child: new Stack(
|
||||
alignment: Alignment.center,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
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)),
|
||||
@ -665,7 +665,7 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Stack(
|
||||
alignment: Alignment.center,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
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)),
|
||||
@ -694,7 +694,7 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Stack(
|
||||
alignment: Alignment.bottomRight,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
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)),
|
||||
@ -723,7 +723,7 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Stack(
|
||||
alignment: Alignment.topLeft,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
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)),
|
||||
|
@ -25,19 +25,19 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: textDirection,
|
||||
child: new Table(
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
children: const <TableRow>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('AAAAAA'), const Text('B'), const Text('C'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('D'), const Text('EEE'), const Text('F'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('G'), const Text('H'), const Text('III'),
|
||||
],
|
||||
),
|
||||
@ -71,19 +71,19 @@ void main() {
|
||||
2: const FixedColumnWidth(125.0),
|
||||
},
|
||||
defaultColumnWidth: const FixedColumnWidth(333.0),
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
children: const <TableRow>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('A1'), const Text('B1'), const Text('C1'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('A2'), const Text('B2'), const Text('C2'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('A3'), const Text('B3'), const Text('C3'),
|
||||
],
|
||||
),
|
||||
@ -141,19 +141,19 @@ void main() {
|
||||
2: const FixedColumnWidth(125.0),
|
||||
},
|
||||
defaultColumnWidth: const FixedColumnWidth(333.0),
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
children: const <TableRow>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('A1'), const Text('B1'), const Text('C1'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('A2'), const Text('B2'), const Text('C2'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('A3'), const Text('B3'), const Text('C3'),
|
||||
],
|
||||
),
|
||||
@ -206,19 +206,19 @@ void main() {
|
||||
textDirection: textDirection,
|
||||
child: new Table(
|
||||
border: new TableBorder.all(),
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
children: const <TableRow>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('AAAAAA'), const Text('B'), const Text('C'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('D'), const Text('EEE'), const Text('F'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('G'), const Text('H'), const Text('III'),
|
||||
],
|
||||
),
|
||||
@ -238,19 +238,19 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Table(
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
children: const <TableRow>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('A'), const Text('B'), const Text('C'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('D'), const Text('E'), const Text('F'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('G'), const Text('H'), const Text('I'),
|
||||
],
|
||||
),
|
||||
@ -266,14 +266,14 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Table(
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
children: const <TableRow>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('a'), const Text('b'), const Text('c'), const Text('d'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('e'), const Text('f'), const Text('g'), const Text('h'),
|
||||
],
|
||||
),
|
||||
@ -294,19 +294,19 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Table(
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
children: const <TableRow>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('AAAAAA'), const Text('B'), const Text('C'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('D'), const Text('EEE'), const Text('F'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('G'), const Text('H'), const Text('III'),
|
||||
],
|
||||
),
|
||||
@ -318,19 +318,19 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Table(
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
children: const <TableRow>[
|
||||
const TableRow(
|
||||
children: const<Widget>[
|
||||
const Text('AAA'), const Text('B'), const Text('C'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('D'), const Text('E'), const Text('FFFFFF'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('G'), const Text('H'), const Text('III'),
|
||||
],
|
||||
),
|
||||
@ -353,19 +353,19 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Table(
|
||||
defaultColumnWidth: const IntrinsicColumnWidth(),
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
children: const <TableRow>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('AAA'), const Text('B'), const Text('C'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('D'), const Text('E'), const Text('FFFFFF'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('G'), const Text('H'), const Text('III'),
|
||||
],
|
||||
),
|
||||
@ -389,19 +389,19 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Table(
|
||||
defaultColumnWidth: const IntrinsicColumnWidth(),
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
children: const <TableRow>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('AAAAAA'), const Text('B'), const Text('C'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('D'), const Text('EEE'), const Text('F'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('G'), const Text('H'), const Text('III'),
|
||||
],
|
||||
),
|
||||
@ -414,19 +414,19 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Table(
|
||||
defaultColumnWidth: const IntrinsicColumnWidth(),
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
children: const <TableRow>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('A'), const Text('B'), const Text('C'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('D'), const Text('EEE'), const Text('F'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('G'), const Text('H'), const Text('III'),
|
||||
],
|
||||
),
|
||||
@ -449,19 +449,19 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Table(
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
children: const <TableRow>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('AAA'), const Text('B'), const Text('C'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('D'), const Text('E'), const Text('FFFFFF'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('G'), const Text('H'), const Text('III'),
|
||||
],
|
||||
),
|
||||
@ -474,19 +474,19 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Table(
|
||||
defaultColumnWidth: const IntrinsicColumnWidth(),
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
children: const <TableRow>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('AAA'), const Text('B'), const Text('C'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('D'), const Text('E'), const Text('FFFFFF'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('G'), const Text('H'), const Text('III'),
|
||||
],
|
||||
),
|
||||
@ -522,8 +522,8 @@ void main() {
|
||||
),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('b'),
|
||||
],
|
||||
),
|
||||
@ -536,8 +536,8 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Table(
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('b'),
|
||||
],
|
||||
),
|
||||
@ -565,17 +565,17 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Table(
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: const <TableRow>[
|
||||
const TableRow(
|
||||
key: const ValueKey<int>(1),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const TestStatefulWidget(key: const ValueKey<int>(11)),
|
||||
const TestStatefulWidget(key: const ValueKey<int>(12)),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
const TableRow(
|
||||
key: const ValueKey<int>(2),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const TestStatefulWidget(key: const ValueKey<int>(21)),
|
||||
const TestStatefulWidget(key: const ValueKey<int>(22)),
|
||||
],
|
||||
@ -599,10 +599,10 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Table(
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: const <TableRow>[
|
||||
const TableRow(
|
||||
key: const ValueKey<int>(2),
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const TestStatefulWidget(key: const ValueKey<int>(21)),
|
||||
const TestStatefulWidget(key: const ValueKey<int>(22)),
|
||||
],
|
||||
@ -738,19 +738,19 @@ void main() {
|
||||
child: new Table(
|
||||
key: key0 = new GlobalKey(),
|
||||
defaultColumnWidth: const IntrinsicColumnWidth(),
|
||||
children: <TableRow>[
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
children: const <TableRow>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('A'), const Text('B'), const Text('C'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('D'), const Text('EEE'), const Text('F'),
|
||||
],
|
||||
),
|
||||
new TableRow(
|
||||
children: <Widget>[
|
||||
const TableRow(
|
||||
children: const <Widget>[
|
||||
const Text('G'), const Text('H'), const Text('III'),
|
||||
],
|
||||
),
|
||||
|
@ -16,7 +16,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Stack(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Text('a', textDirection: TextDirection.ltr),
|
||||
const Text('b', textDirection: TextDirection.ltr),
|
||||
const Text('c', textDirection: TextDirection.ltr),
|
||||
@ -31,7 +31,7 @@ void main() {
|
||||
child: new WidgetInspector(
|
||||
selectButtonBuilder: null,
|
||||
child: new Stack(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Text('a', textDirection: TextDirection.ltr),
|
||||
const Text('b', textDirection: TextDirection.ltr),
|
||||
const Text('c', textDirection: TextDirection.ltr),
|
||||
@ -353,7 +353,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Stack(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Text('a', textDirection: TextDirection.ltr),
|
||||
const Text('b', textDirection: TextDirection.ltr),
|
||||
const Text('c', textDirection: TextDirection.ltr),
|
||||
@ -403,7 +403,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Stack(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Text('a', textDirection: TextDirection.ltr),
|
||||
const Text('b', textDirection: TextDirection.ltr),
|
||||
const Text('c', textDirection: TextDirection.ltr),
|
||||
@ -476,7 +476,7 @@ void main() {
|
||||
new Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: new Stack(
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Text('a', textDirection: TextDirection.ltr),
|
||||
const Text('b', textDirection: TextDirection.ltr),
|
||||
const Text('c', textDirection: TextDirection.ltr),
|
||||
|
@ -21,7 +21,7 @@ void main() {
|
||||
new Wrap(
|
||||
alignment: WrapAlignment.start,
|
||||
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),
|
||||
@ -40,7 +40,7 @@ void main() {
|
||||
new Wrap(
|
||||
alignment: WrapAlignment.center,
|
||||
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),
|
||||
@ -59,7 +59,7 @@ void main() {
|
||||
new Wrap(
|
||||
alignment: WrapAlignment.end,
|
||||
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),
|
||||
@ -79,7 +79,7 @@ void main() {
|
||||
alignment: WrapAlignment.start,
|
||||
crossAxisAlignment: WrapCrossAlignment.start,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 300.0, height: 50.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,
|
||||
crossAxisAlignment: WrapCrossAlignment.center,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 300.0, height: 50.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,
|
||||
crossAxisAlignment: WrapCrossAlignment.end,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 300.0, height: 50.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(
|
||||
alignment: WrapAlignment.start,
|
||||
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),
|
||||
@ -160,7 +160,7 @@ void main() {
|
||||
new Wrap(
|
||||
alignment: WrapAlignment.center,
|
||||
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),
|
||||
@ -179,7 +179,7 @@ void main() {
|
||||
new Wrap(
|
||||
alignment: WrapAlignment.end,
|
||||
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),
|
||||
@ -200,7 +200,7 @@ void main() {
|
||||
crossAxisAlignment: WrapCrossAlignment.start,
|
||||
textDirection: TextDirection.ltr,
|
||||
verticalDirection: VerticalDirection.up,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 300.0, height: 50.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,
|
||||
textDirection: TextDirection.ltr,
|
||||
verticalDirection: VerticalDirection.up,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 300.0, height: 50.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,
|
||||
textDirection: TextDirection.ltr,
|
||||
verticalDirection: VerticalDirection.up,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 300.0, height: 50.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,
|
||||
spacing: 5.0,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 300.0, height: 30.0),
|
||||
@ -286,7 +286,7 @@ void main() {
|
||||
alignment: WrapAlignment.spaceBetween,
|
||||
spacing: 5.0,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 300.0, height: 30.0),
|
||||
@ -303,7 +303,7 @@ void main() {
|
||||
alignment: WrapAlignment.spaceAround,
|
||||
spacing: 5.0,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 310.0, height: 30.0),
|
||||
@ -320,7 +320,7 @@ void main() {
|
||||
alignment: WrapAlignment.spaceEvenly,
|
||||
spacing: 5.0,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 310.0, height: 30.0),
|
||||
@ -339,7 +339,7 @@ void main() {
|
||||
alignment: WrapAlignment.center,
|
||||
spacing: 5.0,
|
||||
textDirection: TextDirection.rtl,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 300.0, height: 30.0),
|
||||
@ -356,7 +356,7 @@ void main() {
|
||||
alignment: WrapAlignment.spaceBetween,
|
||||
spacing: 5.0,
|
||||
textDirection: TextDirection.rtl,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 300.0, height: 30.0),
|
||||
@ -373,7 +373,7 @@ void main() {
|
||||
alignment: WrapAlignment.spaceAround,
|
||||
spacing: 5.0,
|
||||
textDirection: TextDirection.rtl,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 310.0, height: 30.0),
|
||||
@ -390,7 +390,7 @@ void main() {
|
||||
alignment: WrapAlignment.spaceEvenly,
|
||||
spacing: 5.0,
|
||||
textDirection: TextDirection.rtl,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 310.0, height: 30.0),
|
||||
@ -409,7 +409,7 @@ void main() {
|
||||
runAlignment: WrapAlignment.center,
|
||||
runSpacing: 5.0,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 300.0, height: 30.0),
|
||||
@ -430,7 +430,7 @@ void main() {
|
||||
runAlignment: WrapAlignment.spaceBetween,
|
||||
runSpacing: 5.0,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 300.0, height: 30.0),
|
||||
@ -451,7 +451,7 @@ void main() {
|
||||
runAlignment: WrapAlignment.spaceAround,
|
||||
runSpacing: 5.0,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 300.0, height: 30.0),
|
||||
@ -472,7 +472,7 @@ void main() {
|
||||
runAlignment: WrapAlignment.spaceEvenly,
|
||||
runSpacing: 5.0,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 300.0, height: 30.0),
|
||||
@ -497,7 +497,7 @@ void main() {
|
||||
runSpacing: 5.0,
|
||||
textDirection: TextDirection.ltr,
|
||||
verticalDirection: VerticalDirection.up,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 300.0, height: 30.0),
|
||||
@ -519,7 +519,7 @@ void main() {
|
||||
runSpacing: 5.0,
|
||||
textDirection: TextDirection.ltr,
|
||||
verticalDirection: VerticalDirection.up,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 300.0, height: 30.0),
|
||||
@ -541,7 +541,7 @@ void main() {
|
||||
runSpacing: 5.0,
|
||||
textDirection: TextDirection.ltr,
|
||||
verticalDirection: VerticalDirection.up,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 300.0, height: 30.0),
|
||||
@ -563,7 +563,7 @@ void main() {
|
||||
runSpacing: 5.0,
|
||||
textDirection: TextDirection.ltr,
|
||||
verticalDirection: VerticalDirection.up,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 300.0, height: 30.0),
|
||||
@ -590,7 +590,7 @@ void main() {
|
||||
alignment: WrapAlignment.end,
|
||||
crossAxisAlignment: WrapCrossAlignment.end,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 100.0, height: 10.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
const SizedBox(width: 300.0, height: 30.0),
|
||||
@ -614,7 +614,7 @@ void main() {
|
||||
alignment: WrapAlignment.end,
|
||||
crossAxisAlignment: WrapCrossAlignment.end,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 400.0, height: 40.0),
|
||||
const SizedBox(width: 300.0, height: 30.0),
|
||||
const SizedBox(width: 200.0, height: 20.0),
|
||||
@ -641,7 +641,7 @@ void main() {
|
||||
alignment: WrapAlignment.start,
|
||||
crossAxisAlignment: WrapCrossAlignment.start,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 500.0, height: 10.0),
|
||||
const SizedBox(width: 500.0, height: 20.0),
|
||||
const SizedBox(width: 500.0, height: 30.0),
|
||||
@ -670,7 +670,7 @@ void main() {
|
||||
alignment: WrapAlignment.start,
|
||||
crossAxisAlignment: WrapCrossAlignment.start,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 10.0, height: 250.0),
|
||||
const SizedBox(width: 20.0, height: 250.0),
|
||||
const SizedBox(width: 30.0, height: 250.0),
|
||||
@ -699,7 +699,7 @@ void main() {
|
||||
spacing: 12.0,
|
||||
runSpacing: 8.0,
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 10.0, height: 250.0),
|
||||
const SizedBox(width: 20.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 {
|
||||
await tester.pumpWidget(new Wrap(
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const SizedBox(width: 500.0, height: 500.0),
|
||||
],
|
||||
));
|
||||
@ -733,7 +733,7 @@ void main() {
|
||||
|
||||
await tester.pumpWidget(new Wrap(
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
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,
|
||||
runSpacing: 7.0,
|
||||
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),
|
||||
@ -816,7 +816,7 @@ void main() {
|
||||
),
|
||||
child: new Wrap(
|
||||
textDirection: TextDirection.ltr,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
const Text('X', textDirection: TextDirection.ltr),
|
||||
],
|
||||
),
|
||||
|
@ -134,7 +134,7 @@ void main() {
|
||||
await tester.pumpWidget(
|
||||
new Localizations(
|
||||
locale: const Locale('en', 'US'),
|
||||
delegates: <LocalizationsDelegate<dynamic>>[
|
||||
delegates: const <LocalizationsDelegate<dynamic>>[
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
DefaultWidgetsLocalizations.delegate,
|
||||
],
|
||||
|
@ -606,7 +606,7 @@ void main() {
|
||||
buildContent: (BuildContext context) {
|
||||
return new Localizations.override(
|
||||
context: context,
|
||||
delegates: <OnlyRTLDefaultWidgetsLocalizationsDelegate>[
|
||||
delegates: const <OnlyRTLDefaultWidgetsLocalizationsDelegate>[
|
||||
// Override: no matter what the locale, textDirection is always RTL.
|
||||
const OnlyRTLDefaultWidgetsLocalizationsDelegate(),
|
||||
],
|
||||
|
@ -177,7 +177,7 @@ void main() {
|
||||
await tester.pumpWidget(new Row(
|
||||
textDirection: TextDirection.ltr,
|
||||
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),
|
||||
],
|
||||
));
|
||||
@ -237,7 +237,7 @@ void main() {
|
||||
await tester.pumpWidget(new Row(
|
||||
textDirection: TextDirection.ltr,
|
||||
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),
|
||||
],
|
||||
));
|
||||
|
Loading…
x
Reference in New Issue
Block a user