OptimusSegmentedControl<T> class
Segmented Control is a set of two or more segments, that provide closely related choices that affect an object, state, or view.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- OptimusSegmentedControl
Constructors
-
OptimusSegmentedControl({Key? key, OptimusWidgetSize size = OptimusWidgetSize.large, required Iterable<
OptimusGroupItem< items, required T value, required ValueChanged<T> >T> onItemSelected, String? label, String? error, bool isEnabled = true, bool isRequired = false, int? maxLines, Axis direction = Axis.horizontal})
Properties
- direction → Axis
-
Direction of the segmented control widget.
final
- error → String?
-
Error message that is displayed below the segmented control.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEnabled → bool
-
Whether the segmented control is enabled or not.
final
- isRequired → bool
-
Whether the segmented control is required or not.
final
-
items
→ List<
OptimusGroupItem< T> > -
List of segment control items.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String?
-
Label of the segmented control.
final
- maxLines → int?
-
Limits the number of lines of the segmented item text. In case of
the Axis.horizontal this will be set to 1.
final
-
onItemSelected
→ ValueChanged<
T> -
Callback that is called when user selects a new item.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → OptimusWidgetSize
-
Size of the segmented control.
final
- value → T
-
Current selected value.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
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
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited