NumberPickerFormField constructor

NumberPickerFormField({
  1. required FormFieldSetter<int> onSaved,
  2. required FormFieldValidator<int> validator,
  3. Key? key,
  4. void onChanged(
    1. int value
    )?,
  5. int initialValue = 0,
  6. int minValue = 0,
  7. int maxValue = 100,
  8. Axis axis = Axis.vertical,
})

Implementation

NumberPickerFormField({
  required FormFieldSetter<int> super.onSaved,
  required FormFieldValidator<int> super.validator,
  super.key,
  void Function(int value)? onChanged,
  int super.initialValue = 0,
  int minValue = 0,
  int maxValue = 100,
  Axis axis = Axis.vertical,
}) : super(
        builder: (FormFieldState<int> state) => NumberPicker(
          minValue: minValue,
          maxValue: maxValue,
          value: initialValue,
          onChanged: (int value) {
            onChanged?.call(value);

            state.didChange(value);
          },
          itemHeight: 35,
          itemWidth: 35,
          itemCount: 5,
          axis: axis,
        ),
      );