Pakete, Repositories und App-Kategorien suchen

Paketdetailsv2.3.0

gif

Steuern Sie ein GIF mit dem Flutter-Animationscontroller. Sie können entweder eine feste Dauer angeben oder die Wiedergabegeschwindigkeit festlegen.

AndroidiOSWebmacOSWindowsLinux
30-Tage-Downloads
40.600
Likes
80
Pub-Punkte
150

Paket installieren

flutter pub add gif

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

Das gif-Paket ermöglicht eine präzise Steuerung von GIF-Animationen in Flutter mithilfe eines AnimationController. Es unterstützt sowohl die Wiedergabe mit fester Dauer als auch anpassbare Bildraten, wodurch Entwickler GIFs mit Animationen oder Benutzerinteraktionen synchronisieren können. Das Paket ist auf allen wichtigen Plattformen kompatibel, einschließlich Mobilgeräte, Web und Desktop, und eignet sich daher ideal für dynamische UI-Elemente, die animiertes Inhalt benötigen. Es vereinfacht die Integration von GIFs in Flutter-Anwendungen, ohne dass native Plattformcode erforderlich ist.

Anwendungsfälle

  • GIFs mit Animationszeitleisten synchronisieren
  • Interaktive animierte UI-Komponenten erstellen
  • Animierte Banner oder Ladeindikatoren anzeigen
  • GIFs in plattformübergreifende Anwendungen integrieren
  • Dynamische Steuerung der Wiedergabegeschwindigkeit

Hauptmerkmale

  • AnimationController-Integration
  • Unterstützung für feste Dauer oder Frame-Rate
  • Plattformübergreifende Kompatibilität
  • Einfache API für Wiedergabesteuerung
  • Effizientes Rendern auf allen Plattformen

Geeignet für

  • Entwickler, die animierte Benutzeroberflächen erstellen
  • Apps, die dynamische GIF-Wiedergabe erfordern
  • Plattformübergreifende Projekte mit Multimedia-Anforderungen
  • Interaktive App-Komponenten mit visueller Rückmeldung

Hinweise

  • Kann die Leistung bei großen GIFs beeinträchtigen
  • Erfordert sorgfältige Speicherverwaltung für lang laufende Animationen
  • Beschränkt auf statische GIFs (keine Unterstützung für animierte GIFs mit komplexen Übergängen)
  • Am besten geeignet für leichte Animationen
  • Nicht für hohe Bildraten oder videoähnliche Inhalte optimiert

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

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.

Kategorien

Abhängigkeiten

Abhängigkeiten 1 Einträge

Quell-Repository

Projekte, die dieses Paket verwenden

Noch keine Daten verfügbar.