expectState<TState extends AFComponentState> method

Future<void> expectState<TState extends AFComponentState>(
  1. Future<void> withState(
    1. TState,
    2. AFRouteState
    )
)

Implementation

Future<void> expectState<TState extends AFComponentState>( Future<void> Function(TState, AFRouteState) withState) async {
  assert(TState != AFComponentState, "You must specify the state type as a type parameter");
  final public = AFibF.g.internalOnlyActiveStore.state.public;
  return withState(public.componentState<TState>(), public.route);
}