FlexSubThemesData class

Parameters used by FlexColorScheme to configure FlexSubThemes when FlexColorScheme.useSubThemes is true.

The main use case for FlexSubThemes and the FlexSubThemesData is for easy to use customization of default border radius on all Flutter SDK Widgets and elements that supports border radius either via ShapeBorder or BorderRadiusGeometry.

By design the shape border radius rounding on included and supported sub-themes that use shapes, default to the border radius defined by the Material 3 guide per widget, see Material 3 Design guide.

Additionally the sub-theming offers a consistent button design on all buttons, including ToggleButtons that is style to match size of OutlinedButton regarding outline and the selected button color to ElevatedButton primary color. Hover and Focus colors are also matched. It is also size matched with the other buttons, and includes a theme implementation that makes it implement VisualDensity which it does not do out of the box in the SDK.

On select sub-themes the used default color from the theme's colorScheme can be changed with an enum color scheme selection value. This is currently supported by these sub-themes:

Future versions may extend these quick color selection options to other sub-themes where there is a high demand to change the used base color from their default ColorScheme based color to another color scheme based color. As before you can also modify FlexColorScheme produced ThemeData object with copyWith, just as you can with normal ThemeData, to make and add custom sub-themes designs that FlexColorScheme does not include.

Mixed in types
Annotations

Constructors

FlexSubThemesData({bool interactionEffects = true, bool blendOnColors = true, bool blendTextTheme = true, bool useTextTheme = true, double? defaultRadius, Size buttonMinSize = kButtonMinSize, EdgeInsetsGeometry buttonPadding = kButtonPadding, double thickBorderWidth = kThickBorderWidth, double thinBorderWidth = kThinBorderWidth, double? textButtonRadius, double? elevatedButtonRadius, double elevatedButtonElevation = kElevatedButtonElevation, double? outlinedButtonRadius, double? toggleButtonsRadius, double? inputDecorationRadius, SchemeColor? inputDecoratorSchemeColor, bool inputDecoratorIsFilled = true, Color? inputDecoratorFillColor, FlexInputBorderType inputDecoratorBorderType = FlexInputBorderType.outline, bool inputDecoratorUnfocusedHasBorder = true, double? chipRadius, SchemeColor? chipSchemeColor, double? fabRadius, bool fabUseShape = true, double? cardRadius, double cardElevation = kCardElevation, double? popupMenuRadius, double popupMenuElevation = kPopupMenuElevation, double? popupMenuOpacity = 1, double? dialogRadius, double dialogElevation = kDialogElevation, double? timePickerDialogRadius, double snackBarElevation = kSnackBarElevation, SchemeColor? tabBarIndicatorSchemeColor, double? bottomSheetRadius, double bottomSheetElevation = kBottomSheetElevation, double bottomSheetModalElevation = kBottomSheetModalElevation, double bottomNavigationBarElevation = kBottomNavigationBarElevation, double bottomNavigationBarOpacity = 1, SchemeColor? bottomNavigationBarSchemeColor, SchemeColor? bottomNavigationBarBackgroundSchemeColor, BottomNavigationBarLandscapeLayout? bottomNavigationBarLandscapeLayout, bool navigationBarIsStyled = true, double? navigationBarHeight, double navigationBarOpacity = 1, SchemeColor? navigationBarIconSchemeColor, SchemeColor? navigationBarTextSchemeColor, SchemeColor? navigationBarHighlightSchemeColor, SchemeColor? navigationBarBackgroundSchemeColor, bool? navigationBarMutedUnselectedIcon, bool? navigationBarMutedUnselectedText, double? navigationBarSelectedLabelSize, double? navigationBarUnselectedLabelSize, double? navigationBarSelectedIconSize, double? navigationBarUnselectedIconSize, NavigationDestinationLabelBehavior? navigationBarLabelBehavior})
Default constructor, used to make an immutable FlexSubThemesData object.
const

Properties

blendOnColors bool
Use selected surfaceMode and blendLevel in FlexColorScheme.light and FlexColorScheme.dark to also blend in each corresponding ColorScheme color property's color into their onColors onSurface, onBackGround, onError, onPrimary and onSecondary.
final
blendTextTheme bool
Use selection surfaceMode and blendLevel in FlexColorScheme.light and FlexColorScheme.dark to also blend primary color into text themes for both ThemeData.textTheme and ThemeData.primaryTextTheme.
final
bottomNavigationBarBackgroundSchemeColor SchemeColor?
Select which color from the passed in ColorScheme to use as background color for the bottom navigation bar.
final
bottomNavigationBarElevation double
Elevation of BottomNavigationBar.
final
bottomNavigationBarLandscapeLayout BottomNavigationBarLandscapeLayout?
The arrangement of the bottom navigation bar's items when the enclosing MediaQueryData.orientation is Orientation.landscape.
final
bottomNavigationBarOpacity double
BottomNavigationBar opacity.
final
bottomNavigationBarSchemeColor SchemeColor?
Defines which Theme based ColorScheme based color the bottom navigation bar selected icon and text uses.
final
bottomSheetElevation double
Elevation of none modal BottomSheet.
final
bottomSheetModalElevation double
Elevation of modal BottomSheet.
final
bottomSheetRadius double?
Border radius override value for BottomSheet.
final
buttonMinSize Size
Minimum button size for all buttons.
final
buttonPadding EdgeInsetsGeometry
Rounded buttons need a bit more horizontal padding to accommodate for the rounding.
final
cardElevation double
Elevation of Card.
final
cardRadius double?
Border radius override value for Card.
final
chipRadius double?
Border radius override value for Chip widgets.
final
chipSchemeColor SchemeColor?
Defines which Theme based ColorScheme based color the Chip's use as their base color.
final
defaultRadius double?
Border radius used on all widgets when FlexColorScheme use its FlexSubThemesData to configure sub-themes with FlexSubThemes.
final
dialogElevation double
Elevation of Dialog.
final
dialogRadius double?
Border radius override value for Dialog.
final
elevatedButtonElevation double
Default elevation of ElevatedButton.
final
elevatedButtonRadius double?
Border radius override value for ElevatedButton.
final
fabRadius double?
Border radius override value for FloatingActionButton.
final
fabUseShape bool
Use shape theming on Floating Action Button (FAB).
final
hashCode int
The hash code for this object.
no setteroverride
inputDecorationRadius double?
Border radius override value for InputDecoration.
final
inputDecoratorBorderType FlexInputBorderType
Determines the type of border InputDecorator uses.
final
inputDecoratorFillColor Color?
Determines the color of the filled InputDecorator.
final
inputDecoratorIsFilled bool
Determines if the InputDecorator is filled with a color.
final
inputDecoratorSchemeColor SchemeColor?
Defines which Theme based ColorScheme based color the input decorator uses as color for the border and fill color when they are used.
final
inputDecoratorUnfocusedHasBorder bool
Determines if the InputDecorator unfocused state has a border.
final
interactionEffects bool
Opt-in on using color branded hover, focus, highlight and splash interaction state effects.
final
Select which color from the passed in ColorScheme to use as background color for the navigation bar.
final
Height of the container for the Material 3 NavigationBar.
final
Select which color from the theme ColorScheme to use as base for the selected navigation bar's highlighted item.
final
Select which color from the passed in ColorScheme to use as base for the navigation bar's icon color.
final
When true, the NavigationBarThemeData theme for the M3 NavigationBar created will be opinionated and styled to match the rest of the FlexColorScheme opinionated sub-themes.
final
Specifies when each NavigationDestination's label should appear.
final
If true, the unselected icons in the NavigationBar use a more muted color version of the color defined by navigationBarIconSchemeColor.
final
If true, the unselected text labels in the NavigationBar use a more muted color version of the color defined by navigationBarTextSchemeColor.
final
NavigationBar background opacity.
final
The size of the icon on selected item.
final
The size of the text label on selected item.
final
Select which color from the passed in ColorScheme to use as base for the navigation bar's text color.
final
The size of the icon on unselected items.
final
The size of the text label on unselected items.
final
outlinedButtonRadius double?
Border radius override value for OutlinedButton.
final
popupMenuElevation double
Default elevation of PopupMenuButton.
final
popupMenuOpacity double?
Popup menu background opacity.
final
popupMenuRadius double?
Border radius override value for the menu on PopupMenuButton.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snackBarElevation double
Elevation of SnackBar.
final
tabBarIndicatorSchemeColor SchemeColor?
Defines which Theme based ColorScheme based color the TabBar indicator uses.
final
textButtonRadius double?
Border radius override value for TextButton.
final
thickBorderWidth double
Border width of Widgets with an outline border.
final
thinBorderWidth double
Border thickness on unselected input decorator and disabled buttons.
final
timePickerDialogRadius double?
Border radius override value for TimePickerDialog.
final
toggleButtonsRadius double?
Border radius override value for ToggleButtons.
final
useTextTheme bool
Use a Material 3 like and inspired text theme.
final

Methods

copyWith({bool? interactionEffects, bool? blendOnColors, bool? blendTextTheme, bool? useTextTheme, double? defaultRadius, Size? buttonMinSize, EdgeInsetsGeometry? buttonPadding, double? thickBorderWidth, double? thinBorderWidth, double? textButtonRadius, double? elevatedButtonRadius, double? elevatedButtonElevation, double? outlinedButtonRadius, double? toggleButtonsRadius, double? inputDecorationRadius, SchemeColor? inputDecoratorSchemeColor, bool? inputDecoratorIsFilled, Color? inputDecoratorFillColor, FlexInputBorderType? inputDecoratorBorderType, bool? inputDecoratorUnfocusedHasBorder, double? fabRadius, bool? fabUseShape, double? chipRadius, SchemeColor? chipSchemeColor, double? cardRadius, double? cardElevation, double? popupMenuRadius, double? popupMenuElevation, double? popupMenuOpacity, double? dialogElevation, double? dialogRadius, double? timePickerDialogRadius, double? snackBarElevation, SchemeColor? tabBarIndicatorSchemeColor, double? bottomSheetRadius, double? bottomSheetElevation, double? bottomSheetModalElevation, double? bottomNavigationBarElevation, double? bottomNavigationBarOpacity, SchemeColor? bottomNavigationBarSchemeColor, SchemeColor? bottomNavigationBarBackgroundSchemeColor, BottomNavigationBarLandscapeLayout? bottomNavigationBarLandscapeLayout, bool? navigationBarIsStyled, double? navigationBarHeight, double? navigationBarOpacity, SchemeColor? navigationBarIconSchemeColor, SchemeColor? navigationBarTextSchemeColor, SchemeColor? navigationBarHighlightSchemeColor, SchemeColor? navigationBarBackgroundSchemeColor, bool? navigationBarMutedUnselectedIcon, bool? navigationBarMutedUnselectedText, double? navigationBarSelectedLabelSize, double? navigationBarUnselectedLabelSize, double? navigationBarSelectedIconSize, double? navigationBarUnselectedIconSize, NavigationDestinationLabelBehavior? navigationBarLabelBehavior}) FlexSubThemesData
Copy the object with one or more provided properties changed.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override