Skip to content

Commit 1441205

Browse files
committed
Example: Minor nit update
1 parent c163af1 commit 1441205

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

example/lib/core/views/universal/color_scheme_view.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class ColorSchemeView extends StatelessWidget {
3131
Widget build(BuildContext context) {
3232
final ThemeData theme = Theme.of(context);
3333
final ColorScheme colorScheme = scheme ?? theme.colorScheme;
34-
final bool useMaterial3 = theme.useMaterial3;
3534
const double spacing = 6;
3635

3736
// Grab the card border from the theme card shape
@@ -46,12 +45,13 @@ class ColorSchemeView extends StatelessWidget {
4645
// If border was null, make one matching Card default, but with border
4746
// side, if it was not null, we leave it as it was.
4847
border ??= RoundedRectangleBorder(
49-
borderRadius: BorderRadius.all(Radius.circular(useMaterial3 ? 12 : 4)),
48+
borderRadius:
49+
BorderRadius.all(Radius.circular(theme.useMaterial3 ? 12 : 4)),
5050
side: BorderSide(color: colorScheme.outlineVariant),
5151
);
5252
}
5353
return Theme(
54-
data: Theme.of(context).copyWith(
54+
data: theme.copyWith(
5555
cardTheme: CardTheme.of(context).copyWith(
5656
elevation: 0,
5757
shape: border,

0 commit comments

Comments
 (0)