DesignNumberField constructor

const DesignNumberField({
  1. Key? key,
  2. required double? value,
  3. required ValueChanged<double?>? onChanged,
  4. required DesignNumberFieldBuilder fieldBuilder,
  5. required DesignNumberFieldButtonBuilder buttonBuilder,
  6. DesignNumberFieldLayoutBuilder? layoutBuilder,
  7. double? min,
  8. double? max,
  9. double step = 1,
  10. double? pageStep,
  11. int? fractionDigits,
  12. TextEditingController? controller,
  13. FocusNode? focusNode,
  14. bool autofocus = false,
  15. String? semanticLabel,
  16. String semanticFormatterCallback(
    1. double value
    )?,
  17. Duration repeatDelay = const Duration(milliseconds: 400),
  18. Duration repeatInterval = const Duration(milliseconds: 80),
})

A number field showing value.

Implementation

const DesignNumberField({
  super.key,
  required this.value,
  required this.onChanged,
  required this.fieldBuilder,
  required this.buttonBuilder,
  this.layoutBuilder,
  this.min,
  this.max,
  this.step = 1,
  this.pageStep,
  this.fractionDigits,
  this.controller,
  this.focusNode,
  this.autofocus = false,
  this.semanticLabel,
  this.semanticFormatterCallback,
  this.repeatDelay = const Duration(milliseconds: 400),
  this.repeatInterval = const Duration(milliseconds: 80),
}) : assert(step > 0),
     assert(min == null || max == null || min <= max);