Enable sort_child_properties_last lint (#91585)

This commit is contained in:
Ian Hickson
2021-10-11 21:23:02 -07:00
committed by GitHub
parent ee07b0eafc
commit 6d5fc420b6
42 changed files with 171 additions and 169 deletions

View File

@@ -38,12 +38,12 @@ class MyStatelessWidget extends StatelessWidget {
backgroundColor: Color(0xFFE0E0E0),
actions: <Widget>[
TextButton(
child: Text('OPEN'),
onPressed: null,
child: Text('OPEN'),
),
TextButton(
child: Text('DISMISS'),
onPressed: null,
child: Text('DISMISS'),
),
],
),

View File

@@ -42,8 +42,8 @@ class MyStatelessWidget extends StatelessWidget {
backgroundColor: Colors.green,
actions: <Widget>[
TextButton(
child: Text('DISMISS'),
onPressed: null,
child: Text('DISMISS'),
),
],
),

View File

@@ -97,8 +97,8 @@ class _BottomAppBarDemoState extends State<BottomAppBarDemo> {
floatingActionButton: _showFab
? FloatingActionButton(
onPressed: () {},
child: const Icon(Icons.add),
tooltip: 'Create',
child: const Icon(Icons.add),
)
: null,
floatingActionButtonLocation: _fabLocation,

View File

@@ -50,8 +50,8 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
},
items: items.map((String item) {
return DropdownMenuItem<String>(
child: Text('Log $item'),
value: item,
child: Text('Log $item'),
);
}).toList(),
),

View File

@@ -36,8 +36,8 @@ class MyStatelessWidget extends StatelessWidget {
onPressed: () {
// Add your onPressed code here!
},
child: const Icon(Icons.navigation),
backgroundColor: Colors.green,
child: const Icon(Icons.navigation),
),
);
}

View File

@@ -105,8 +105,8 @@ class MyNavigationRailFab extends StatelessWidget {
),
child: animation.value == 0
? FloatingActionButton(
child: const Icon(Icons.add),
onPressed: onPressed,
child: const Icon(Icons.add),
)
: Align(
alignment: AlignmentDirectional.centerStart,

View File

@@ -39,8 +39,8 @@ class MyStatelessWidget extends StatelessWidget {
content: Text('This is a MaterialBanner'),
actions: <Widget>[
TextButton(
child: Text('DISMISS'),
onPressed: null,
child: Text('DISMISS'),
),
],
),

View File

@@ -34,7 +34,6 @@ class MyStatelessWidget extends StatelessWidget {
Widget build(BuildContext context) {
return Tooltip(
message: 'I am a Tooltip',
child: const Text('Tap this text and hold down to show a tooltip.'),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25),
gradient:
@@ -48,6 +47,7 @@ class MyStatelessWidget extends StatelessWidget {
),
showDuration: const Duration(seconds: 2),
waitDuration: const Duration(seconds: 1),
child: const Text('Tap this text and hold down to show a tooltip.'),
);
}
}