Fluent2SpinButton class
Fluent 2's SpinButton: a number in a field 32 tall (24 small), 10 in
at its start, and at its end the two 24 wide steppers stacked, the
up and down chevrons (16) in the third ink on a subtle fill under the
pointer; each moves value to the next multiple of step within min
and max (the one at a bound is disabled), repeating while held, as do
the up and down arrow keys (Page Up and Down by ten steps); figures typed
in the reader's digits are taken on Enter (the field keeps the focus) or
when the field lets go of it, and text that is no number puts the last
value back. format says the value in the field while it rests (the
number at step's precision by default); editing, it shows the number.
onChanged gets each value; null draws it disabled. Read as an
adjustable field named label. It is ui_core's DesignNumberField in
Fluent's field and steppers.
Fluent2SpinButton(label: 'Seats', value: seats, min: 1, max: 50, onChanged: (v) => setState(() => seats = v.toInt()))
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- Fluent2SpinButton
Constructors
-
Fluent2SpinButton({required num value, required ValueChanged<
num> ? onChanged, String? label, num? min, num? max, num step = 1, String format(num value)?, Fluent2InputSize size = Fluent2InputSize.medium, Fluent2InputAppearance appearance = Fluent2InputAppearance.outline, bool invalid = false, double width = 120, FocusNode? focusNode, bool autofocus = false, Fluent2Style? style, Key? key}) -
A spin button: a number field with its step buttons.
const
Properties
- appearance → Fluent2InputAppearance
-
Fluent's
appearance: which of its faces it wears.final - autofocus → bool
-
Whether the control takes focus when it first builds.
final
- focusNode → FocusNode?
-
The control's focus node; null makes and disposes its own.
final
- format → String Function(num value)?
-
The words the field shows for a value.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- invalid → bool
-
Whether it shows Fluent's invalid state, its edge in the danger colour.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String?
-
The spoken name; null takes the enclosing field's label.
final
- max → num?
-
The greatest number; null sets no bound.
final
- min → num?
-
The least number; null sets no bound.
final
-
onChanged
→ ValueChanged<
num> ? -
Called with the new number when the user types or steps it; null puts it
out of use.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → Fluent2InputSize
-
Fluent's
size: how large it is drawn.final - step → num
-
How far a step button moves the number.
final
- style → Fluent2Style?
-
This field's own look, slot by slot, over the text field theme
(Fluent2ThemeData.textFieldTheme): the slots Fluent2FieldFrame
names.
final
- value → num
-
The number shown.
final
- width → double
-
The field's width at the default text size, growing with the reader's
text size so its value is never cut;
double.infinitytakes the parent's.final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< Fluent2SpinButton> -
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.
override
-
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