Enable use_colored_box lint (#117370)

This commit is contained in:
Michael Goderbauer
2022-12-20 14:09:55 -08:00
committed by GitHub
parent 46bb85376b
commit 81bc54be75
72 changed files with 198 additions and 194 deletions

View File

@@ -47,7 +47,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
child: SizedBox(
width: 200,
height: 200,
child: Container(
child: ColoredBox(
color: Colors.red,
child: AnimatedFractionallySizedBox(
widthFactor: selected ? 0.25 : 0.75,
@@ -55,9 +55,9 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
alignment: selected ? Alignment.topLeft : Alignment.bottomRight,
duration: const Duration(seconds: 1),
curve: Curves.fastOutSlowIn,
child: Container(
child: const ColoredBox(
color: Colors.blue,
child: const FlutterLogo(size: 75),
child: FlutterLogo(size: 75),
),
),
),

View File

@@ -56,9 +56,9 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
selected = !selected;
});
},
child: Container(
child: const ColoredBox(
color: Colors.blue,
child: const Center(child: Text('Tap me')),
child: Center(child: Text('Tap me')),
),
),
),