ConfirmationSlider class

Inheritance

Constructors

ConfirmationSlider({Key? key, double height = 70, double width = 300, Color backgroundColor = Colors.white, Color? backgroundColorEnd, Color foregroundColor = Colors.blueAccent, Color iconColor = Colors.white, BoxShadow? shadow, Widget sliderButtonContent = const Icon(Icons.chevron_right, color: Colors.white, size: 35), String text = "Slide to confirm", TextStyle? textStyle, required VoidCallback onConfirmation, VoidCallback? onTapDown, VoidCallback? onTapUp, BorderRadius? foregroundShape, BorderRadius? backgroundShape, bool stickToEnd = false})
const

Properties

backgroundColor Color
The color of the background of the slider. Defaults to Colors.white.
final
backgroundColorEnd Color?
The color of the background of the slider when it has been slide to the end. By giving a value here, the background color will gradually change from backgroundColor to backgroundColorEnd when the user slides. Is not used by default.
final
backgroundShape BorderRadius?
The shape of the background of the slider. Defaults to a circular border radius
final
foregroundColor Color
The color of the moving element of the slider. Defaults to Colors.blueAccent.
final
foregroundShape BorderRadius?
The shape of the moving element of the slider. Defaults to a circular border radius
final
hashCode int
The hash code for this object.
no setterinherited
height double
Height of the slider. Defaults to 70.
final
iconColor Color
The color of the icon on the moving element if icon is IconData. Defaults to Colors.white.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onConfirmation VoidCallback
The callback when slider is completed. This is the only required field.
final
onTapDown VoidCallback?
The callback when slider is pressed.
final
onTapUp VoidCallback?
The callback when slider is release.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadow BoxShadow?
The shadow below the slider. Defaults to BoxShadow(color: Colors.black38, offset: Offset(0, 2),blurRadius: 2,spreadRadius: 0,).
final
sliderButtonContent Widget
The button widget used on the moving element of the slider. Defaults to Icon(Icons.chevron_right).
final
stickToEnd bool
Stick the slider to the end
final
text String
The text showed below the foreground. Used to specify the functionality to the user. Defaults to "Slide to confirm".
final
textStyle TextStyle?
The style of the text. Defaults to TextStyle(color: Colors.black26, fontWeight: FontWeight.bold,).
final
width double
Width of the slider. Defaults to 300.
final

Methods

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