Skip to content
pubscout

expansion_card

1.0.1, released 7 months ago by an unverified publisher

A Flutter widget that shows an expandable card with optional image or GIF background.

WASM-ready
$ flutter pub add expansion_card
Source repository

What it does

Provides a customizable expansion card that can display a title, content, and an optional animated image or GIF behind it. The card expands and collapses with smooth animation and allows styling of colors and icons.

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

Use it when

  • You need a single expandable card with a visual background in a UI.
  • You want a quick, declarative way to add animated GIF or image backgrounds to an expansion tile.

Skip it when

  • You require a list of many expandable items or complex state management.
  • You need advanced animation control beyond simple expansion.

Strengths

  • Supports optional GIF/image backgrounds
  • Simple API with many styling options
  • Works on all Flutter platforms

Weaknesses

  • Limited to single-card use cases
  • No built‑in list or multi‑item support
  • May lack accessibility customizations

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:expansion_card/expansion_card.dart';

Center(
  child: ExpansionCard(
    gif: 'assets/animations/sleep.gif',
    title: const Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: <Widget>[
        Text('Header', style: TextStyle(fontSize: 30, color: Colors.white)),
        Text('Sub', style: TextStyle(fontSize: 20, color: Colors.white)),
      ],
    ),
    children: const <Widget>[
      Padding(
        padding: EdgeInsets.symmetric(horizontal: 7),
        child: Text('Content goes over here!', style: TextStyle(fontSize: 20, color: Colors.white)),
      ),
    ],
  ),
);

Alternatives

Packages that do the same job and could replace expansion_card.