Compare commits
2 Commits
d77e732551
...
f5f153f692
Author | SHA1 | Date | |
---|---|---|---|
f5f153f692 | |||
362f1214e8 |
@ -10,7 +10,7 @@ import 'package:sqflite_common_ffi/sqflite_ffi.dart';
|
||||
import 'package:path/path.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
const bool testing = true;
|
||||
const bool testing = false;
|
||||
|
||||
void main() {
|
||||
// I see no good explanations of why to use this other package yet, but
|
||||
|
@ -261,8 +261,7 @@ class _ExpenseInputDialogState extends State<ExpenseInputDialog> {
|
||||
if (value!.isEmpty) {
|
||||
return "Name must be provided.";
|
||||
}
|
||||
if (!expenses
|
||||
.every((expense) => expense.name != value)) {
|
||||
if (!expenses.every((expense) => expense.name != value || expense.id == _id)) {
|
||||
return "Name must be unique, already in use.";
|
||||
}
|
||||
return null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user