numberSpinnerFormEntry method

Widget numberSpinnerFormEntry({
  1. String title = 'Seating Capacity',
  2. String subTitle = 'the seating capacity',
  3. double min = 1,
  4. double max = 500,
  5. double step = 1,
  6. int decimals = 0,
  7. dynamic onChanged(
    1. double?
    )?,
  8. String? validator(
    1. String?
    )?,
  9. double? defaultValue,
})

Implementation

Widget numberSpinnerFormEntry({
  String title = 'Seating Capacity',
  String subTitle = 'the seating capacity',
  double min = 1,
  double max = 500,
  double step = 1,
  int decimals = 0,
  Function(double?)? onChanged,
  String? Function(String?)? validator,
  double? defaultValue,
}) {
  return formEntry(
    title: title,
    subTitle: subTitle,
    inputWidget: SpinBox(
      enabled: isEdit,
      min: min,
      max: max,
      decimals: decimals,
      value: defaultValue ?? min,
      step: step,
      onChanged: onChanged,
      validator: validator,
      decoration: elegantInputDecoration(hintText: '', isSpinner: true),
    ),
  );
}