Enable avoid_unnecessary_containers lint (#77294)
This commit is contained in:
committed by
GitHub
parent
c5d1600843
commit
ed755fba5e
@@ -61,11 +61,9 @@ void main() {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
home: Scaffold(
|
||||
body: Container(
|
||||
child: OutlinedButton(
|
||||
onPressed: () { },
|
||||
child: const Text('hello'),
|
||||
),
|
||||
body: OutlinedButton(
|
||||
onPressed: () { },
|
||||
child: const Text('hello'),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -83,11 +81,9 @@ void main() {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
home: Scaffold(
|
||||
body: Container(
|
||||
child: OutlinedButton(
|
||||
onPressed: () { },
|
||||
child: const Text('hello'),
|
||||
),
|
||||
body: OutlinedButton(
|
||||
onPressed: () { },
|
||||
child: const Text('hello'),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -717,7 +713,7 @@ void main() {
|
||||
shrinkWrap: true,
|
||||
scrollDirection: Axis.horizontal,
|
||||
// ListTile does not support horizontal list
|
||||
itemBuilder: (BuildContext context, int i) => Container(child: Text('Item $i')),
|
||||
itemBuilder: (BuildContext context, int i) => Text('Item $i'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -153,9 +153,7 @@ void main() {
|
||||
key: key1,
|
||||
child: const Text('1'),
|
||||
),
|
||||
Container(
|
||||
child: const Text('2'),
|
||||
),
|
||||
const Text('2'),
|
||||
],
|
||||
)),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user