getTasks method
Implementation
@override
FutureOr<List<BackgroundTaskInfo>> getTasks(List<String> taskIds) {
try {
List<BackgroundTaskInfo> list = [];
for (var element in taskIds) {
final value = box.get(element);
debugPrint("BackgroundTaskCache getTasks for $element value = $value of type ${value.runtimeType}");
if (value == null || value is! Map) continue;
try {
list.add(BackgroundTaskInfo.fromMap(value));
} on HandleNotFoundException catch (e) {
print("Handle not found for $value exception: $e");
}
}
return list;
} on Exception catch (e) {
debugPrint("BackgroundTaskCache getTasks exception $e");
rethrow;
} on Error catch (e) {
debugPrint("BackgroundTaskCache getTasks error $e");
rethrow;
}
}