clearAssetCache static method

Future<void> clearAssetCache()

Clears the plugin's internal asset cache directory. Call this when the app's assets have changed to force assets to be re-fetched from the asset bundle.

Implementation

static Future<void> clearAssetCache() async {
  if (kIsWeb) return;
  await for (var file in (await _getCacheDir()).list()) {
    await file.delete(recursive: true);
  }
}