SwitchButton class

Inheritance

Constructors

SwitchButton({Key? key, SwitchConfig config = const SwitchConfig(), bool enabled = true, bool value = false, double size = 30, Color? activeThumbColor, Color? inactiveThumbColor, Color? activeThumbStrokeColor, Color? inactiveThumbStrokeColor, Color? activeTrackColor, Color? inactiveTrackColor, Color? activeTrackStrokeColor, Color? inactiveTrackStrokeColor, dynamic activeThumbIcon, dynamic inactiveThumbIcon, Color? activeThumbIconTint, Color? inactiveThumbIconTint, double? activeThumbSpacing, double? inactiveThumbSpacing, double? activeThumbStrokeSize, double? inactiveThumbStrokeSize, double? thumbIconSpacing, int thumbWalkingTime = 200, double? trackBorderRadius, double? trackStrokeSize, double trackRatio = 1.65, OnViewToggleListener? onToggle})
const

Properties

activeThumbColor Color?
final
activeThumbIcon → dynamic
final
activeThumbIconTint Color?
final
activeThumbSpacing double?
final
activeThumbStrokeColor Color?
final
activeThumbStrokeSize double?
final
activeTrackColor Color?
final
activeTrackStrokeColor Color?
final
config SwitchConfig
final
enabled bool
final
hashCode int
The hash code for this object.
no setterinherited
inactiveThumbColor Color?
final
inactiveThumbIcon → dynamic
final
inactiveThumbIconTint Color?
final
inactiveThumbSpacing double?
final
inactiveThumbStrokeColor Color?
final
inactiveThumbStrokeSize double?
final
inactiveTrackColor Color?
final
inactiveTrackStrokeColor Color?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onToggle OnViewToggleListener?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size double
final
thumbIconSpacing double?
final
thumbWalkingTime int
final
trackBorderRadius double?
final
trackRatio double
final
trackStrokeSize double?
final
value bool
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<SwitchButton>
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.
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