GitHub リポジトリpierluigizagaria/flutter_gif

flutter_gif

GIFの進行状況と速度を制御するのに役立つGIF画像ウィジェット

flutter_gif のプロジェクト画像
スター
8
フォーク
23
最終プッシュ(UTC)
2024/05/28
プロジェクト状態
公開中

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

gif

Overview

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.

Example

Load a gif asynchronously and display a text placeholder during loading.
When the gif is loaded reset the controller and run the gif to the end.

GifController _controller = GifController(vsync: this);

Gif(
    image: AssetImage("images/animate.gif"),
    controller: _controller, // if duration and fps is null, original gif fps will be used.
    //fps: 30,               
    //duration: const Duration(seconds: 3),
    autostart: Autostart.no,
    placeholder: (context) => const Text('Loading...'),
    onFetchCompleted: () {
         _controller.reset();
         _controller.forward();
    },
),

Thanks

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.

Pierluigi Zagaria GitHub avatar
GitHub 作者

Pierluigi Zagaria ↗

Love doing small unfinished side projects

言語C++CMakeDartHTMLCSwiftKotlinObjective-C

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 2 件

  • flutter{"sdk":"flutter"}
  • http^1.1.0

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗