Pakete, Repositories und App-Kategorien suchen

Cover von flutter_sequence_animation
Paketdetailsv4.0.0

flutter_sequence_animation

Kombinieren Sie jede Animation mit diesem zuverlässigen und einfach zu verwendenden Paket.

AndroidiOSWebmacOSWindowsLinux
30-Tage-Downloads
14.100
Likes
248
Pub-Punkte
140

Paket installieren

flutter pub add flutter_sequence_animation

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

Flutter Sequence Animation ist ein leistungsstarkes und intuitives Paket, das Entwicklern ermöglicht, komplexe Animationen durch Verkettung einzelner Animationssequenzen zu erstellen. Es vereinfacht die Erstellung synchroner, zeitgesteuerter oder bedingter Animationen über Widgets hinweg und ist daher ideal für interaktive Benutzeroberflächen, Onboarding-Flows und dynamische Übergänge. Mit einer sauberen API und starker Unterstützung auf allen wichtigen Plattformen verbessert es den Animationsworkflow ohne zusätzliche Komplexität.

Anwendungsfälle

  • Onboarding-Bildschirmanimationen
  • Interaktive UI-Übergänge
  • Komplexe Widget-Choreografie
  • Ladeeffekte der Sequenz
  • Animierte Formularvalidierung
  • spielesimilarische Schnittstellenbewegungen

Hauptmerkmale

  • Einfache Sequenzzusammensetzung
  • Unterstützung für parallele und sequenzielle Animationen
  • Eingebaute Zeit- und Verzögerungssteuerung
  • Plattformübergreifende Kompatibilität
  • Einfache Integration mit bestehenden Animationen
  • Erweiterbare Animationsbausteine

Geeignet für

  • Entwickler, die animierte Onboarding-Flows erstellen
  • Teams, die reichhaltige interaktive Schnittstellen entwickeln
  • App-Designer, die präzise Animationssteuerung benötigen
  • Projekte, die mehrstufige visuelle Rückmeldung erfordern
  • Anfänger lernen Flutter-Animationen

Hinweise

  • Kann grundlegende Animationskonzepte erfordern
  • Leistungseinfluss bei sehr langen Sequenzen
  • Beschränkte Dokumentation über die Kernbeispiele hinaus
  • Nicht für hochfrequente Echtzeit-Animationen optimiert
  • Am besten geeignet für deklarative, vordefinierte Animationspfade

Original-README

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

flutter_sequence_animation

Features
  • No need to use intervals and calculate percentages for your total animation time.
  • Animate the same variable with multiple animatables!
  • You only need one AnimationController
  • Intuitive and easy to use interface

Installation

dependencies:
  flutter_sequence_animation: "^4.0.0"

then

$ flutter packages get

then

import 'package:flutter_sequence_animation/flutter_sequence_animation.dart';

Demo

alt-text-1 alt-text-1alt-text-1

Code

The Staggered Animation example from here is 207 lines of code . The same animation with this package is 128 lines of code. It is also much easier to read and edit.

You specify a sequence of animatables like this:
    sequenceAnimation = new SequenceAnimationBuilder()
      .addAnimatable(
          animatable: new ColorTween(begin: Colors.red, end: Colors.yellow),
          from:  const Duration(seconds: 0),
          to: const Duration(seconds: 2),
          tag: "color"
        ).addAnimatable(
          animatable: new ColorTween(begin: Colors.yellow, end: Colors.blueAccent),
          from:  const Duration(seconds: 2),
          to: const Duration(seconds: 4),
          tag: "color",
          curve: Curves.easeOut
        ).addAnimatable(
          animatable: new ColorTween(begin: Colors.blueAccent, end: Colors.pink),
          //  animatable: new Tween<double>(begin: 200.0, end: 40.0),
          from:  const Duration(seconds: 5),
          to: const Duration(seconds: 6),
          tag: "color",
          curve: Curves.fastOutSlowIn
        ).animate(controller);

In this case only the color is animated but you can add as many different properties to the sequence as you'd like to. The only restriction is that animations with the same tag can not overlap and need to be ordered.

Now you can access the resulting animation from anywhere in your code with
sequenceAnimation["color"]

This animation is a composition of all animatables you passed in with the same tag.

Example usage of this example:
new AnimatedBuilder(
          builder: (context, child) {
            return new Center(
              child: new Container(
                color: sequenceAnimation["color"].value,
                height: 200.0,
                width: 200.0,
              ),
            );
          },
          animation: controller,
        ),
The animation duration is set automatically (don't change the duration of the controller yourself).
Sepcial thanks to Simon Lightfoot for the help!

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

Kategorien

Abhängigkeiten

Abhängigkeiten 1 Einträge

Quell-Repository

Projekte, die dieses Paket verwenden