Move down to only 1 abstract data type with a nully Frequency. Should aid in making the Expense page usable for all 3 data type.
This commit is contained in:
+3
-3
@@ -9,7 +9,7 @@ import 'package:sqflite/sqflite.dart';
|
||||
|
||||
// Local
|
||||
import '/models/expense.dart';
|
||||
import '/models/tracked_type_recurring.dart';
|
||||
import '/models/tracked_item.dart';
|
||||
|
||||
// Leaned on this example:
|
||||
// https://learnflutterwithme.com/sqlite
|
||||
@@ -77,7 +77,7 @@ class DatabaseHelper {
|
||||
return expenseList;
|
||||
}
|
||||
|
||||
Future<int> addExpense(RecurringTrackedType expense) async {
|
||||
Future<int> addExpense(TrackedItem expense) async {
|
||||
Database db = await instance.db;
|
||||
return await db.insert(
|
||||
"expense",
|
||||
@@ -94,7 +94,7 @@ class DatabaseHelper {
|
||||
);
|
||||
}
|
||||
|
||||
Future<int> updateExpense(RecurringTrackedType expense) async {
|
||||
Future<int> updateExpense(TrackedItem expense) async {
|
||||
Database db = await instance.db;
|
||||
return await db.update(
|
||||
"expense",
|
||||
|
||||
Reference in New Issue
Block a user