CupertinoSegmentButtonData<T extends Object> class
final
Cupertino-specific configuration for a segmented control.
Maps to properties of CupertinoSlidingSegmentedControl on iOS.
Constructors
-
CupertinoSegmentButtonData({Iterable<
T> ? choices, Widget segmentBuilder(T choice)?, T? selectedChoice, ValueChanged<T?> ? onSelectionChanged, Key? widgetKey, Set<T> disabledChildren = kDefaultDisabledChildren, Color thumbColor = kDefaultThumbColor, EdgeInsetsGeometry padding = kDefaultPadding, Color backgroundColor = kDefaultBackgroundColor, bool proportionalWidth = kDefaultProportionalWidth, bool isMomentary = kDefaultIsMomentary}) -
Creates Cupertino-specific segmented button configuration.
const
Properties
- backgroundColor → Color
-
Background color of the segmented control.
final
-
choices
→ Iterable<
T> ? -
The choices to display in the segmented button.
finalinherited
-
disabledChildren
→ Set<
T> -
Set of disabled segment values.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isMomentary → bool
-
Whether the selection is momentary (resets after tap).
final
-
onSelectionChanged
→ ValueChanged<
T?> ? -
A callback for when the selected choice changes.
finalinherited
- padding → EdgeInsetsGeometry
-
Padding around the segmented control.
final
- proportionalWidth → bool
-
Whether segments have proportional widths.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- segmentBuilder → Widget Function(T choice)?
-
A builder for the segments.
finalinherited
- selectedChoice → T?
-
The currently selected choice.
finalinherited
- thumbColor → Color
-
Color of the sliding thumb.
final
- widgetKey → Key?
-
A key to identify the widget.
finalinherited
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
Constants
- kDefaultBackgroundColor → const CupertinoDynamicColor
- Default value for backgroundColor.
-
kDefaultDisabledChildren
→ const Set<
Never> - Default value for disabledChildren.
- kDefaultIsMomentary → const bool
- Default value for isMomentary.
- kDefaultPadding → const EdgeInsets
- Default value for padding.
- kDefaultProportionalWidth → const bool
- Default value for proportionalWidth.
- kDefaultThumbColor → const CupertinoDynamicColor
- Default value for thumbColor.