SegmentedButtonThemeData class

Overrides the default values of visual properties for descendant SegmentedButton widgets.

Descendant widgets obtain the current SegmentedButtonThemeData object with SegmentedButtonTheme.of. Instances of SegmentedButtonTheme can be customized with SegmentedButtonThemeData.copyWith.

Typically a SegmentedButtonTheme is specified as part of the overall Theme with ThemeData.segmentedButtonTheme.

All SegmentedButtonThemeData properties are null by default. When null, the SegmentedButton computes its own default values, typically based on the overall theme's ThemeData.colorScheme, ThemeData.textTheme, and ThemeData.iconTheme.

Mixed-in types
Annotations

Constructors

SegmentedButtonThemeData({ButtonStyle? style, Widget? selectedIcon})
Creates a SegmentedButtonThemeData that can be used to override default properties in a SegmentedButtonTheme widget.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedIcon Widget?
Override for SegmentedButton.selectedIcon property.
final
style ButtonStyle?
Overrides the SegmentedButton's default style.
final

Methods

copyWith({ButtonStyle? style, Widget? selectedIcon}) SegmentedButtonThemeData
Creates a copy of this object 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(SegmentedButtonThemeData? a, SegmentedButtonThemeData? b, double t) SegmentedButtonThemeData
Linearly interpolates between two segmented button themes.