Erweiterungen

This commit is contained in:
Sven committed 2024-02-08 17:34:59 +01:00
1 parent 137ceebf6f
commit e0b30366e5
2 files changed
+93 -108

No files matched your search

+14
View File
@@ -1,6 +1,8 @@
import 'package:isar/isar.dart';
import 'package:stadtbote/model/tour_task.dart';
import '../tools/util.dart';
part 'task_info.g.dart';
@collection
@@ -19,6 +21,18 @@ class TaskInfo {
late TourTask task;
TaskInfo();
static Future<int> getNextId() async {
int taskInfoId = await Util.preferencesGetInt('task_info_id', 0) as int;
taskInfoId += 1;
Util.preferencesSaveInt("task_info_id", taskInfoId);
return taskInfoId;
}
}