ToggleButtonsThemeData class

Defines default property values for descendant ToggleButtons widgets.

Descendant widgets obtain the current ToggleButtonsThemeData object using ToggleButtonsTheme.of. Instances of ToggleButtonsThemeData can be customized with ToggleButtonsThemeData.copyWith.

Typically a ToggleButtonsThemeData is specified as part of the overall Theme with ThemeData.toggleButtonsTheme.

See also:

Mixed-in types
Annotations

Constructors

ToggleButtonsThemeData({TextStyle? textStyle, BoxConstraints? constraints, Color? color, Color? selectedColor, Color? disabledColor, Color? fillColor, Color? focusColor, Color? highlightColor, Color? hoverColor, Color? splashColor, Color? borderColor, Color? selectedBorderColor, Color? disabledBorderColor, BorderRadius? borderRadius, double? borderWidth})
Creates the set of color and border properties used to configure ToggleButtons.
const

Properties

borderColor → Color?
The border color to display when the toggle button is enabled.
final
borderRadius → BorderRadius?
The radii of the border's corners.
final
borderWidth → double?
The width of the border surrounding each toggle button.
final
color → Color?
The color for descendant Text and Icon widgets if the toggle button is enabled.
final
constraints → BoxConstraints?
Defines the button's size.
final
disabledBorderColor → Color?
The border color to display when the toggle button is disabled.
final
disabledColor → Color?
The color for descendant Text and Icon widgets if the toggle button is disabled.
final
fillColor → Color?
The fill color for selected toggle buttons.
final
focusColor → Color?
The color to use for filling the button when the button has input focus.
final
hashCode → int
The hash code for this object.
no setteroverride
highlightColor → Color?
The highlight color for the toggle button's InkWell.
final
hoverColor → Color?
The color to use for filling the toggle button when the button has a pointer hovering over it.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedBorderColor → Color?
The border color to display when the toggle button is selected.
final
selectedColor → Color?
The color for descendant Text and Icon widgets if the toggle button is selected.
final
splashColor → Color?
The splash color for the toggle button's InkWell.
final
textStyle → TextStyle?
The default text style for ToggleButtons.children.
final

Methods

copyWith({TextStyle? textStyle, BoxConstraints? constraints, Color? color, Color? selectedColor, Color? disabledColor, Color? fillColor, Color? focusColor, Color? highlightColor, Color? hoverColor, Color? splashColor, Color? borderColor, Color? selectedBorderColor, Color? disabledBorderColor, BorderRadius? borderRadius, double? borderWidth}) → ToggleButtonsThemeData
Creates a copy of this object but with the given fields replaced with the new values.
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

Static Methods

lerp(ToggleButtonsThemeData? a, ToggleButtonsThemeData? b, double t) → ToggleButtonsThemeData?
Linearly interpolate between two toggle buttons themes.