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.
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.
- flutter_dismissible_tile
A dismissible tile widget with animated customizable background and overlays on swipe.
39Compare - animated_custom_dropdown
Highly customizable animated dropdown for Flutter — search, network search with infinite scroll, multi-selection, overlay animations and a floating label.
76Compare - flip_card_swiper
Swipeable card stack widget with flip animations and optional haptics.
76Compare - expansion_tile_list
A customizable set of expansion tiles with styling, animations, and expansion control options.
62Compare