A Flutter package, you can control the gif image play or pause, you also can set the gif playback time to control the frame rate.

Screenshot

Getting started

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  gifx: ^1.0.1

Usage

From Assets

    Gif.asset(
      'images/test.gif',
      controller: _controller,
      duration: const Duration(milliseconds: 3000), // You can change the source gif duration.
    )

From Network

    Gif.network(
      'http://c-ssl.duitang.com/uploads/item/201803/26/20180326190951_QvM5V.thumb.1000_0.gif',
      controller: _controller,
    )

From Memory

    Gif.memory(
      buffer,
      controller: _controller,
    )

Controller

final _controller = GifController();

_controller.play();

_controller.stop();

_controller.frameCount;     // The source gif frame count

_controller.sourceDuration; // The source gif duration

Libraries

gifx