Buscar pacotes, repositórios e categorias de apps

Capa de bounce
Detalhes do pacotev1.0.2

bounce

Um widget que anima seus filhos com uma animação suave de escala e rotação, dependendo da localização do toque.

AndroidiOSWebmacOSWindowsLinux
Downloads em 30 dias
1,1 mil
Curtidas
52
Pontos Pub
150

Instalar pacote

flutter pub add bounce

Visão geral do pacote

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

O pacote Bounce fornece um widget Flutter que adiciona uma animação suave de escala e rotação aos seus filhos quando tocados. Ele melhora a interação do usuário respondendo dinamicamente à entrada por toque, criando um efeito de feedback divertido e envolvente. Ideal para botões, cartões ou qualquer elemento interativo, funciona em todas as principais plataformas, incluindo Android, iOS, Web, macOS, Windows e Linux. A animação é fluida e personalizável, com configuração mínima necessária. É particularmente eficaz na melhoria da sensação tátil das interfaces digitais.

Casos de uso

  • Botões interativos
  • Feedback de toque para cartões
  • Elementos de interface do usuário gamificados
  • microinterações de aplicativos móveis
  • Melhorias na interface web

Principais recursos

  • Animação suave de escala e rotação
  • Disparador baseado em toque
  • Suporte multiplataforma
  • Configuração mínima
  • Responsivo à localização do toque

Indicado para

  • Desenvolvedores de aplicativos em busca de feedback interativo
  • Designers aprimorando a UX com movimento
  • Projetos que exigem animações leves
  • Iniciantes do Flutter explorando gestos
  • Aplicativos com interfaces intensivas em toque

Considerações

  • Pode não ser adequado para estilos de design minimalista
  • Impacto no desempenho em layouts complexos
  • Personalização limitada além da escala e rotação
  • Melhor usado com moderação para evitar distrações
  • Requer tratamento de detecção de gestos

README original

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

Bounce

pub package

This package adds a new Bounce widget that applies a tap-triggered bounce animation to Flutter widgets. Depending on the touch location, a tilt effect is also added on the child.

"Demo of the Bounce plugin"

To see examples of the following effect on a device or simulator:

cd example/
flutter run --release

How to use

First, add the dependency to your pubspec.yaml file:

dependencies:
  bounce: ^<latest-version>

Then, wrap your target widget as child of a Bounce widget. You may optionally specify additional behavior, such as disabling the tilt effect by adding tilt: false to the constructor. The simplest usage of this widget is the following :


import 'package:bounce/bounce.dart';

...

return Bounce(
        onTap: () {
          // ...
        },
        child: ...)

Custom behavior

Tilt effect

You may specify the maximum angle applied by the tilt effect using the tiltAngle. This angle will be reached when the child widget is tapped at its edges. No tilt is applied when the child is tapped exactly at its center.

Scale effect

You may specify the maximum factor applied by the scale effect using the scaleFactor parameter.

Tap delay

To fine tune your user experience, you may want the various effects to animate back for a few milliseconds after the tap has occured. By default, this delay is set to 150 milliseconds.

Filter quality

The Bounce widget implementation wraps the child with a matrix-based Transform widget. On most platforms, it is a good practice to have it set to FilterQuality.high, which is the default value. You may specify other FilterQuality values directly from the widget's constructor :

  Bounce(
    filterQuality: FilterQuality.medium,
    child: ...
  )

Due to limitations on Safari iOS and if your app targets it, you are responsible for enforcing filterQuality to null in this specific browser.

Combination with Motion widgets

Bounce widgets look gorgeous when combined with a Motion widget, like so :

  Motion(
    child: Bounce(
      child: ...
    )
  )

Here is an interaction example :

"Bounce + Motion example"

Comparing different tilt angles

Issues

If you are having any problem with the Bounce package, you can file an issue on the package repo's issue tracker.

Please make sure that your concern hasn't already been addressed in the 'Closed' section.

Credits

This package was developed with ♥ by @mrcendre.

Categorias

Repositório-fonte

Projetos que usam este pacote

Ainda não há dados.