createSPI<TSPI extends AFStateProgrammingInterface<AFComponentState, AFBuildContext<AFFlexibleStateView, AFRouteParam>, AFFunctionalTheme>> static method

TSPI createSPI<TSPI extends AFStateProgrammingInterface<AFComponentState, AFBuildContext<AFFlexibleStateView, AFRouteParam>, AFFunctionalTheme>>(
  1. AFConnectedUIConfig<AFComponentState, AFFunctionalTheme, AFFlexibleStateView, AFRouteParam, AFStateProgrammingInterface<AFComponentState, AFBuildContext<AFFlexibleStateView, AFRouteParam>, AFFunctionalTheme>> config,
  2. AFScreenID screenId,
  3. AFWidgetID wid, {
  4. required AFRouteParam? launchParam,
})

Implementation

static TSPI createSPI<TSPI extends AFStateProgrammingInterface>(AFConnectedUIConfig config, AFScreenID screenId, AFWidgetID wid, { required AFRouteParam? launchParam }) {
  final store = AFibF.g.internalOnlyActiveStore;
  final context = config.createContextForDiff(store, screenId, wid, launchParam: launchParam);
  if(context == null) {
    throw AFException("Failed to create context");
  }
  return config.createSPI(null, context, screenId, wid) as TSPI;
}