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

@@ -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!,

View File

@@ -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(

View File

@@ -214,7 +214,7 @@ class Tab1RowItem extends StatelessWidget {
),
));
},
child: Container(
child: ColoredBox(
color: CupertinoDynamicColor.resolve(CupertinoColors.systemBackground, context),
child: SafeArea(
top: false,

View File

@@ -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>[

View File

@@ -358,7 +358,7 @@ class _BackdropDemoState extends State<BackdropDemo> with SingleTickerProviderSt
);
}).toList();
return Container(
return ColoredBox(
key: _backdropKey,
color: theme.primaryColor,
child: Stack(

View File

@@ -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(

View File

@@ -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,