flutter_time_picker_spinner
flutter_time_picker_spinner copied to clipboard
onTimeChange() getting called without any user interaction
The widget renders fine, but onTimeChange() is getting called upon the initial widget build, without the user having touched the screen. Can I prevent this?
Just comment out this piece of code in the iniState() inside the package file
if (widget.onTimeChange != null) {
WidgetsBinding.instance!
.addPostFrameCallback((_) => widget.onTimeChange!(getDateTime()));
}