toMap method
Implementation
Map<String, dynamic> toMap() {
final Map<String, dynamic> data = <String, dynamic>{};
if (from != null) {
data['from'] = from;
}
if (to != null) {
data['to'] = to;
}
if (dnd != null) {
data['dnd'] = dnd;
}
return data;
}