From c78b5ce574286efaa004d68c797574c8a0fd9a1d Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 27 Jul 2022 22:57:59 +0200 Subject: [PATCH] Reduce diff --- lib/src/base_spin_box.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/src/base_spin_box.dart b/lib/src/base_spin_box.dart index 0aa46d4..b956292 100644 --- a/lib/src/base_spin_box.dart +++ b/lib/src/base_spin_box.dart @@ -70,11 +70,6 @@ mixin SpinBoxMixin on State { decimals: widget.decimals, digits: widget.digits); } - void _stepUp() => controller.value += widget.step; - void _stepDown() => controller.value += -widget.step; - void _pageStepUp() => controller.value += widget.pageStep; - void _pageStepDown() => controller.value -= widget.pageStep; - @override void initState() { super.initState(); @@ -106,6 +101,12 @@ mixin SpinBoxMixin on State { super.dispose(); } + void _stepUp() => controller.value += widget.step; + void _stepDown() => controller.value -= widget.step; + + void _pageStepUp() => controller.value += widget.pageStep; + void _pageStepDown() => controller.value -= widget.pageStep; + void _handleValueChange() { widget.onChanged?.call(_controller.value); setState(() => _updateText(_controller.value));