state static method

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;
}