iOSThemeData property

CupertinoThemeData? get iOSThemeData
inherited

The app's current Cupertino theme.

Implementation

CupertinoThemeData? get iOSThemeData => _iOSThemeData;
set iOSThemeData (dynamic value)
inherited

Implementation

set iOSThemeData(dynamic value) {
  if (value == null) {
    return;
  }
  if (value is CupertinoThemeData) {
    _iOSThemeData = value;
  } else if (value is ThemeData) {
    _iOSThemeData = MaterialBasedCupertinoThemeData(materialTheme: value);
    final context = App.context;
    if (context != null) {
      _iOSThemeData = _iOSThemeData?.resolveFrom(context);
    }
  } else if (value is! Color) {
    // Ignore the value
  } else if (_iOSThemeData == null) {
    _iOSThemeData = CupertinoThemeData(
      primaryColor: value,
    );
  } else {
    _iOSThemeData = _iOSThemeData?.copyWith(
      primaryColor: value,
    );
  }
}