toMap method
Implementation
Map<String, dynamic>? toMap() {
final l = light?.toMap();
final d = dark?.toMap();
final x = {
if (l != null && l.isNotEmpty) "light": l,
if (d != null && d.isNotEmpty) "dark": d,
};
if (x.isEmpty) return null;
return x;
}