Enable use_colored_box lint (#117370)
This commit is contained in:
committed by
GitHub
parent
46bb85376b
commit
81bc54be75
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -125,7 +125,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
return ColoredBox(
|
||||
color: Colors.white,
|
||||
child: FocusTraversalGroup(
|
||||
policy: OrderedTraversalPolicy(),
|
||||
|
||||
@@ -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),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -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')),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user