save method

Future<void> save(
  1. [Box<DateTime>? _]
)

For tests and internal use only.

Implementation

Future<void> save([Box<DateTime>? _]) async {
  await ref.watch(hiveDateTimeBox(name).future);
  final hiveBox = ref.watch(hiveDateTimeBox(name)).requireValue;
  await hiveBox.clear();
  await hiveBox.addAll(state);
}