rydmike / flex_color_scheme

A Flutter package to make and use beautiful color scheme based themes.
Other
887 stars 100 forks source link

Playground: FAB fabSchemeColor code for value SchemeColor.secondary is not generated. #200

Open rydmike opened 8 months ago

rydmike commented 8 months ago

When selecting SchemeColor secondary for the FAB, the config code for it is not generated.

This is remnant from when secondary was the default for both M2 and M3 mode, before M3 specs existed. Playground then left out secondary selection as it was no need to define it.

As a fix we will now only leave it out when no selection has been made (null) and add the selected color regardless of it is same as default color or not in M2 (default = secondary) or M3 (default = primaryContainer) mode. Then we do not have to figure out when it should be left out or not depending on mode.