onTap method
On tap run a action.
Implementation
Widget onTap(Function() action, {LoadingStyle? loadingStyle}) {
if (loadingStyle == null) {
return InkWell(
onTap: () async {
await action();
},
splashColor: Colors.transparent,
hoverColor: Colors.transparent,
focusColor: Colors.transparent,
child: this,
);
}
return _TapLoadingWrapper(
child: this,
action: action,
loadingStyle: loadingStyle,
);
}