afterNotNull method
The afterNotNull method will check if the variable passed in is null
If the variable is not null, it will display the loading widget.
Implementation
Widget afterNotNull(
dynamic variable, {
required Function() child,
Widget? loading,
}) {
if (variable == null) {
return loading ?? Nylo.appLoader();
}
return child();
}