themeData property

ThemeData? get themeData
inherited

The App's current Material theme.

Implementation

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

Assign the ThemeData

Implementation

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,
    );
  }
}