NumberSelector class

Inheritance

Constructors

NumberSelector({Key? key, int? max, int? min, int step = 1, bool enabled = true, dynamic onUpdate(int number)?, int current = 0, double height = 50.0, double? width = 350.0, double contentPadding = 20.0, double verticalDividerPadding = 5.0, double borderRadius = 2.0, Color borderColor = Colors.black26, Color dividerColor = Colors.black12, Color backgroundColor = Colors.white, double borderWidth = 1.0, Color iconColor = Colors.black54, IconData incrementIcon = Icons.chevron_right, IconData decrementIcon = Icons.chevron_left, IconData maxIcon = Icons.last_page, IconData minIcon = Icons.first_page, bool showMinMax = true, bool showSuffix = true, bool hasCenteredText = false, bool hasDividers = true, bool hasBorder = true, String prefixNaming = 'of', String? incrementTooltip = 'Increment', String? decrementTooltip = 'Decrement', String? maxTooltip = 'Max', String? minTooltip = 'Min', TextStyle? textStyle, Duration delayUpdate = Duration.zero})
const
NumberSelector.plain({Key? key, int? max, int? min, int step = 1, bool enabled = true, dynamic onUpdate(int number)?, int current = 0, double height = 50.0, double width = 200.0, double contentPadding = 20.0, double verticalDividerPadding = 5.0, double borderRadius = 2.0, Color borderColor = Colors.black26, Color dividerColor = Colors.black12, Color backgroundColor = Colors.transparent, double borderWidth = 1.0, Color iconColor = Colors.black54, IconData incrementIcon = Icons.add, IconData decrementIcon = Icons.remove, IconData maxIcon = Icons.last_page, IconData minIcon = Icons.first_page, bool showMinMax = true, bool showSuffix = true, bool hasCenteredText = true, bool hasDividers = false, bool hasBorder = false, String prefixNaming = 'of', String? incrementTooltip, String? decrementTooltip, String? maxTooltip, String? minTooltip, TextStyle? textStyle, Duration delayUpdate = Duration.zero})
factory

Properties

backgroundColor Color
Default is Colors.white
final
borderColor Color
Default is Colors.black26
final
borderRadius double
Default is 2.0 px
final
borderWidth double
Default is 1.0 px
final
contentPadding double
The spacing between the number and the buttons
final
current int
Startindex of selector If not set, the selector will start at 0
final
decrementIcon IconData
Decrement icon
final
decrementTooltip String?
Tooltip for the decrement button
final
delayUpdate Duration
Delays the execution of the onUpdate callback
final
dividerColor Color
Default is Colors.black12
final
enabled bool
Provide false to disable the entire selector
final
hasBorder bool
Shows or hides the outline of the selector
final
hasCenteredText bool
Center text in the textfield Default is false
final
hasDividers bool
Show or hide the lines between the buttons Default is true
final
hashCode int
The hash code for this object.
no setterinherited
height double
Default is 36.0 px
final
iconColor Color
Default is Colors.black54
final
incrementIcon IconData
Increment icon
final
incrementTooltip String?
Tooltip for the increment button
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
max int?
Maximum selectable value
final
maxIcon IconData
Maximal number icon
final
maxTooltip String?
Tooltip for the max button
final
min int?
Minimum selectable value
final
minIcon IconData
Minimal number icon
final
minTooltip String?
Tooltip for the min button
final
onUpdate → dynamic Function(int number)?
Callback on number change
final
prefixNaming String
The String displayed before the max number in the textField Default is 'of'
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showMinMax bool
Show min and max buttons if min and max are set Default is true
final
showSuffix bool
Show suffix if max is set Default is true
final
step int
The amount every increment/decrement will be Default is 1
final
textStyle TextStyle?
The TextStyle of the number
final
verticalDividerPadding double
The spacing between vertical deviders and the main container Default is 5.0 px
final
width double?
Default to 324.0 px. Provide null to expand to parent width
final

Methods

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