buildRefreshIndicator method

  1. @protected
Widget buildRefreshIndicator(
  1. BuildContext context
)

Drawn over the view while ViewModel.isRefreshing: the view shows a saved copy and the server is being asked again (ViewModel.watch). It fills the view and ignores pointers, so it places itself and never blocks a tap. Defaults to NavigationLogic.defaultRefreshIndicator, else DefaultRefreshIndicator.

Implementation

@protected
Widget buildRefreshIndicator(BuildContext context) {
  final logic = GetIt.I.isRegistered<NavigationLogic>()
      ? GetIt.I<NavigationLogic>()
      : null;
  return logic?.defaultRefreshIndicator?.call() ??
      const DefaultRefreshIndicator();
}