CustomAnimatedToggleSwitch<T> class Null safety

Inheritance

Constructors

CustomAnimatedToggleSwitch({Key? key, required T current, required List<T> values, required CustomIconBuilder<T> iconBuilder, Duration animationDuration = const Duration(milliseconds: 500), Curve animationCurve = Curves.easeInOutCirc, Size indicatorSize = const Size(48.0, double.infinity), dynamic onChanged(T)?, double dif = 0.0, dynamic onTap()?, FittingMode fittingMode = FittingMode.preventHorizontalOverlapping, CustomWrapperBuilder<T>? wrapperBuilder, CustomIndicatorBuilder<T>? foregroundIndicatorBuilder, CustomIndicatorBuilder<T>? backgroundIndicatorBuilder, double height = 50.0, IconArrangement iconArrangement = IconArrangement.row, bool iconsTappable = true, EdgeInsetsGeometry padding = EdgeInsets.zero, double minTouchTargetSize = 48.0, Duration dragStartDuration = const Duration(milliseconds: 200), Curve dragStartCurve = Curves.easeInOutCirc, TextDirection? textDirection, MouseCursor? defaultCursor, MouseCursor draggingCursor = SystemMouseCursors.grabbing, MouseCursor dragCursor = SystemMouseCursors.grab})
const

Properties

animationCurve Curve
Curve of the motion animation.
final
animationDuration Duration
Duration of the motion animation.
final
backgroundIndicatorBuilder CustomIndicatorBuilder<T>?
A builder for an indicator which is in behind the icons.
final
current → T
The currently selected value. It has to be set at onChanged or whenever for animating to this value.
final
defaultCursor MouseCursor?
MouseCursor to show when not hovering an indicator.
final
dif double
Space between the "indicator rooms" of the adjacent icons.
final
dragCursor MouseCursor
MouseCursor to show when hovering the indicators.
final
draggingCursor MouseCursor
MouseCursor to show when grabbing the indicators.
final
dragStartCurve Curve
The curve for the animation to the thumb when the user starts dragging.
final
dragStartDuration Duration
The duration for the animation to the thumb when the user starts dragging.
final
fittingMode FittingMode
The FittingMode of the switch.
final
foregroundIndicatorBuilder CustomIndicatorBuilder<T>?
A builder for an indicator which is in front of the icons.
final
hashCode int
The hash code for this object.
@nonVirtualread-onlyinherited
height double
The height of the whole switch including wrapper.
final
iconArrangement IconArrangement
Indicates if the icons should overlap.
final
iconBuilder CustomIconBuilder<T>
The IconBuilder for all icons with the specified size.
final
iconsTappable bool
Indicates if onChanged is called when an icon is tapped. If false the user can change the value only by dragging the indicator.
final
indicatorSize Size
Size of the indicator.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
minTouchTargetSize double
The minimum width of the indicator's hitbox.
final
onChanged → (dynamic Function?(T)?)
Callback for selecting a new value. The new current should be set here.
final
onTap → (dynamic Function?()?)
Callback for tapping anywhere on the widget.
final
padding EdgeInsetsGeometry
A padding between wrapper and icons/indicator.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
textDirection TextDirection?
The direction in which the icons are arranged.
final
values List<T>
All possible values.
final
wrapperBuilder CustomWrapperBuilder<T>?
The IconBuilder for all icons with the specified size.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _CustomAnimatedToggleSwitchState
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.
@protectedinherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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.
@nonVirtualinherited