Skip to content

Commit

Permalink
feat: add onChangeStart/end for SliderFieldBlocBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
LeandreBl committed Jan 17, 2024
1 parent a74a635 commit a081abb
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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) {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a081abb

Please sign in to comment.