safeResponseDataCache<T> method
Future<void>
safeResponseDataCache<T>({
- required String? keyCache,
- required dynamic funCallBack(
- T?
Implementation
Future<void> safeResponseDataCache<T>(
{required String? keyCache, required Function(T?) funCallBack}) async {
if (keyCache?.isNotEmpty == true) {
final cacheData = await responseCacheData<T>(key: keyCache!);
if (cacheData != null) {
funCallBack(cacheData);
}
}
}