MorphSlider class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MorphSlider
Constructors
- MorphSlider.new({Key? key, required bool stateValue, ThumbType thumbType = ThumbType.circle, bool isVertical = false, EdgeInsetsGeometry margin = EdgeInsets.zero, void onSwitch(bool)?, void onSwipeLeft(bool)?, void onSwipeRight(bool)?, double offOpacity = 1.0, bool applyThumbRotationAnimation = true, double? height, double? width, IconData? offIcon, IconData? onIcon, Color offSliderColor = const Color(0xFF9E9E9E), Color onSliderColor = const Color(0xFF2196F3), Color offThumbColor = const Color(0xFF02383C), Color onThumbColor = const Color(0xFF02383C), Color sliderBorderColor = const Color(0x00000000), Color thumbBorderColor = const Color(0x00000000), double sliderBorderWidth = 0.0, double sliderRadius = 5.0, double sliderThikness = 10.0, double thumbBorderWidth = 0.0, double thumbRadius = 22.0, SwitcherSize size = SwitcherSize.medium, IconTransitionStyle iconTransitionStyle = IconTransitionStyle.scale, int durationInMs = 1000, TextDirection direction = TextDirection.ltr, bool disabled = false, Color? thumbIconColor, Curve switchCurve = Curves.bounceOut})
-
const
Properties
- applyThumbRotationAnimation → bool
-
Whether to apply rotation animation to the thumb.
final
- direction → TextDirection
-
Text direction for the slider (LTR or RTL).
final
- disabled → bool
-
If true, disables all interactions and dims the slider.
final
- durationInMs → int
-
Duration of the animation in milliseconds.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Custom height for the slider (overrides size if set).
final
- iconTransitionStyle → IconTransitionStyle
-
Animation style for icon transitions.
final
- isVertical → bool
-
If true, the slider is displayed vertically.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- margin → EdgeInsetsGeometry
-
Outer margin for the slider widget.
final
- offIcon → IconData?
-
Icon to display when the switch is in the 'off' state.
final
- offOpacity → double
-
Opacity of the slider when in the 'off' state.
final
- offSliderColor → Color
-
Color of the slider when in the 'off' state.
final
- offThumbColor → Color
-
Color of the thumb when in the 'off' state.
final
- onIcon → IconData?
-
Icon to display when the switch is in the 'on' state.
final
- onSliderColor → Color
-
Color of the slider when in the 'on' state.
final
- onSwipeLeft → void Function(bool)?
-
Callback when the user swipes left on the slider.
final
- onSwipeRight → void Function(bool)?
-
Callback when the user swipes right on the slider.
final
- onSwitch → void Function(bool)?
-
Callback when the switch state changes (tapped).
final
- onThumbColor → Color
-
Color of the thumb when in the 'on' state.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → SwitcherSize
-
Predefined size of the switch (small, medium, large).
final
- sliderBorderColor → Color
-
Border color of the slider track.
final
- sliderBorderWidth → double
-
Border width of the slider track.
final
- sliderRadius → double
-
Border radius of the slider track.
final
- sliderThikness → double
-
Thickness of the slider track.
final
- stateValue → bool
-
The current state of the switch (on/off).
final
- switchCurve → Curve
-
Global Curve that will use in all the animations
final
- thumbBorderColor → Color
-
Border color of the thumb.
final
- thumbBorderWidth → double
-
Border width of the thumb.
final
- thumbIconColor → Color?
-
Override the color of the icon on the thumb
final
- thumbRadius → double
-
Radius of the thumb.
final
- thumbType → ThumbType
-
The shape of the thumb (circle or square).
final
- width → double?
-
Custom width for the slider (overrides size if set).
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< MorphSlider> -
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