Skip to content
pubscout

cross_fade

0.5.0, released 2 years ago by splashbyte.dev

A widget that crossfades between values or widgets, optionally animating size changes.

WASM-ready
$ flutter pub add cross_fade
Source repository

What it does

CrossFade animates the transition between different widget states based on a value. It supports custom curves, size animation control, and a flexible WidgetTransition API.

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

Use it when

  • You need a simple, flexible cross‑fade between widgets or values
  • You want automatic size animation during the transition
  • You prefer a lightweight alternative to AnimatedCrossFade

Skip it when

  • Complex multi‑step animations where a full animation framework is needed
  • You require built‑in state‑management or dependency‑injection features

Strengths

  • Very easy to integrate with a single widget
  • Supports size animation and custom transition curves
  • Lightweight with no extra dependencies

Weaknesses

  • Limited to cross‑fade use‑cases only
  • Breaking API changes between minor versions
  • No built‑in support for advanced animation sequencing

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
CrossFade<int>(
  value: value,
  builder: (context, i) => Text('\$i'),
)

Alternatives

Packages that do the same job and could replace cross_fade.

  • flutter_animate

    Provides a broader set of animation utilities, including cross‑fade, with a unified API