Skip to content

Commit

Permalink
feat: **Theme Colors**: Removed background, onBackground, `surfac…
Browse files Browse the repository at this point in the history
…eVariant`colors as `surface`, `onSurface`, `surfaceContainerHighest` should be used instead based on latest material changes in flutter v3.22.0.

 - CU-86c0287m8
  • Loading branch information
basemosama committed Aug 22, 2024
1 parent e52cecb commit 27c21bf
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions lib/src/model/playx_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -157,22 +157,6 @@ class PlayxColors {

/// The color used to tint surfaces, providing a subtle effect to emphasize the surface tone.
final Color surfaceTint;
//Deprecated
@Deprecated('Use surface instead. '
'This feature was deprecated after v3.18.0-0.1.pre.'
' It will be removed in the next releases.'
'You can still expand the colors of the theme by extending the PlayxColors class.')
final Color background;
@Deprecated('Use onSurface instead. '
'This feature was deprecated after v3.18.0-0.1.pre.'
' It will be removed in the next releases.'
'You can still expand the colors of the theme by extending the PlayxColors class.')
final Color onBackground;
@Deprecated('Use surfaceVariant instead. '
'This feature was deprecated after v3.18.0-0.1.pre.'
' It will be removed in the next releases.'
'You can still expand the colors of the theme by extending the PlayxColors class.')
final Color surfaceVariant;

static const Color white = Color(0xFFFFFFFF);
static const Color black = Color(0xFF000000);
Expand Down Expand Up @@ -328,10 +312,7 @@ class PlayxColors {
surfaceContainerHigh =
surfaceContainerHigh ?? scheme.surfaceContainerHigh,
surfaceContainerHighest =
surfaceContainerHighest ?? scheme.surfaceContainerHighest,
background = background ?? scheme.surface,
onBackground = onBackground ?? scheme.onSurface,
surfaceVariant = surfaceVariant ?? scheme.surfaceContainerHigh;
surfaceContainerHighest ?? scheme.surfaceContainerHighest;

const PlayxColors({
this.primary = blueMain,
Expand All @@ -352,11 +333,8 @@ class PlayxColors {
this.onErrorContainer = white,
this.outline = black,
this.outlineVariant = Colors.black12,
this.background = white,
this.onBackground = black,
this.surface = white,
this.onSurface = black,
this.surfaceVariant = Colors.white12,
this.onSurfaceVariant = Colors.black12,
this.inverseSurface = black,
this.onInverseSurface = white,
Expand Down

0 comments on commit 27c21bf

Please sign in to comment.