saveCacheData<T> method

Future<void> saveCacheData<T>({
  1. required String? key,
  2. T? data,
})

Implementation

Future<void> saveCacheData<T>({required String? key, T? data}) async {
  if (key?.isNotEmpty == true) {
    final cacheBox = await Hive.openBox(key!);
    cacheBox.put(key, data);
  }
}