theme property
AppTheme
get
theme
Returns the currentAppTheme.
Throws if currentAppTheme == null.
Implementation
static AppTheme get theme{
if(currentAppTheme == null) {
throw StateError("You have to init the AppThemeAccess before access.");
}
if(!isDarkMode) {
return currentAppTheme as AppTheme;
}
if(currentAppThemeDarkMode == null) {
throw StateError("You have to init the AppThemeAccess dark mode before access.");
}
return currentAppThemeDarkMode as AppTheme;
}