Enable use_colored_box lint (#117370)
This commit is contained in:
committed by
GitHub
parent
46bb85376b
commit
81bc54be75
@@ -524,7 +524,7 @@ class ItemGalleryBox extends StatelessWidget {
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: ColoredBox(
|
||||
color: Theme.of(context).primaryColor,
|
||||
child: Center(
|
||||
child: Text(tabName, style: Theme.of(context).textTheme.headlineSmall!.copyWith(color: Colors.white)),
|
||||
|
||||
@@ -91,7 +91,7 @@ class _BackdropFilterPageState extends State<BackdropFilterPage> with TickerProv
|
||||
child: addBlur(grid(txt, 17, 5), _blurGroup),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Container(
|
||||
ColoredBox(
|
||||
color: Colors.white,
|
||||
child:Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
||||
@@ -74,9 +74,9 @@ class _PostBackdropFilterPageState extends State<PostBackdropFilterPage> with Ti
|
||||
),
|
||||
getConditionalBackdrop(),
|
||||
RepaintBoundary(
|
||||
child: Container(
|
||||
child: ColoredBox(
|
||||
color: Colors.white,
|
||||
child:Row(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
const Text('Include BackdropFilter:'),
|
||||
|
||||
@@ -88,7 +88,7 @@ class WindowManagerBodyState extends State<WindowManagerBody> {
|
||||
Widget _statusWidget() {
|
||||
assert(_lastTestStatus != _LastTestStatus.pending);
|
||||
final String? message = _lastTestStatus == _LastTestStatus.success ? 'Success' : lastError;
|
||||
return Container(
|
||||
return ColoredBox(
|
||||
color: _lastTestStatus == _LastTestStatus.success ? Colors.green : Colors.red,
|
||||
child: Text(
|
||||
message!,
|
||||
|
||||
@@ -520,7 +520,7 @@ class _AnimationDemoHomeState extends State<AnimationDemoHome> {
|
||||
|
||||
final List<Widget> headings = <Widget>[];
|
||||
for (int index = 0; index < allSections.length; index++) {
|
||||
headings.add(Container(
|
||||
headings.add(ColoredBox(
|
||||
color: _kAppBackgroundColor,
|
||||
child: ClipRect(
|
||||
child: _AllSectionsView(
|
||||
|
||||
@@ -214,7 +214,7 @@ class Tab1RowItem extends StatelessWidget {
|
||||
),
|
||||
));
|
||||
},
|
||||
child: Container(
|
||||
child: ColoredBox(
|
||||
color: CupertinoDynamicColor.resolve(CupertinoColors.systemBackground, context),
|
||||
child: SafeArea(
|
||||
top: false,
|
||||
|
||||
@@ -95,7 +95,7 @@ over water meant for the whole central valley of California? The story will shoc
|
||||
return SingleChildScrollView(
|
||||
child: SafeArea(
|
||||
top: false,
|
||||
child: Container(
|
||||
child: ColoredBox(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
|
||||
@@ -358,7 +358,7 @@ class _BackdropDemoState extends State<BackdropDemo> with SingleTickerProviderSt
|
||||
);
|
||||
}).toList();
|
||||
|
||||
return Container(
|
||||
return ColoredBox(
|
||||
key: _backdropKey,
|
||||
color: theme.primaryColor,
|
||||
child: Stack(
|
||||
|
||||
@@ -243,7 +243,7 @@ class _LeaveBehindListItem extends StatelessWidget {
|
||||
}
|
||||
return false;
|
||||
},
|
||||
background: Container(
|
||||
background: ColoredBox(
|
||||
color: theme.primaryColor,
|
||||
child: const Center(
|
||||
child: ListTile(
|
||||
@@ -251,7 +251,7 @@ class _LeaveBehindListItem extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
secondaryBackground: Container(
|
||||
secondaryBackground: ColoredBox(
|
||||
color: theme.primaryColor,
|
||||
child: const Center(
|
||||
child: ListTile(
|
||||
|
||||
@@ -122,7 +122,7 @@ class NestedViewEventBodyState extends State<NestedViewEventBody> {
|
||||
Widget _statusWidget() {
|
||||
assert(_lastTestStatus != _LastTestStatus.pending);
|
||||
final String message = _lastTestStatus == _LastTestStatus.success ? 'Success' : lastError!;
|
||||
return Container(
|
||||
return ColoredBox(
|
||||
color: _lastTestStatus == _LastTestStatus.success ? Colors.green : Colors.red,
|
||||
child: Text(
|
||||
message,
|
||||
|
||||
@@ -66,7 +66,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
),
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
Container(color: Colors.grey.shade200, child: Options(_model)),
|
||||
ColoredBox(color: Colors.grey.shade200, child: Options(_model)),
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
|
||||
@@ -508,7 +508,7 @@ class _FuzzerState extends State<Fuzzer> with SingleTickerProviderStateMixin {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
return ColoredBox(
|
||||
color: Colors.black,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
@@ -577,7 +577,7 @@ class _UnderlinesState extends State<Underlines> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final Size size = MediaQuery.of(context).size;
|
||||
return Container(
|
||||
return ColoredBox(
|
||||
color: Colors.black,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
@@ -680,7 +680,7 @@ class _FallbackState extends State<Fallback> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final Size size = MediaQuery.of(context).size;
|
||||
return Container(
|
||||
return ColoredBox(
|
||||
color: Colors.black,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
@@ -754,7 +754,7 @@ class Bidi extends StatefulWidget {
|
||||
class _BidiState extends State<Bidi> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
return ColoredBox(
|
||||
color: Colors.black,
|
||||
child: ListView(
|
||||
padding: const EdgeInsets.symmetric(vertical: 40.0, horizontal: 20.0),
|
||||
@@ -862,7 +862,7 @@ class _ZalgoState extends State<Zalgo> with SingleTickerProviderStateMixin {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
return ColoredBox(
|
||||
color: Colors.black,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
@@ -988,7 +988,7 @@ class _PaintingState extends State<Painting> with SingleTickerProviderStateMixin
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final Size size = MediaQuery.of(context).size;
|
||||
return Container(
|
||||
return ColoredBox(
|
||||
color: Colors.black,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
|
||||
Reference in New Issue
Block a user