onPress method
Implementation
onPress(BuildContext context) async {
if (preventClicking != true) {
if (allowClicking?.isActive ?? false) allowClicking!.cancel();
allowClicking = Timer(
const Duration(milliseconds: 300), () => preventClicking = false);
preventClicking = true;
WidgetModel.unfocus();
if (enabled != false) await onClick(context);
}
}