From 0aa8fdf271a7e921dcd5c2a9379b8f308932a79e Mon Sep 17 00:00:00 2001 From: Hyperling Date: Tue, 11 Feb 2025 14:49:23 -0700 Subject: [PATCH] Properly map all fields (cost/amount). --- lib/models/expense.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/models/expense.dart b/lib/models/expense.dart index 4143fc6..cd4b97c 100644 --- a/lib/models/expense.dart +++ b/lib/models/expense.dart @@ -21,4 +21,15 @@ class Expense extends RecurringTrackedType { .first, description: json['description'], ); + + @override + Map toMap() { + return { + 'id': id, + 'name': name, + 'cost': amount, + 'frequency': frequency.title, + 'description': description, + }; + } }