Search packages, repositories and app categories

Package detailsv1.0.1

expansion_card

A customizable Flutter expansion card with optional animated image backgrounds.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
156
Likes
301
Pub points
150

Install package

flutter pub add expansion_card

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The expansion_card package provides a customizable Flutter widget that enables collapsible cards with optional animated image backgrounds. Ideal for displaying expandable content such as FAQs, detailed information, or interactive sections, it supports smooth animations and responsive design across all major platforms. Developers can tailor the card's appearance, behavior, and transition effects to match their app’s UI. The package is lightweight and integrates seamlessly into existing Flutter projects.

Use cases

  • Displaying FAQ sections
  • Showing detailed product information
  • Creating interactive accordions
  • Presenting layered content in forms
  • Enhancing user onboarding flows

Key features

  • Customizable card styling
  • Animated image backgrounds
  • Smooth expand/collapse transitions
  • Cross-platform support
  • Easy integration with Flutter
  • Configurable animation duration

Suitable for

  • Developers building interactive UIs
  • Apps needing expandable content sections
  • Designers seeking animated card components
  • Projects targeting multiple platforms
  • UI-heavy applications with dynamic content

Considerations

  • May impact performance with many instances
  • Image background loading requires careful optimization
  • Animation settings should be tuned for smooth UX
  • Limited built-in accessibility features
  • Not suitable for static content only

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Expansion card

Open Source Love

This package provides an easy implementation of a Expansion type card where you can also add gif at the background.

How to use

import 'package:expansion_card/expansion_card.dart';

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

Custom Usage

There are several options that allow for more control:

Properties Description
leading Define an action after slidding a button
background provide any image asset file (supports gif also)
onExpansionChanged When the tile starts expanding, this function is called with the value true. When the tile starts collapsing, this function is called with the value false.
trailing A widget to display instead of a rotating arrow icon
initiallyExpanded Specifies if the list tile is initially expanded (true) or collapsed (false, the default)


👍 Contribution

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Categories

Source repository

Projects using this package

No data available yet.