clearCache method

Future<void> clearCache()

Clears all cached fonts.

Implementation

Future<void> clearCache() async {
  final dir = await getCacheDir();
  if (dir.existsSync()) {
    await dir.delete(recursive: true);
    await dir.create(recursive: true);
  }
  _initialized = false;
  _cacheDir = null;
}