readCachedFont function

Future<Uint8List?> readCachedFont(
  1. String cacheKey
)

Implementation

Future<Uint8List?> readCachedFont(String cacheKey) async {
  try {
    final dir = await getTemporaryDirectory();
    final file = File('${dir.path}/dataleon_font_$cacheKey');
    if (await file.exists()) return await file.readAsBytes();
  } catch (_) {}
  return null;
}