state method Null safety

  1. @visibleForTesting
RefreshIndicatorMode state(
  1. BuildContext context
)
visibleForTesting">@visibleForTesting

Retrieve the current state of the CupertinoSliverRefreshControl. The same as the state that gets passed into the builder function. Used for testing.

Implementation

@visibleForTesting
static RefreshIndicatorMode state(BuildContext context) {
  final _CupertinoSliverRefreshControlState state = context.findAncestorStateOfType<_CupertinoSliverRefreshControlState>()!;
  return state.refreshState;
}