useSubThemes property

bool useSubThemes
final

Set to true to opt in on using additional opinionated widget sub themes.

By default FlexThemeData.light, FlexThemeData.dark and FlexColorScheme.toTheme, tries to do as little as they need to just provide a consistent color schemed theme.

By opting in with useSubThemes set to true you get an opinionated set of widget sub themes applied. They can be conveniently customized via the subThemesData property, that holds quick and easy sub theme configuration values in the data class FlexSubThemesData.

Opinionated sub themes are provided for:

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 above 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 each widgets corner radius and some other styling take inspiration from the Material 3 (M3) Specification https://m3.material.io/ and uses its values as defaults when it is possible to do so in Flutter SDK theming within its current Material 2 (M2) design limitations.

Defaults to false.

Implementation

final bool useSubThemes;