CupertinoSpinBox constructor

CupertinoSpinBox({
  1. Key? key,
  2. double min = 0,
  3. double max = 100,
  4. double step = 1,
  5. double? pageStep,
  6. double value = 0,
  7. Duration interval = const Duration(milliseconds: 100),
  8. double? acceleration,
  9. int digits = 0,
  10. int decimals = 0,
  11. bool? enabled,
  12. bool readOnly = false,
  13. bool autofocus = false,
  14. TextInputType? keyboardType,
  15. TextInputAction? textInputAction,
  16. EdgeInsetsGeometry padding = const EdgeInsets.all(6),
  17. BoxDecoration decoration = _kDefaultRoundedBorderDecoration,
  18. Brightness? keyboardAppearance,
  19. Icon? incrementIcon,
  20. Icon? decrementIcon,
  21. bool showButtons = true,
  22. Widget? prefix,
  23. Widget? suffix,
  24. Axis direction = Axis.horizontal,
  25. TextAlign textAlign = TextAlign.center,
  26. TextStyle? textStyle,
  27. EditableTextContextMenuBuilder? contextMenuBuilder,
  28. bool? showCursor,
  29. Color? cursorColor,
  30. bool enableInteractiveSelection = true,
  31. double spacing = 8,
  32. ValueChanged<double>? onChanged,
  33. void onSubmitted(
    1. double
    )?,
  34. bool canChange(
    1. double value
    )?,
  35. VoidCallback? beforeChange,
  36. VoidCallback? afterChange,
  37. FocusNode? focusNode,
})

Creates a spinbox.

Implementation

CupertinoSpinBox({
  Key? key,
  this.min = 0,
  this.max = 100,
  this.step = 1,
  this.pageStep,
  this.value = 0,
  this.interval = const Duration(milliseconds: 100),
  this.acceleration,
  this.digits = 0,
  this.decimals = 0,
  bool? enabled,
  this.readOnly = false,
  this.autofocus = false,
  TextInputType? keyboardType,
  this.textInputAction,
  this.padding = const EdgeInsets.all(6),
  this.decoration = _kDefaultRoundedBorderDecoration,
  this.keyboardAppearance,
  Icon? incrementIcon,
  Icon? decrementIcon,
  this.showButtons = true,
  this.prefix,
  this.suffix,
  this.direction = Axis.horizontal,
  this.textAlign = TextAlign.center,
  this.textStyle,
  this.contextMenuBuilder,
  this.showCursor,
  this.cursorColor,
  this.enableInteractiveSelection = true,
  this.spacing = 8,
  this.onChanged,
  this.onSubmitted,
  this.canChange,
  this.beforeChange,
  this.afterChange,
  this.focusNode,
})  : assert(min <= max),
      keyboardType = keyboardType ??
          TextInputType.numberWithOptions(
            signed: min < 0,
            decimal: decimals > 0,
          ),
      enabled = (enabled ?? true) && min < max,
      //decoration = decoration ?? const BoxDecoration(),
      incrementIcon =
          incrementIcon ?? const Icon(CupertinoIcons.plus_circled),
      decrementIcon =
          decrementIcon ?? const Icon(CupertinoIcons.minus_circled),
      super(key: key);