generateCupertinoTheme method
Make sure ThemesManager exist in the widget tree, above of the widget where you are trying to add new themes.
builder: (context, child) {
...
ThemeManager.of(context).generateTheme(
CupertinoThemeManagerData(
key: <themeKey>,
data: <ThemeData>,
)
);
return child;
},
Implementation
void generateCupertinoTheme(
CupertinoThemeManagerData themeData,
) {
_cupertinoThemes[themeData.key] = themeData;
}