Compare commits

..

2 Commits

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;