toMap method
Generates a map from a TrackedDonation object, used when writing data to the database
Implementation
Map<String, dynamic> toMap() {
var map = <String, dynamic>{
columnAmount: amount,
columnDateString: dateRecorded,
columnDonationProcessed: donationProcessed == true ? 1 : 0
};
if (id != null) {
map[columnId] = id;
}
return map;
}