afterNotNull method
The afterNotNull method will check if the state is loading
If loading it will display the placeholder widget.
You can also specify the name of the loadingKey.
Implementation
Widget afterNotNull(dynamic variable,
{required Function() child, Widget? loadingPlaceholder}) {
if (variable == null) {
return loadingPlaceholder ?? Backpack.instance.nylo().appLoader;
}
return child();
}