configure static method

void configure({
  1. Widget onLoading(
    1. BuildContext context
    )?,
  2. Widget onError(
    1. BuildContext context,
    2. 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);
  }
}