NumberBox<T extends num> constructor
const
NumberBox<T extends num> ({
- Key? key,
- required T? value,
- required ValueChanged<
T?> ? onChanged, - ValueChanged<
String> ? onTextChange, - FocusNode? focusNode,
- SpinButtonPlacementMode mode = SpinButtonPlacementMode.compact,
- bool clearButton = true,
- num smallChange = 1,
- num largeChange = 10,
- int precision = 2,
- num? min,
- num? max,
- bool allowExpressions = false,
- Widget? leadingIcon,
- bool autofocus = false,
- List<
TextInputFormatter> ? inputFormatters, - String? placeholder,
- TextStyle? placeholderStyle,
- double cursorWidth = 1.5,
- Radius cursorRadius = const Radius.circular(2.0),
- double? cursorHeight,
- Color? cursorColor,
- bool? showCursor,
- Color? highlightColor,
- Color? unfocusedColor,
- TextStyle? style,
- TextAlign? textAlign,
- TextInputType? keyboardType = TextInputType.number,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- bool enableInteractiveSelection = true,
- Brightness? keyboardAppearance,
- ScrollController? scrollController,
- EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
- ScrollPhysics? scrollPhysics,
- TextSelectionControls? selectionControls,
- BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
- BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
- TextDirection? textDirection,
Creates a number box.
Implementation
const NumberBox({
super.key,
required this.value,
required this.onChanged,
this.onTextChange,
this.focusNode,
this.mode = SpinButtonPlacementMode.compact,
this.clearButton = true,
this.smallChange = 1,
this.largeChange = 10,
this.precision = 2,
this.min,
this.max,
this.allowExpressions = false,
this.leadingIcon,
this.autofocus = false,
this.inputFormatters,
this.placeholder,
this.placeholderStyle,
this.cursorWidth = 1.5,
this.cursorRadius = const Radius.circular(2.0),
this.cursorHeight,
this.cursorColor,
this.showCursor,
this.highlightColor,
this.unfocusedColor,
this.style,
this.textAlign,
this.keyboardType = TextInputType.number,
this.dragStartBehavior = DragStartBehavior.start,
this.enableInteractiveSelection = true,
this.keyboardAppearance,
this.scrollController,
this.scrollPadding = const EdgeInsets.all(20.0),
this.scrollPhysics,
this.selectionControls,
this.selectionHeightStyle = ui.BoxHeightStyle.tight,
this.selectionWidthStyle = ui.BoxWidthStyle.tight,
this.textDirection,
});