パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.5.0

cached_memory_image

Base64 および Uint8List から画像を表示し、キャッシュディレクトリに保持するためのFlutterライブラリ。

AndroidiOSmacOSWindowsLinux
30日間ダウンロード
5030
いいね数
50
Pub ポイント
140

パッケージをインストール

flutter pub add cached_memory_image

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

CachedMemoryImage は、Base64 文字列または Uint8List データから画像を効率的に表示し、ローカルにキャッシュするように設計された Flutter パッケージです。デバイスのキャッシュディレクトリにデコード済みの画像を保存することで、画像の読み込みを高速化し、重複した処理やネットワーク要求を削減します。動的なまたは頻繁にアクセスされる画像を扱うアプリに最適で、Android、iOS、macOS、Windows、Linux など複数のプラットフォームをサポートしています。最小限のセットアップで画像管理を簡素化し、既存の Flutter プロジェクトにスムーズに統合できます。

用途

  • base64エンコードされた画像を表示する
  • ローカルに画像データをキャッシュする
  • Uint8Listから画像を読み込む
  • 繰り返しの画像デコードの削減
  • オフライン画像アクセス
  • アプリのパフォーマンス向上

主な機能

  • Base64 および Uint8List 入力をサポートしています
  • デバイスのキャッシュディレクトリ内のローカルキャッシュ
  • クロスプラットフォーム互換性
  • キャッシュからの自動画像再利用
  • 最小構成が必要
  • 効率的なメモリ使用

適している対象

  • 動的な画像コンテンツを持つアプリ
  • オフライン優先のアプリケーション
  • 高周波画像レンダリング
  • メディア重視のUI
  • 簡単な画像キャッシュを求める開発者
  • 軽量な画像処理を必要とするプロジェクト

注意事項

  • キャッシュサイズは設定できません
  • 組み込みの画像圧縮なし
  • システムキャッシュディレクトリに依存しています
  • キャッシュ除外ポリシーに対する制御が限定的
  • 大規模な画像データセットに最適化されていません
  • 必要に応じて、手動でキャッシュをクリアする必要があります

元の README

関連するソースリポジトリの 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.

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

このパッケージを使用しているプロジェクト