createStateViewAF method

Iterable<Object?> createStateViewAF(
  1. AFState state,
  2. TRouteParam param,
  3. AFRouteSegmentChildren? children
)
inherited

Implementation

Iterable<Object?> createStateViewAF(AFState state, TRouteParam param, AFRouteSegmentChildren? children) {
  final public = state.public;
  final stateApp = public.componentStateOrNull<TState>();
  if(stateApp == null) {
    throw AFException("Root application state $TState cannot be null");
  }
  final stateViewCtx = AFBuildStateViewContext<TState, TRouteParam>(stateApp: stateApp, routeParam: param, statePublic: public, children: children, private: state.private);
  final result = createStateModels(stateViewCtx);
  _augmentStateViewModels(result);
  final addModels = addModelsToStateView;
  if(addModels != null) {
    addModels(stateViewCtx, result);
  }
  return result;
}