put method

  1. @override
FutureOr<void> put(
  1. BackgroundTaskInfo task
)
override

Implementation

@override
FutureOr<void> put(BackgroundTaskInfo task) async {
  try {
    debugPrint("BackgroundTaskCache put task $task");
    final map = task.toMap();
    debugPrint("BackgroundTaskCache put map $map");
    await box.put(task.taskId, map);
  } on Exception catch (e) {
    debugPrint("BackgroundTaskCache put exception $e");
    rethrow;
  } on Error catch (e) {
    debugPrint("BackgroundTaskCache put error $e");
    rethrow;
  }
}