FLUTTER ECOSYSTEM

prongbang/cached_memory_image

Base64 및 Uint8List에서 이미지를 표시하고 캐시 디렉터리에 저장하는 데 사용할 수 있는 Flutter 라이브러리입니다.

cached_memory_image 프로젝트 이미지
Stars
3
Forks
8
최근 푸시(UTC)
2023. 11. 25.
프로젝트 상태
활성
prongbang GitHub avatar
GITHUB User

prongbang ↗

Devไปวันๆ https://fb.me/async.true

Founder, Inteniquetic, Co-Founder Innotech DevelopmentBangkok, Thailand공식 웹사이트 ↗
언어DartRubySwiftKotlinObjective-CMakefile

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 4 개

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

cached_memory_image

pub package

A Flutter library to show images from the Base64, Uint8List and keep them in the cache directory.

Features

Check file is exists
final cachedImageManager = CachedImageBase64Manager.instance();

await cachedImageManager?.isExists('app://image/1');
await cachedImageManager?.removeFile('app://image/1');
Cached Image from Base64
  • Widget
CachedMemoryImage(
  uniqueKey: 'app://image/1',
  base64: 'iVBORw0KGgoAAAANSUhEUgAAAk0AAAFwCAYAAACl9k...',
),
  • Image Provider
CachedMemoryImageProvider(
  'app://image/6',
  base64: 'iVBORw0KGgoAAAANSUhEUgAAAk0AAAFwCAYAAACl9k...',
)
Cached Image from Uint8List
  • Widget
CachedMemoryImage(
  uniqueKey: 'app://image/1',
  bytes: Uint8List.fromList([1,2,3,4,5]),
)
  • Image Provider
CachedMemoryImageProvider(
  'app://image/5',
  bytes: Uint8List.fromList([1,2,3,4,5]),
)

Getting started

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

Usage

  • Cached image from Base64 and Display
Padding(
  padding: const EdgeInsets.all(8.0),
  child: CachedMemoryImage(
    uniqueKey: 'app://image/1',
    base64: 'iVBORw0KGgoAAAANSUhEUgAAAk0AAAFwCAYAAACl9k...',
  ),
)
  • Cached image from Uint8List and Display
Padding(
  padding: const EdgeInsets.all(8.0),
  child: CachedMemoryImage(
    uniqueKey: 'app://image/1',
    bytes: Uint8List.fromList([1,2,3,4,5]),
  ),
)

How it works

The cached memory images stores and retrieves files using the flutter_cache_manager.