Buscar pacotes, repositórios e categorias de apps

Capa de flutter_sequence_animation
Detalhes do pacotev4.0.0

flutter_sequence_animation

Combine qualquer animação com este pacote robusto e fácil de usar.

AndroidiOSWebmacOSWindowsLinux
Downloads em 30 dias
14,1 mil
Curtidas
248
Pontos Pub
140

Instalar pacote

flutter pub add flutter_sequence_animation

Visão geral do pacote

Orientação gerada a partir de informações públicas. Apenas para referência.

Flutter Sequence Animation é um pacote poderoso e intuitivo que permite aos desenvolvedores criar animações complexas encadeando sequências individuais de animação. Ele simplifica a criação de animações sincronizadas, com tempo ou condicionais entre widgets, tornando-o ideal para interfaces interativas, fluxos de introdução e transições dinâmicas. Com uma API limpa e forte suporte em todas as principais plataformas, ele melhora os fluxos de trabalho de animação sem adicionar complexidade.

Casos de uso

  • Animações da tela de boas-vindas
  • Transições de interface do usuário interativas
  • coreografia complexa de widgets
  • Efeitos da sequência de carregamento
  • Validação de formulário animada
  • Movimentos de interface semelhantes a jogos

Principais recursos

  • Composição de sequência fácil de usar
  • Suporte para animações paralelas e sequenciais
  • Controles de tempo e atraso embutidos
  • Compatibilidade multiplataforma
  • Integração simples com animações existentes
  • Blocos de construção de animação extensíveis

Indicado para

  • Desenvolvedores criando fluxos animados de boas-vindas
  • Equipes construindo interfaces interativas ricas
  • Designers de aplicativos que precisam de controle preciso de animação
  • Projetos que exigem feedback visual em múltiplos passos
  • Iniciantes aprendendo animações no Flutter

Considerações

  • Pode ser necessário entender conceitos básicos de animação
  • Impacto no desempenho com sequências muito longas
  • Documentação limitada além dos exemplos principais
  • Não otimizado para animações em tempo real de alta frequência
  • Mais adequado para caminhos de animação declarativos e pré-definidos

README original

Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.

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.

Categorias

Dependências

Lista de dependências 1 itens

Repositório-fonte

Projetos que usam este pacote