createSPI method

TSPI createSPI(
  1. BuildContext? buildContext,
  2. AFBuildContext<AFFlexibleStateView, AFRouteParam> dataContext,
  3. AFScreenID parentScreenId,
  4. AFWidgetID wid,
)
inherited

Implementation

TSPI createSPI(BuildContext? buildContext, AFBuildContext dataContext, AFScreenID parentScreenId, AFWidgetID wid) {
  final standard = AFStandardBuildContextData(
    screenId: parentScreenId,
    context: buildContext,
    config: this,
    dispatcher: dataContext.d,
    themes: dataContext.standard.themes,
  );

  _updateFundamentalThemeState(buildContext);
  final withContext = createContext(standard, dataContext.s as TStateView, dataContext.p as TRouteParam, dataContext.children);
  final theme = standard.themes.createFunctionalTheme(themeId, withContext);
  final spiCreatorOverride = AFibF.g.findSPICreatorOverride<TSPI, AFBuildContext<TStateView, TRouteParam>, TTheme>() ?? spiCreator;

  final spiStandard = AFStandardSPIData(
    theme: theme,
    screenId: parentScreenId,
    wid: wid
  );
  final spi = spiCreatorOverride(withContext, spiStandard);
  return spi;
}