IntSliderField constructor

IntSliderField({
  1. required String name,
  2. int? initialValue = 0,
  3. @Deprecated('Fields should not be aware of their context') void onChanged(
    1. BuildContext context,
    2. int? value
    )?,
  4. required int min,
  5. required int max,
  6. int? divisions,
})

Implementation

IntSliderField({
  required super.name,
  super.initialValue = 0,
  @Deprecated('Fields should not be aware of their context') super.onChanged,
  required super.min,
  required super.max,
  this.divisions,
}) : super(
        type: FieldType.intSlider,
        codec: FieldCodec<int>(
          toParam: (value) => value.toString(),
          toValue: (param) => double.tryParse(param ?? '')?.round(),
        ),
      );