createSPI method
TSPI
createSPI(
- BuildContext? buildContext,
- AFBuildContext<
AFFlexibleStateView, AFRouteParam> dataContext, - AFScreenID parentScreenId,
- 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;
}