Control.number constructor

Control.number({
  1. required String key,
  2. String? description,
  3. String? title,
  4. void onChange(
    1. dynamic
    )?,
  5. int? value,
  6. int? max,
  7. int? min,
  8. Widget? prefixIcon,
})

Implementation

factory Control.number({
  required String key,
  String? description,
  String? title,
  void Function(dynamic)? onChange,
  int? value,
  int? max,
  int? min,
  Widget? prefixIcon,
}) =>
    Control(
      title: title ?? '',
      description: description ?? '',
      onChange: onChange,
      key: key,
      type: ControlType.number,
      value: <String, int>{
        'selected': value ?? min ?? 0,
        'min': min ?? 0,
        'max': max ?? 10,
      },
      prefixIcon: prefixIcon,
    );