afterLoad method
The afterLoad method will check if the state is loading
If loading it will display the loading widget.
You can also specify the name of the loadingKey.
Implementation
Widget afterLoad(
{required Function() child, Widget? loading, String? loadingKey}) {
if (isLoading(name: loadingKey ?? "default")) {
return loading ?? Nylo.appLoader();
}
return child();
}