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

パッケージ詳細v1.0.1

flutter_gifimage

Flutter用のGIF画像。GIFの速度や進行状況を制御できない問題を解決するため

30日間ダウンロード
467
いいね数
63
Pub ポイント
40

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

flutter pub add flutter_gifimage

パッケージ概要

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

標準的なGIF処理における固定再生速度や進行状況の追跡ができないといった制限を克服し、GIFアニメーションに対して正確な制御を可能にするFlutterパッケージです。開発者はGIFの再生、一時停止、再起動、シークを実行でき、よりインタラクティブな体験を提供します。Flutterアプリへのスムーズな統合を目的として設計されており、カスタムアニメーション動作もサポートしています。パフォーマンスと使いやすさを重視して構築されており、動的な画像コンテンツによりユーザー参加度を高めます。

用途

  • インタラクティブなアプリアイコン
  • カスタム進捗付きの読み込みインジケーター
  • アニメーションチュートリアル
  • ゲーム化されたUI要素
  • カスタムGIFプレーヤー

主な機能

  • GIF の再生、一時停止、再開
  • 特定のフレームまたは時間を検索する
  • 再生速度の調整
  • プログレッシブロードのサポート
  • カスタマイズ可能なアニメーション動作

適している対象

  • 詳細なGIF制御が必要な開発者
  • アニメーションUIコンポーネントを必要とするアプリ
  • インタラクティブメディア要素を備えたプロジェクト
  • 教育的またはゲーム化されたアプリケーション
  • 高パフォーマンスアニメーションが必要です

注意事項

  • 大きな GIF ではメモリ使用量が増える可能性があります
  • アニメーションライフサイクルの慎重な管理が必要です
  • 最適化されていないと、非常に長いまたは複雑なGIFには適していません
  • 限定されたプラットフォーム固有の最適化
  • デコードに外部ライブラリに依存しています

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

flutter_gifimage

We should know that in order to achieve Gif in flutter, we can use Image, but we have no way to manipulate Gif, for example: change its speed, control it has been playing in a frame, in which frame range loop. These problems can be solved by this widget,it also help you contain gif cache,avoid load frame every time.

Screenshots

Usage(Simple)

add in pubspec


     flutter_gifimage: ^1.0.0

simple usage

    GifController controller= GifController(vsync: this);


    GifImage(
         controller: controller,
         image: AssetImage("images/animate.gif"),
    )

list the most common operate in GifController:

// loop from 0 frame to 29 frame
controller.repeat(min:0,max:29,period:Duration(millseconds:300));

// jumpTo thrid frame(index from 0)
controller.value = 0;

// from current frame to 26 frame
controller.animateTo(26);

If you need to preCache gif,try this

// put imageProvider
fetchGif(AssetImage("images/animate.gif"));

Thanks

  • gif_ani (thanks for giving me idea)

License

MIT License

Copyright (c) 2019 Jpeng

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

カテゴリー

ソースリポジトリ

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

データはまだありません。