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

@@ -49,7 +49,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => _updateSize(),
child: Container(
child: ColoredBox(
color: Colors.amberAccent,
child: AnimatedSize(
curve: Curves.easeIn,

View File

@@ -34,7 +34,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
@override
Widget build(BuildContext context) {
return Container(
return ColoredBox(
color: Colors.white,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,

View File

@@ -69,7 +69,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
onPointerDown: _incrementDown,
onPointerMove: _updateLocation,
onPointerUp: _incrementUp,
child: Container(
child: ColoredBox(
color: Colors.lightBlueAccent,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,

View File

@@ -67,7 +67,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
onEnter: _incrementEnter,
onHover: _updateLocation,
onExit: _incrementExit,
child: Container(
child: ColoredBox(
color: Colors.lightBlueAccent,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,

View File

@@ -36,7 +36,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
@override
Widget build(BuildContext context) {
return Material(
child: Container(
child: ColoredBox(
color: Colors.white,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,

View File

@@ -125,7 +125,7 @@ class MyStatelessWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
return ColoredBox(
color: Colors.white,
child: FocusTraversalGroup(
policy: OrderedTraversalPolicy(),

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')),
),
),
),

View File

@@ -57,7 +57,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
@override
Widget build(BuildContext context) {
return Container(
return ColoredBox(
color: Colors.white,
child: AlignTransition(
alignment: _animation,

View File

@@ -70,7 +70,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
@override
Widget build(BuildContext context) {
return Container(
return ColoredBox(
color: Colors.white,
child: Center(
child: DecoratedBoxTransition(

View File

@@ -50,7 +50,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
@override
Widget build(BuildContext context) {
return Container(
return ColoredBox(
color: Colors.white,
child: FadeTransition(
opacity: _animation,