toMap method
Implementation
Map<String, dynamic> toMap() => <String, dynamic>{
"id": id,
"reason": reason,
"amount": amount,
"fromDate": fromDate?.toIso8601String(),
"toDate": toDate?.toIso8601String(),
"spotNumber": spotNumber,
"tags": tags == null ? null : List<dynamic>.from(tags!.map((int x) => x)),
if (detail1 != null) "detail1": detail1,
if (detail2 != null) "detail2": detail2,
if (addTags != null) "addTags": List<dynamic>.from(addTags!.map((int x) => x)),
if (removeTags != null) "removeTags": List<dynamic>.from(removeTags!.map((int x) => x)),
if (adminUserIds != null) "adminUserIds": List<dynamic>.from(adminUserIds!.map((String x) => x)),
if (addAdminUserIds != null) "addAdminUserIds": List<dynamic>.from(addAdminUserIds!.map((String x) => x)),
if (removeAdminUserIds != null) "removeAdminUserIds": List<dynamic>.from(removeAdminUserIds!.map((String x) => x)),
};