Changed styling, bit of refactoring

This commit is contained in:
SomnusVeritas
2023-11-08 12:31:42 +01:00
parent 1073dbbe41
commit 91ce231b04
5 changed files with 38 additions and 12 deletions

View File

@@ -7,15 +7,17 @@ part 'todo.g.dart';
@collection
class Todo {
final int id;
final String title;
final String description;
String title;
String description;
final DateTime createdAt;
bool done;
Todo({
int? id,
int? index,
required this.title,
this.description = '',
DateTime? createdAt,
}) : createdAt = createdAt ?? DateTime.now(),
id = id ?? DbHelper.nextTodoId;
DateTime? createdTime,
this.done = false,
}) : createdAt = createdTime ?? DateTime.now(),
id = index ?? DbHelper.nextTodoId;
}