Skip to content
pubscout

any_animated_button

0.0.4, released 4 years ago by appvinio.com

An expandable button that animates between idle, progress, success, and error states using BLoC.

WASM-ready
$ flutter pub add any_animated_button
Source repository

What it does

It provides customizable buttons that react to background processes by morphing shapes and displaying loading, success, or error states. It integrates with the flutter_bloc package to manage state changes during asynchronous operations.

AI-written summary of version 0.0.4, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want buttons to give visual feedback for asynchronous actions like API calls.
  • Your project already utilizes flutter_bloc for state management.

Skip it when

  • You do not use the BLoC pattern in your application.
  • You need to dynamically update text inside the button when its width is set to null.

Strengths

  • Built-in support for progress, success, and error states via BLoC.
  • Includes default parameter factories for quick styling of different button states.

Weaknesses

  • Known bug where updating text on a button with a null width does not adjust properly.
  • Requires using the dartz package for Either types in actions.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3

not documented

MinimalisticButton(
  bloc: _successBloc,
  text: 'Animated success button',
  onTap: () => _successBloc.add(TriggerAnyAnimatedButtonEvent(13)),
)

Alternatives

Packages that do the same job and could replace any_animated_button.

Works with

Packages commonly used together with any_animated_button: ones it builds on, ones built on it, and its own family.