getOrCacheAndRegister method
Simple version without progress tracking
Use this for instant loads (assets, bundled) where progress isn't needed. Delegates to getOrCacheAndRegisterWithProgress and ignores progress events.
Implementation
Future<String> getOrCacheAndRegister({
required String cacheKey,
required Future<Uint8List> Function() loader,
required String targetPath,
}) async {
// Delegate to progress version, ignore progress events
await for (final _ in getOrCacheAndRegisterWithProgress(
cacheKey: cacheKey,
loader: (_) => loader(), // Ignore progress callback
targetPath: targetPath,
)) {
// Ignore progress updates
}
return targetPath;
}