FlexSubThemes class

Static sub-theme helpers used by widget sub theming in FlexColorScheme.

FlexSubThemes offers optional opinionated static theme helpers. You can change many properties of the the opt-in setup by defining custom configuration values in the FlexSubThemesData configuration class, and passing it to the FlexColorScheme.subThemesData property.

To enable the component sub-themes using default settings, pass a default constructor FlexSubThemesData to FlexColorScheme.subThemesData.

The configuration class FlexSubThemesData offers easy to use configuration properties for using these sub-themes in FlexColorScheme.

It is also possible to use the FlexSubThemes static sub-theming helpers without even using FlexColorScheme based theming.

The FlexSubThemesData configuration class does not use these static helpers. It is FlexColorScheme that uses the FlexSubThemesData class to configure the opt-in sub-themes, based on the setup information provided via FlexColorScheme.subThemesData, by passing properties defined in it, to the sub-theme helpers below, that are then used to define the component sub-themes for the produced ThemeData.

These component themes are currently available:

While it is possible to use them without FlexColorScheme it may not be ideal, as they are designed with the features used and needed by FlexColorScheme and its configuration class FlexSubThemesData in mind. The FlexSubThemes may have more frequent breaking changes than FlexColorScheme and FlexSubThemesData as it is a more secondary level. It was still decided to keep their APIs public.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

appBarTheme({ColorScheme? colorScheme, bool? centerTitle, Color? backgroundColor, Color? foregroundColor, double? elevation, double? scrolledUnderElevation, IconThemeData? iconTheme, IconThemeData? actionsIconTheme, Color? shadowColor, Color? surfaceTintColor, SystemUiOverlayStyle? systemOverlayStyle}) AppBarTheme
An opinionated AppBarTheme theme.
bottomAppBarTheme({required ColorScheme colorScheme, SchemeColor? backgroundSchemeColor, double? elevation, NotchedShape? shape, double? height, EdgeInsetsGeometry? padding, Color? shadowColor, Color? surfaceTintColor, bool? useMaterial3}) BottomAppBarTheme
An opinionated BottomAppBarTheme theme.
bottomNavigationBar({required ColorScheme colorScheme, TextStyle? labelTextStyle, double? selectedLabelSize, double? unselectedLabelSize, SchemeColor? selectedLabelSchemeColor, SchemeColor? unselectedLabelSchemeColor, bool? mutedUnselectedLabel, double? selectedIconSize, double? unselectedIconSize, SchemeColor? selectedIconSchemeColor, SchemeColor? unselectedIconSchemeColor, bool? mutedUnselectedIcon, SchemeColor? backgroundSchemeColor, double? opacity, double? elevation, bool? showSelectedLabels, bool? showUnselectedLabels, BottomNavigationBarType? type, BottomNavigationBarLandscapeLayout? landscapeLayout, int unselectedAlphaBlend = kUnselectedBackgroundPrimaryAlphaBlend, int unselectedAlpha = kUnselectedAlphaBlend, bool useFlutterDefaults = false}) BottomNavigationBarThemeData
An opinionated BottomNavigationBarThemeData with custom elevation.
bottomSheetTheme({Color? backgroundColor, Color? modalBackgroundColor, double? elevation, double? modalElevation, double? radius, Clip clipBehavior = Clip.antiAlias, BoxConstraints? constraints, Color? shadowColor, Color? surfaceTintColor}) BottomSheetThemeData
An opinionated BottomSheetThemeData with custom top corner radius.
buttonTheme({required ColorScheme colorScheme, SchemeColor? baseSchemeColor, double? radius, EdgeInsetsGeometry? padding, Size? minButtonSize, bool? alignedDropdown, bool? useTintedInteraction, bool? useTintedDisable}) ButtonThemeData
An opinionated ButtonThemeData theme.
cardTheme({double? radius, double? elevation, Color? shadowColor, Color? surfaceTintColor, Clip clipBehavior = Clip.antiAlias}) CardTheme
An opinionated CardTheme with custom corner radius and elevation.
checkboxTheme({required ColorScheme colorScheme, SchemeColor? baseSchemeColor, double? splashRadius, bool? unselectedIsColored, bool? useTintedInteraction, bool? useTintedDisable, bool? useMaterial3}) CheckboxThemeData
An opinionated CheckboxThemeData theme.
chipTheme({required ColorScheme colorScheme, SchemeColor? selectedSchemeColor, SchemeColor? baseSchemeColor, SchemeColor? deleteIconSchemeColor, required TextStyle labelStyle, TextStyle? secondaryLabelStyle, double? radius, Color? surfaceTintColor, bool? useTintedDisable, bool? useMaterial3}) ChipThemeData
An opinionated ChipThemeData theme with custom border radius and a custom theme that partially mimics the M3 style in M2 and works well with FlexColorScheme surface blends.
datePickerTheme({required ColorScheme colorScheme, Color? backgroundColor, SchemeColor? backgroundSchemeColor, SchemeColor? headerBackgroundSchemeColor, double? elevation, double? radius, InputDecorationTheme? inputDecorationTheme, bool? useInputDecoratorTheme, Color? shadowColor, Color? surfaceTintColor}) DatePickerThemeData
An opinionated DatePickerThemeData with custom corner radius.
dialogTheme({ColorScheme? colorScheme, Color? backgroundColor, SchemeColor? backgroundSchemeColor, double? radius, double? elevation, Color? shadowColor, Color? surfaceTintColor, TextStyle? titleTextStyle, TextStyle? contentTextStyle, EdgeInsetsGeometry? actionsPadding}) DialogTheme
An opinionated DialogTheme with custom corner radius and elevation.
drawerTheme({required ColorScheme colorScheme, SchemeColor? backgroundSchemeColor, double? radius, double? elevation, Color? shadowColor, Color? surfaceTintColor, double? width, bool? useMaterial3}) DrawerThemeData
An opinionated DrawerThemeData theme for the Drawer.
An opinionated DropdownMenuThemeData theme.
elevatedButtonTheme({required ColorScheme colorScheme, SchemeColor? baseSchemeColor, SchemeColor? onBaseSchemeColor, double? radius, double? elevation, EdgeInsetsGeometry? padding, Size? minButtonSize, MaterialStateProperty<TextStyle?>? textStyle, bool? useTintedInteraction, bool? useTintedDisable, InteractiveInkFeatureFactory? splashFactory, bool? useMaterial3}) ElevatedButtonThemeData
An opinionated ElevatedButtonThemeData theme.
filledButtonTheme({required ColorScheme colorScheme, SchemeColor? backgroundSchemeColor, double? radius, EdgeInsetsGeometry? padding, Size? minButtonSize, MaterialStateProperty<TextStyle?>? textStyle, bool? useTintedInteraction, bool? useTintedDisable, InteractiveInkFeatureFactory? splashFactory, bool? useMaterial3}) FilledButtonThemeData
An opinionated FilledButtonThemeData theme.
floatingActionButtonTheme({required ColorScheme colorScheme, SchemeColor? backgroundSchemeColor, double? radius, bool useShape = true, bool alwaysCircular = false, TextStyle? extendedTextStyle, bool? useTintedInteraction, bool? useMaterial3}) FloatingActionButtonThemeData
An opinionated FloatingActionButtonThemeData with custom border radius.
iconButtonTheme({required ColorScheme colorScheme, bool? useTintedInteraction, bool? useTintedDisable}) IconButtonThemeData
An opinionated IconButtonThemeData.
inputDecorationTheme({required ColorScheme colorScheme, TextTheme? textTheme, SchemeColor? baseSchemeColor, double? radius, FlexInputBorderType? borderType, bool filled = true, Color? fillColor, int? backgroundAlpha, SchemeColor? prefixIconSchemeColor, SchemeColor? borderSchemeColor, double? focusedBorderWidth, double? unfocusedBorderWidth, double gapPadding = 4, bool unfocusedHasBorder = true, bool focusedHasBorder = true, bool unfocusedBorderIsColored = true, bool? tintedInteractions, bool? tintedDisabled, bool? useMaterial3}) InputDecorationTheme
An opinionated InputDecorationTheme, with optional fill color and adjustable corner radius.
An opinionated MenuBarThemeData theme.
An opinionated MenuButtonThemeData theme.
An opinionated MenuThemeData theme.
An opinionated NavigationBarThemeData with a flat API.
An opinionated NavigationDrawerThemeData theme with simpler API.
An opinionated NavigationRailThemeData with simpler API.
onSchemeColor(SchemeColor value) SchemeColor
Returns the correct SchemeColor to be used as contrasting on SchemeColor pair for SchemeColor passed in via value.
outlinedButtonTheme({required ColorScheme colorScheme, SchemeColor? baseSchemeColor, SchemeColor? outlineSchemeColor, double? radius, double? pressedOutlineWidth, double? outlineWidth, EdgeInsetsGeometry? padding, Size? minButtonSize, MaterialStateProperty<TextStyle?>? textStyle, bool? useTintedInteraction, InteractiveInkFeatureFactory? splashFactory, bool? useTintedDisable, bool? useMaterial3}) OutlinedButtonThemeData
An opinionated OutlinedButtonThemeData theme.
popupMenuTheme({ColorScheme? colorScheme, SchemeColor? backgroundSchemeColor, SchemeColor? foregroundSchemeColor, Color? color, TextStyle? textStyle, double? radius, double? elevation, Color? surfaceTintColor}) PopupMenuThemeData
An opinionated PopupMenuThemeData with custom corner radius.
radioTheme({required ColorScheme colorScheme, SchemeColor? baseSchemeColor, double? splashRadius, bool? unselectedIsColored, bool? useTintedInteraction, bool? useTintedDisable, bool? useMaterial3}) RadioThemeData
An opinionated RadioThemeData theme.
schemeColor(SchemeColor value, ColorScheme colorScheme) Color
Returns the Color from passed in ColorScheme in colorScheme corresponding to the SchemeColor enum selection in value.
schemeColorPair(SchemeColor value, ColorScheme colorScheme) Color
Returns the Color from passed in ColorScheme in colorScheme that is the "on" color pair corresponding to the SchemeColor enum value passed in via value.
segmentedButtonTheme({required ColorScheme colorScheme, SchemeColor? selectedSchemeColor, SchemeColor? unselectedSchemeColor, SchemeColor? unselectedForegroundSchemeColor, SchemeColor? borderSchemeColor, double? radius, double? borderWidth, EdgeInsetsGeometry? padding, Size? minButtonSize, bool? useTintedInteraction, bool? useTintedDisable, InteractiveInkFeatureFactory? splashFactory, MaterialStateProperty<TextStyle?>? textStyle, bool? useMaterial3}) SegmentedButtonThemeData
An opinionated SearchBarThemeData theme for the SearchBar. An opinionated SearchViewThemeData theme for the SearchBar. An opinionated SegmentedButtonThemeData theme for the SegmentedButton.
sliderTheme({required ColorScheme colorScheme, SchemeColor? baseSchemeColor, double? trackHeight, ShowValueIndicator? showValueIndicator, FlexSliderIndicatorType? valueIndicatorType, Color? valueIndicatorColor, TextStyle? valueIndicatorTextStyle, bool? useTintedInteraction, bool? useTintedDisable, bool? useMaterial3}) SliderThemeData
An opinionated SliderThemeData theme for the Slider.
snackBarTheme({double? elevation, double? radius, Color? backgroundColor, ColorScheme? colorScheme, SchemeColor? backgroundSchemeColor, SchemeColor? actionTextSchemeColor, TextStyle? contentTextStyle}) SnackBarThemeData
An opinionated SnackBarThemeData with custom elevation.
switchTheme({required ColorScheme colorScheme, SchemeColor? baseSchemeColor, SchemeColor? thumbSchemeColor, bool? thumbFixedSize, double? splashRadius, bool? unselectedIsColored, bool? useTintedInteraction, bool? useTintedDisable, bool? useMaterial3}) SwitchThemeData
An opinionated SwitchThemeData theme.
tabBarTheme({required ColorScheme colorScheme, TextStyle? labelStyle, Color? labelColor, Color? unselectedLabelColor, TabBarIndicatorSize? indicatorSize, double? indicatorWeight, double? indicatorTopRadius, Color? indicatorColor, TextStyle? unselectedLabelStyle, Color? dividerColor, bool? useTintedInteraction, bool? useMaterial3}) TabBarTheme
An opinionated TabBarTheme theme.
textButtonTheme({required ColorScheme colorScheme, SchemeColor? baseSchemeColor, double? radius, EdgeInsetsGeometry? padding, Size? minButtonSize, MaterialStateProperty<TextStyle?>? textStyle, bool? useTintedInteraction, bool? useTintedDisable, InteractiveInkFeatureFactory? splashFactory, bool? useMaterial3}) TextButtonThemeData
An opinionated TextButtonThemeData theme.
textSelectionTheme({required ColorScheme colorScheme, SchemeColor? cursorSchemeColor, SchemeColor? selectionSchemeColor, double? selectionOpacity, SchemeColor? selectionHandleSchemeColor, Color? selectionHandleCustomColor}) TextSelectionThemeData
An opinionated TextSelectionThemeData theme.
timePickerTheme({required ColorScheme colorScheme, Color? backgroundColor, SchemeColor? backgroundSchemeColor, double? elevation, double? radius, double? elementRadius, InputDecorationTheme? inputDecorationTheme, bool? useInputDecoratorTheme, TextStyle? dayPeriodTextStyle, TextStyle? dialTextStyle, TextStyle? helpTextStyle, TextStyle? hourMinuteTextStyle, bool? useMaterial3}) TimePickerThemeData
An opinionated TimePickerThemeData with custom corner radius.
tintedDisable(Color overlay, Color tint) Color
Returns the FCS opinionated tinted disabled color on an overlay color.
tintedFocused(Color overlay, Color tint, [double factor = 1]) Color
Returns the FCS opinionated tinted focus color on an overlay color.
tintedHighlight(Color overlay, Color tint, [double factor = 1]) Color
Returns the FCS opinionated tinted highlight color on an overlay color.
tintedHovered(Color overlay, Color tint, [double factor = 1]) Color
Returns the FCS opinionated tinted hover color on an overlay color.
tintedPressed(Color overlay, Color tint, [double factor = 1]) Color
Returns the FCS opinionated tinted splash color on an overlay color.
tintedSplash(Color overlay, Color tint, [double factor = 1]) Color
Returns the FCS opinionated tinted splash color on an overlay color.
toggleButtonsTheme({required ColorScheme colorScheme, SchemeColor? baseSchemeColor, SchemeColor? unselectedSchemeColor, SchemeColor? borderSchemeColor, double? radius, double? borderWidth, Size? minButtonSize, TextStyle? textStyle, VisualDensity? visualDensity, bool? useTintedInteraction, bool? useTintedDisable, bool? useMaterial3}) ToggleButtonsThemeData
An opinionated ToggleButtonsThemeData theme.
tooltipTheme({required ColorScheme colorScheme, SchemeColor? backgroundSchemeColor, Color? backgroundColor, Color? foregroundColor, int? backgroundAlpha, double? borderRadius, Color? borderColor, TextStyle? textStyle, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Duration? waitDuration, Duration? showDuration}) TooltipThemeData
An opinionated TooltipThemeData