v1.5.0
cached_memory_image
Uma biblioteca Flutter para exibir imagens a partir do Base64, Uint8List e mantê-las no diretório de cache.
50Curtidas 5,3 milDownloads em 30 dias140Pontos Pub
AndroidiOSmacOSWindowsLinux
Uma biblioteca Flutter para exibir imagens a partir do Base64, Uint8List e mantê-las no diretório de cache.
{"sdk":"flutter"}^3.3.1{"sdk":"flutter"}^2.0.3Texto original em inglês. Visite o GitHub para a versão atual.
A Flutter library to show images from the Base64, Uint8List and keep them in the cache directory.
final cachedImageManager = CachedImageBase64Manager.instance();
await cachedImageManager?.isExists('app://image/1');
await cachedImageManager?.removeFile('app://image/1');
CachedMemoryImage(
uniqueKey: 'app://image/1',
base64: 'iVBORw0KGgoAAAANSUhEUgAAAk0AAAFwCAYAAACl9k...',
),
CachedMemoryImageProvider(
'app://image/6',
base64: 'iVBORw0KGgoAAAANSUhEUgAAAk0AAAFwCAYAAACl9k...',
)
CachedMemoryImage(
uniqueKey: 'app://image/1',
bytes: Uint8List.fromList([1,2,3,4,5]),
)
CachedMemoryImageProvider(
'app://image/5',
bytes: Uint8List.fromList([1,2,3,4,5]),
)
It is really easy to use! You should ensure that you add the cached_memory_image as a dependency in your flutter project.
cached_memory_image: ^1.5.0
Padding(
padding: const EdgeInsets.all(8.0),
child: CachedMemoryImage(
uniqueKey: 'app://image/1',
base64: 'iVBORw0KGgoAAAANSUhEUgAAAk0AAAFwCAYAAACl9k...',
),
)
Padding(
padding: const EdgeInsets.all(8.0),
child: CachedMemoryImage(
uniqueKey: 'app://image/1',
bytes: Uint8List.fromList([1,2,3,4,5]),
),
)
The cached memory images stores and retrieves files using the flutter_cache_manager.