toMap method
Implementation
Map<String, dynamic> toMap() {
final Map<String, dynamic> data = <String, dynamic>{};
data['dnd'] = dnd?.value;
if (schedule != null) {
Map<String, dynamic> map = <String, dynamic>{};
for (final k in schedule!.keys) {
map[k.dayName] = schedule![k]!.toMap();
}
if (map.isNotEmpty) data['schedule'] = map;
}
return data;
}