material-foundation / material-theme-builder

Visualize dynamic color and create a custom Material Theme.
https://material-foundation.github.io/material-theme-builder/
Apache License 2.0
360 stars 27 forks source link

surfaceContainerLow must be declared, otherwise Cards and navbars appear with transparent backgrounds #307

Open vicenteparmi opened 1 month ago

vicenteparmi commented 1 month ago

Describe the bug In Flutter 3.22, parameters like surfaceContainerLow must be declared inside the ColorScheme, otherwise Cards and navbars appear with transparent backgrounds. I declared it myself inside the toColorScheme function and it is fixed now.

To Reproduce Steps to reproduce the behavior:

  1. Update to Flutter 3.22
  2. Use the generated Dart file from the theme builder
  3. Use a card widget or navbar
  4. The backgrounds will be transparent

Expected behavior The theme should provide the colors and the default backgrounds would appear.

Screenshots

Desktop (please complete the following information):

Smartphone:

talamaska commented 4 weeks ago

The Material 3 theme builder seems unfinished. I generated a theme for Flutter and despite having defined surfaceContainer elevation tints in MaterialTheme and ColorScheme, they are lost during the conversion to ColorScheme. We have a lot of missing colors. basically all surfaceContainer levels plus fixed colors for primary, secondary and tertiary colors.