WidgetSwitch1 class

Inheritance

Constructors

WidgetSwitch1({Key? key, Color colorLeftIcon = Colors.red, Color colorLeftBackground = Colors.red, IconData? iconLeft = Icons.close, Color colorRightIcon = Colors.green, Color colorRightBackground = Colors.green, IconData? iconRight = Icons.check, Color colorButton = const Color(0xffF0F0F0), double width = 100, Color backgroundCenter = const Color(0xFFF0F0F0), required ValueChanged onChange, int duration = 200, bool enable = true, double disableOpacity = 0.6, double buttonSize = 20, List values = const [0, 2, 1], double? height, dynamic initValue = 2})

Properties

backgroundCenter Color
Background center state
getter/setter pair
buttonSize double
size button
getter/setter pair
colorButton Color
button color
final
colorLeftBackground Color
colorLeftBackground state
getter/setter pair
colorLeftIcon Color
colorLeftIcon state
getter/setter pair
colorRightBackground Color
background colorRight state
getter/setter pair
colorRightIcon Color
color rightIcon state
getter/setter pair
disableOpacity double
Set disable opacity
getter/setter pair
duration int
set duration transition between states
getter/setter pair
enable bool
set switch enable
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
height double?
height switch
getter/setter pair
iconLeft IconData?
icon left state
final
iconRight IconData?
IconRight state
final
initValue ↔ dynamic
Init value/default
getter/setter pair
key Key?
Key Key
getter/setter pairoverride-getter
onChange ValueChanged
return the value on change tap
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values List
List of values to 2 or 3 states
final
width double
width switch
final

Methods

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