DO save empty todo
This commit is contained in:
@@ -57,8 +57,5 @@ Future<Todo?> getLatestTodo() async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> createTodo(String content) async {
|
Future<void> createTodo(String content) async {
|
||||||
if (content.isEmpty) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
await DB.db.insert('todos', {'content': content});
|
await DB.db.insert('todos', {'content': content});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user