setiOSThemeData method

CupertinoThemeData? setiOSThemeData(
  1. BuildContext context
)

Assigning the Cupertino theme

Implementation

CupertinoThemeData? setiOSThemeData(BuildContext context) {
  //
  CupertinoThemeData? cupertinoThemeData = _iOSTheme ?? oniOSTheme();

  if (_allowChangeTheme) {
    // If a saved preference
    final theme = v.App.iOSThemeData;
    if (theme != null) {
      cupertinoThemeData = theme;
    }
  }

  if (cupertinoThemeData == null) {
    // Possibly Material can provide
    final themeData = _theme ?? onTheme() ?? v.App.themeData;

    if (themeData == null) {
      // The original theme
      v.App.iOSThemeData ??= CupertinoTheme.of(context).resolveFrom(context);
    } else {
      // Assign the provided theme
      v.App.iOSThemeData = themeData;
    }
    cupertinoThemeData = v.App.iOSThemeData;
  } else {
    v.App.iOSThemeData = cupertinoThemeData;
  }
  return cupertinoThemeData;
}