writeCachedFont function

Future<void> writeCachedFont(
  1. String cacheKey,
  2. Uint8List bytes
)

Implementation

Future<void> writeCachedFont(String cacheKey, Uint8List bytes) async {
  try {
    final dir = await getTemporaryDirectory();
    final file = File('${dir.path}/dataleon_font_$cacheKey');
    await file.writeAsBytes(bytes);
  } catch (_) {}
}