simple dbhelper with Isar

This commit is contained in:
SomnusVeritas
2023-11-08 10:39:31 +01:00
parent c594c3a0c7
commit c5f5a8654c
3 changed files with 29 additions and 5 deletions

View File

@@ -1,11 +1,18 @@
import 'package:isar/isar.dart';
part 'todo.g.dart';
@collection
class Todo {
final int id;
final String title;
final String description;
final DateTime createdAt;
Todo({
required this.id,
required this.title,
required this.description,
required this.createdAt,
});
this.description = '',
DateTime? createdAt,
}) : createdAt = createdAt ?? DateTime.now();
}