Load GIF images and can set framerate

Related tags

Image gif_view
Overview

pub package

GifView

Load GIF images and can set framerate

Features

With GifView you can load GIF images of easy way and can configure frameRate.

  • Load from Assets;
  • Load from Network;
  • Load from Memory;
  • Set frame rate;
  • Listen when start (onStart), change frame (onChange) and finish (onFinish) animation.
  • Set progress while loading GIF

Getting started

Add gif_view as a dependency in your pubspec.yaml file.

Usage

GIF from Asset

  GifView.asset(
    'assets/gif1.gif',
    height: 200,
    width: 200,
    frameRate: 30, // default is 15 FPS
  )

GIF from Network

  GifView.network(
    'https://www.showmetech.com.br/wp-content/uploads/2015/09/happy-minion-gif.gif',
    height: 200,
    width: 200,
  )

GIF from Memory

  GifView.memory(
    _bytes,
    height: 200,
    width: 200,
  )
Comments
  • Pausing the animation on a particular frame?

    Pausing the animation on a particular frame?

    Hi! This is a great package, however I have 2 questions.

    1. I have managed to find out the current frame on a button click... but what I need is when the button is clicked the animation is paused at that frame(not reset)....How may I pause the animation on a button click?
    2. And for some reason your Asset animation works... but all the network animations dont?!? For eg. the spinner keeps spinning but nothing appears.

    Thanks , will eagerly await your reply, YO

    opened by YohanWadia 3
  • Unable to show gif, if asset file is in another package

    Unable to show gif, if asset file is in another package

    I keep getting an error message like this, when trying to load a gif asset from another package

    E/flutter ( 6909): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: Unable to load asset: assets/success.gif E/flutter ( 6909): #0 PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:237:7)

    opened by johnebere58 3
  • onFinish, ImageRepeat.noRepeat not working

    onFinish, ImageRepeat.noRepeat not working

    GifView.network( 'https://gifs.eco.br/wp-content/uploads/2021/08/engracados-memes-gif-19.gif', height: 200, repeat: ImageRepeat.noRepeat, onFinish: () { logger.d('finishe````'); }, ),

    from example, tried some function none of them working? if they do, this is a great package!

    opened by what2003 2
  • Fix for 'Null check operator used on a null value'

    Fix for 'Null check operator used on a null value'

    The issue: When GifView is loading a gif in list tiles, sometimes on scroll there are errors like this:

    Null check operator used on a null value
    
    #0      AnimationController.stop (package:flutter/src/animation/animation_controller.dart:785)
    #1      AnimationController.value= (package:flutter/src/animation/animation_controller.dart:367)
    #2      AnimationController.forward (package:flutter/src/animation/animation_controller.dart:465)
    #3      GifViewState._loadImage (package:gif_view/gif_view.dart:274)
    <asynchronous suspension>
    

    The problem is that methods such as .forward should not be called on animation controller after it's been disposed.

    This small fix should eliminate the problem.

    opened by oligazar 1
  • Invert animation

    Invert animation

    feat: Added parameter named invertAnimated, if true inverts the animated. if invertAnimated is not passed in the build by default, don't invert the gif.

    opened by viniciusoliverrs 1
  • feat: isAnimated

    feat: isAnimated

    I found your package wonderful, and using it I realized that it did not have a method for animation to start stopped or animated, thinking about it I implemented some lines of code so that this function could exist, thank you in advance for creating the package and making it available to us.

    new attribute: isAnimate

    • If isAnimate is true the image will start animated, otherwise it will start static.

    A hug from Dio.

    Att. Diógenes Silva

    opened by iamdiosilva 1
  • fix: Error: Type 'Uint8List' not found.

    fix: Error: Type 'Uint8List' not found.

    maybe you forgot to import package "dart:typed_data", I maybe was using your package and came across the error so I fixed it, hope it helped. a hug Att. Diogenes Silva

    opened by iamdiosilva 1
  • Version 0.3.0

    Version 0.3.0

    • Adds GifController. Now you can control the gif with controller. Methods: play({bool? inverted, int? initialFrame}), pause(), stop(). (Fixing #9) BREAKING CHANGES:
    • remove isAnimated now is autoPlay in GifController
    • remove invertedAnimation now is inverted in GifController
    • remove loop now is loop in GifController
    opened by RafaelBarbosatec 0
  • Frame delay before starting gif

    Frame delay before starting gif

    There is a delay for about 6-7 seconds before the gif initialization.

    Tested on Flutter v3.3.3 Simulator device iPhone 14 Pro

    Flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.3.3, on macOS 12.5.1 21G83 darwin-x64, locale ru-KZ) [✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0-rc1) [✓] Xcode - develop for iOS and macOS (Xcode 14.0.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.1) [✓] VS Code (version 1.72.2)

    opened by 1encore 1
Owner
Rafael Almeida Barbosa
Mobile Developer(Android/Flutter) In love with solutions that fit in the palm of the hand
Rafael Almeida Barbosa
📸 Easy to use yet very customizable zoomable image widget for Flutter, Photo View provides a gesture sensitive zoomable widget. Photo View is largely used to show interacive images and other stuff such as SVG.

Flutter Photo View A simple zoomable image/content widget for Flutter. PhotoView enables images to become able to zoom and pan with user gestures such

Fire Slime Games 1.7k Jan 3, 2023
A Flutter plugin for Android and iOS supports cropping images

Image Cropper A Flutter plugin for Android and iOS supports cropping images. This plugin is based on two different native libraries so it comes with d

HungHD 891 Dec 28, 2022
Download, cache and show images in a flutter app

Cached network image A flutter library to show images from the internet and keep them in the cache directory. How to use The CachedNetworkImage can be

Baseflow 2.1k Jan 3, 2023
Minimal Unsplash Android App to easily search and download images

Minimal Unsplash Android App to easily search and download images

Yash Garg 18 Dec 7, 2022
Instagram tool to download images, reels, videos and more.

Instagram tool to download images, reels, videos and more.

Yuji 34 Jan 2, 2023
A flutter plugin which provides Crop Widget for cropping images.

A flutter plugin which provides Crop Widget for cropping images. crop_your_image provides only minimum UI for deciding cropping area inside images. Other UI parts, such as "Crop" button or "Change Aspect Ratio" button, need to be prepared by each app developers.

Chooyan 96 Dec 31, 2022
A flutter package which makes it easy to track a series of images.

A flutter package which makes it easy to track a series of images.

Jaehee Kim 2 Oct 7, 2022
A scrollable, dismissable by swiping, zoomable, rotatable image gallery on which you can add a dynamic overlay.

Swipe Image Gallery A scrollable, dismissable by swiping, zoomable, rotatable image gallery on which you can add a dynamic overlay. While it is intend

null 20 Dec 7, 2022
Crop any widget/image in Android, iOS, Web and Desktop with fancy and customizable UI, in pure Dart code.

crop A Flutter package for cropping any widget, not only images. This package is entirely written in Dart and supports Android, iOS, Web and Desktop.

Mahdi 225 Jan 6, 2023
Simple and effective cross platform image saver for flutter, supported web and desktop

Simple and effective cross platform image saver for flutter, supported web and desktop

7c00 3 Oct 5, 2022
Loading indicator GIFs. Material and Cupertino (Android and iOS) loading indicators in assorted sizes. Use as placeholders for loading remote image assets. Demo: https://gallery.codelessly.com/flutterwebsites/loadinggifs/

Loading GIFs High quality Android and iOS loading spinners. View Demo Loading GIFs is a collection of high fidelity loading animations in GIF format.

Codelessly 31 Dec 23, 2022
A flutter carousel widget, support infinite scroll, and custom child widget.

carousel_slider A carousel slider widget. Features Infinite scroll Custom child widgets Auto play Supported platforms Flutter Android Flutter iOS Flut

serenader 1.4k Dec 30, 2022
A Flutter widget that paints an image and moves it at a slower speed than the main scrolling content.

A Flutter widget that paints an image and moves it at a slower speed than the main scrolling content. Installation Add dependency to your pubspec.yaml

Anatoly Pulyaevskiy 272 Dec 23, 2022
SVG parsing, rendering, and widget library for Flutter

flutter_svg Draw SVG (and some Android VectorDrawable (XML)) files on a Flutter Widget. Getting Started This is a Dart-native rendering library. Issue

Dan Field 1.5k Jan 6, 2023
Flutter plugin that allows you to display multi image picker on iOS and Android. 👌🔝🎉

IMPORTANT: This repository has been archived and no longer mantained. As I don't have time anymore to work on the package it became very outdated. For

Radoslav Vitanov 898 Apr 29, 2021
Use lottie in flutter for both iOS and Android

flutter_lottie Use Lottie in Flutter. Supports both iOS and Android using lottie-ios and lottie-android Current Status Supports most features that bot

Cameron Smith 160 Nov 25, 2022
Multiavatar is a free and open-source multicultural avatar maker.

Flutter Wrapper for Multiavatar Multiavatar is a multicultural avatar maker. Multiavatar represents people from multiple races, multiple cultures, multiple age groups, multiple worldviews and walks of life.

Iheb Briki 69 Dec 19, 2022
A simple and easy flutter demo to crop image

flutter_image_crop A simple demo to crop image on flutter easily. A Chinese version of this document can be found here Flutter_image_crop Plugin will

路小飞 3 Jul 8, 2021
Draw triangle by setting 2 sides and an angle

Draw_Triangle Draw a triangle by setting 2 sides and an angle. Set an offset (-1<x<1,-1<y<1) from which side a and side b are drawn. Features Draw a t

Omer Stoler 1 Nov 16, 2021