Enable use_colored_box lint (#117370)
This commit is contained in:
committed by
GitHub
parent
46bb85376b
commit
81bc54be75
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user