onTap static method
Implementation
static VoidCallback onTap(VoidCallback onTap, {int? interval = 500, bool? releaseFocus = true}) => () {
var millisecondsSinceEpoch = DateTime.now().millisecondsSinceEpoch;
if ((millisecondsSinceEpoch - _last) > (interval ?? 500)) {
onTap.call();
if (releaseFocus == true) {
FocusManager.instance.primaryFocus?.unfocus();
}
_last = millisecondsSinceEpoch;
}
};