writeHive method

Future writeHive(
  1. dynamic key,
  2. dynamic data
)

Implementation

Future writeHive(key, data) async {
  var box = await Hive.openBox(boxName);
  box.put(key, data);
  print('successfully saved data:$data for key:$key');
}