persistState method

dynamic persistState()

Implementation

persistState() async {
  EasyDebounce.debounce(
      '${boxName}_notifier', const Duration(milliseconds: 300), () async {
    final box = await Hive.openBox<String>(boxName);
    box.put(boxName, jsonEncode(state.toJson()));
  });
}