From a081abbac8efcd3dc0ccc3c64742a9f78db30f99 Mon Sep 17 00:00:00 2001 From: LeandreBl Date: Wed, 17 Jan 2024 21:36:11 +0100 Subject: [PATCH] feat: add onChangeStart/end for SliderFieldBlocBuilder Close #343 --- .../lib/src/slider/slider_field_bloc_builder.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/flutter_form_bloc/lib/src/slider/slider_field_bloc_builder.dart b/packages/flutter_form_bloc/lib/src/slider/slider_field_bloc_builder.dart index 1bb2e6ae..d3dd90bd 100644 --- a/packages/flutter_form_bloc/lib/src/slider/slider_field_bloc_builder.dart +++ b/packages/flutter_form_bloc/lib/src/slider/slider_field_bloc_builder.dart @@ -59,6 +59,12 @@ class SliderFieldBlocBuilder extends StatelessWidget { /// [Slider.label] final String Function(BuildContext context, double value)? labelBuilder; + /// [Slider.onChangeStart] + final void Function(double)? onChangeStart; + + /// [Slider.onChangeEnd] + final void Function(double)? onChangeEnd; + const SliderFieldBlocBuilder({ Key? key, required this.inputFieldBloc, @@ -78,6 +84,8 @@ class SliderFieldBlocBuilder extends StatelessWidget { this.decoration = const InputDecoration(), this.errorBuilder, this.labelBuilder, + this.onChangeStart, + this.onChangeEnd }) : super(key: key); SliderFieldTheme themeOf(BuildContext context) { @@ -118,6 +126,8 @@ class SliderFieldBlocBuilder extends StatelessWidget { decoration: _buildDecoration(context, state, isEnabled), isEmpty: false, child: Slider( + onChangeEnd: onChangeEnd, + onChangeStart: onChangeStart, value: value, min: min, max: max,