setiOSThemeData method

CupertinoThemeData? setiOSThemeData(
  1. BuildContext context
)

Assigning the Cupertino theme

Implementation

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