v1.5.0
cached_memory_image
一个 Flutter 库,用于从 Base64 和 Uint8List 显示图像,并将其保留在缓存目录中。
50喜欢 5280近 30 天下载140Pub 分数
AndroidiOSmacOSWindowsLinux
一个 Flutter 库,用于从 Base64 和 Uint8List 显示图像,并将其保留在缓存目录中。
{"sdk":"flutter"}^3.3.1{"sdk":"flutter"}^2.0.3以下为英文项目原文快照,最新内容请访问 GitHub。
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.