DDSSwitch class

Inheritance

Constructors

DDSSwitch.new({Key? key, required bool value, required ValueChanged<bool> onToggle, Color? activeColor, Color? inactiveColor, SwitchShape shape = SwitchShape.circle, Color? activeTextColor, Color? inactiveTextColor, Color? toggleColor, Color? activeToggleColor, Color? inactiveToggleColor, double width = 70.0, double height = 35.0, double toggleSize = 25.0, double? valueFontSize = 16.0, double borderRadius = 20.0, double padding = 4.0, bool? showOnOff = false, String? activeText, String? inactiveText, FontWeight? activeTextFontWeight, FontWeight? inactiveTextFontWeight, BoxBorder? switchBorder, BoxBorder? activeSwitchBorder, BoxBorder? inactiveSwitchBorder, BoxBorder? toggleBorder, BoxBorder? activeToggleBorder, BoxBorder? inactiveToggleBorder, Icon? activeIcon, Icon? inactiveIcon, Duration duration = const Duration(milliseconds: 200), bool? disabled = false, List<BoxShadow>? toggleShadow})
const

Properties

activeColor Color?
final
activeIcon Icon?
final
activeSwitchBorder BoxBorder?
final
activeText String?
final
activeTextColor Color?
final
activeTextFontWeight FontWeight?
final
activeToggleBorder BoxBorder?
final
activeToggleColor Color?
final
borderRadius double
final
disabled bool?
final
duration Duration
final
hashCode int
The hash code for this object.
no setterinherited
height double
final
inactiveColor Color?
final
inactiveIcon Icon?
final
inactiveSwitchBorder BoxBorder?
final
inactiveText String?
final
inactiveTextColor Color?
final
inactiveTextFontWeight FontWeight?
final
inactiveToggleBorder BoxBorder?
final
inactiveToggleColor Color?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onToggle ValueChanged<bool>
final
padding double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape SwitchShape
final
showOnOff bool?
final
switchBorder BoxBorder?
final
toggleBorder BoxBorder?
final
toggleColor Color?
final
toggleShadow List<BoxShadow>?
final
toggleSize double
final
value bool
final
valueFontSize double?
final
width double
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _DDSSwitchState
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, int wrapWidth = 65}) 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