createStateViewAF method
Iterable<Object?>
createStateViewAF(
- AFState state,
- TRouteParam param,
- 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;
}