setiOSThemeData method
Assigning the Cupertino theme
Implementation
CupertinoThemeData? setiOSThemeData(BuildContext context) {
// If not running in the Apple platform
if (!_AppState.appObj.iniOS) {
// Possibly Material can provide
final themeData =
_theme ?? onTheme(context) ?? _AppState.appObj.themeData;
if (themeData == null) {
// Supply the default Cupertino theme if null
_AppState.appObj.iOSThemeData ??=
CupertinoTheme.of(context).resolveFrom(context);
} else {
// Assign the platform's theme regardless
_AppState.appObj.iOSThemeData = themeData; // ??= won't work
}
} else {
// If null and the user can't explicitly change the theme
// todo: Fluttery
// if (!_allowChangeTheme) {
// App.iOSThemeData ??= _iOSTheme ?? oniOSTheme(context);
// }
}
return _AppState.appObj.iOSThemeData;
}