From 19da86141515742c1c5317351af22ddcf969c804 Mon Sep 17 00:00:00 2001 From: Surafel Desalegn <54795447+M-Rafel@users.noreply.github.com> Date: Tue, 13 Sep 2022 11:55:48 +0300 Subject: [PATCH] On Tap added on the items --- lib/src/numberpicker.dart | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/src/numberpicker.dart b/lib/src/numberpicker.dart index 63b97a1..5ddde62 100644 --- a/lib/src/numberpicker.dart +++ b/lib/src/numberpicker.dart @@ -207,10 +207,15 @@ class _NumberPickerState extends State { final child = isExtra ? SizedBox.shrink() - : Text( - _getDisplayedValue(value), - style: itemStyle, - ); + : InkWell( + onTap: () { + widget.onChanged(value); + }, + child: Text( + _getDisplayedValue(value), + style: itemStyle, + ), + ); return Container( width: widget.itemWidth,