ZdsToggleButton class
A large text button that can toggle between multiple values with Zds style.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ZdsToggleButton
- Mixed in types
- Available Extensions
Constructors
-
ZdsToggleButton({required List<
String> values, required ValueChanged<int> onToggleCallback, Key? key, Color? backgroundColor, int initialValue = 0, EdgeInsets margin = const EdgeInsets.all(kBigTogglePadding), Color? foregroundColor}) -
Constructs a ZdsToggleButton.
const
Properties
- backgroundColor → Color?
-
The background color for the selected value from toggle bottom.
final
- foregroundColor → Color?
-
The foreground color for the selected value from toggle button.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialValue → int
-
Initial value for the toggle to be loaded with.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- margin → EdgeInsets
-
Margin around the outside of the button.
final
-
onToggleCallback
→ ValueChanged<
int> -
Called when the user clicks on toggle options.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
values
→ List<
String> -
The name of the option that will be displayed on the toggle.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → ZdsToggleButtonState -
Creates the mutable state for this widget at a given location in the tree.
override
-
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.
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
-
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 brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited