Erweiterungen
This commit is contained in:
1 parent
137ceebf6f
commit
e0b30366e5
2 files changed
+93
-108
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user