2 Commits

Author SHA1 Message Date
f5f153f692 Turn off the database delete, schema is currently stable. 2025-02-11 09:53:15 -07:00
362f1214e8 Fix ability to edit an item. 2025-02-11 09:52:52 -07:00
2 changed files with 2 additions and 3 deletions

View File

@ -10,7 +10,7 @@ import 'package:sqflite_common_ffi/sqflite_ffi.dart';
import 'package:path/path.dart'; import 'package:path/path.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
const bool testing = true; const bool testing = false;
void main() { void main() {
// I see no good explanations of why to use this other package yet, but // I see no good explanations of why to use this other package yet, but

View File

@ -261,8 +261,7 @@ class _ExpenseInputDialogState extends State<ExpenseInputDialog> {
if (value!.isEmpty) { if (value!.isEmpty) {
return "Name must be provided."; return "Name must be provided.";
} }
if (!expenses if (!expenses.every((expense) => expense.name != value || expense.id == _id)) {
.every((expense) => expense.name != value)) {
return "Name must be unique, already in use."; return "Name must be unique, already in use.";
} }
return null; return null;