configure static method
void
configure({
- Widget onLoading(
- BuildContext context
- Widget onError(
- BuildContext context,
- ErrorState state
Call this function inside main to configure what Widget
to show when there is Loading State or Error State
Implementation
static void configure({
Widget Function(BuildContext context)? onLoading,
Widget Function(BuildContext context, ErrorState state)? onError,
}) {
if (onLoading != null) {
_configureOnLoading(onLoading);
}
if (onError != null) {
_configureOnError(onError);
}
}