toMap method
Converts the theme to a map for platform communication.
Implementation
Map<String, dynamic> toMap() {
return {
'prefersSystemTheme': prefersSystemTheme,
if (primaryTextColor != null) 'primaryTextColor': primaryTextColor,
if (accentColor != null) 'accentColor': accentColor,
if (spacing != null) 'spacing': spacing,
};
}