From 7a3eaf70b507221e4b9be415cf50024e02492159 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Tue, 11 Feb 2025 09:57:10 -0700 Subject: [PATCH] Add TODO, format code. --- lib/pages/expense.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/pages/expense.dart b/lib/pages/expense.dart index 1f9a7c4..4befcc3 100644 --- a/lib/pages/expense.dart +++ b/lib/pages/expense.dart @@ -6,6 +6,8 @@ import 'package:flutter_expense_tracker/db.dart'; import '/models/expense.dart'; import '/models/frequency.dart'; +// TODO: Make this a generic class based on a suerclass of Expense, Income, and Assets? + class ExpensePage extends StatefulWidget { const ExpensePage({ super.key, @@ -261,7 +263,8 @@ class _ExpenseInputDialogState extends State { if (value!.isEmpty) { return "Name must be provided."; } - if (!expenses.every((expense) => expense.name != value || expense.id == _id)) { + if (!expenses.every((expense) => + expense.name != value || expense.id == _id)) { return "Name must be unique, already in use."; } return null;