subThemesData property

FlexSubThemesData? subThemesData
final

Activate using FlexColorScheme opinionated component sub-themes by passing in a default FlexSubThemesData().

To further configure the sub-themes, change the simple flat value properties as desired in FlexSubThemesData().

By default FlexThemeData.light, FlexThemeData.dark and FlexColorScheme.toTheme, do as little as they need to just provide a consistent Material 2 color schemed theme. The additions they do are described in FlexColorScheme.toTheme.

The original purpose of the opinionated sub-themes was to make it easy to add themed corner radius to all Widgets that support it, and to provide a consistent look on all buttons, including ToggleButtons.

Therefore the sub themes are a convenient way to opt-in on customized corner radius on Widgets using above themes. By opting in you can set corner radius for all covered Widgets to same corner radius in one go. There are also properties to override the global default for each widget to set different rounding per widget if so desired.

By default, if a defaultRadius is not specified, each widgets corner radius and some other styling take inspiration from the Material 3 (M3) specification https://m3.material.io/ and uses its specifications as defaults when it is possible to do so in Flutter SDK theming, within its current Material 2 (M2) design limitations.

Starting from version 5, by opting in via a default subThemesData you get an extensive set of widget component sub themes applied. They can be customized via the subThemesData property, that has quick and flat sub theme configuration values in the data class FlexSubThemesData.

Opinionated sub themes are provided for:

Defaults to null, resulting in FlexColorScheme not using any extra sub-theming in addition to those described in FlexColorScheme.toTheme.

Implementation

final FlexSubThemesData? subThemesData;