themeData property

ThemeData? get themeData

The App's current Material theme.

Implementation

static ThemeData? get themeData => _themeData;
set themeData (dynamic value)

Implementation

static set themeData(dynamic value) {
  if (value == null) {
    return;
  }
  if (value is ThemeData) {
    _themeData = value;
  } else if (value is CupertinoThemeData) {
    // Ignore the value
  } else if (value is! ColorSwatch) {
    // Ignore the value
  } else if (_themeData == null) {
    _themeData = ThemeData(
      primaryColor: value,
    );
  } else {
    _themeData = _themeData?.copyWith(
      primaryColor: value,
    );
  }
}