We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 566ab31 commit c11a01bCopy full SHA for c11a01b
lib/src/numberpicker.dart
@@ -212,11 +212,22 @@ class _NumberPickerState extends State<NumberPicker> {
212
style: itemStyle,
213
);
214
215
- return Container(
216
- width: widget.itemWidth,
217
- height: widget.itemHeight,
218
- alignment: Alignment.center,
219
- child: child,
+ return InkWell(
+ onTap: () {
+ if (!isExtra) {
+ widget.onChanged(value);
+ Future.delayed(
220
+ const Duration(milliseconds: 100),
221
+ () => _maybeCenterValue(),
222
+ );
223
+ }
224
+ },
225
+ child: Container(
226
+ width: widget.itemWidth,
227
+ height: widget.itemHeight,
228
+ alignment: Alignment.center,
229
+ child: child,
230
+ ),
231
232
}
233
0 commit comments