40 lines
629 B
Dart
40 lines
629 B
Dart
import 'package:isar/isar.dart';
|
|
import 'package:stadtbote/model/tour_task.dart';
|
|
import 'package:stadtbote/protocoll_messages/fin_tour_message.dart';
|
|
|
|
import '../tools/util.dart';
|
|
|
|
part 'task_info.g.dart';
|
|
|
|
@collection
|
|
class TaskInfo {
|
|
late Id id;
|
|
|
|
late int sId;
|
|
|
|
late String? additionalText;
|
|
|
|
late String? answer;
|
|
|
|
late bool completed;
|
|
|
|
@ignore
|
|
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;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|