material-theme-builder icon indicating copy to clipboard operation
material-theme-builder copied to clipboard

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

Open vicenteparmi opened this issue 1 year ago • 1 comments

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):

  • OS: Windows
  • Browser Chrome
  • Version 124.0.6367.208

Smartphone:

  • Device: GalaxyA71
  • OS: Android 13

vicenteparmi avatar May 18 '24 16:05 vicenteparmi

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.

talamaska avatar May 30 '24 12:05 talamaska