expansion_card 0.1.0 expansion_card: ^0.1.0 copied to clipboard
Expansion Card that expands on click with full body cover background that also expands ontap. This widget is highly customizable with smooth animations.
Expansion Card #
This package provides an easy implementation of a Expansion type card. You can also add gif or image at the background which expands with the card.
##Screenshot
How to use #
import 'package:expansion_card/expansion_card.dart';
Center(
child: ExpansionCard(
title: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
"Header",
),
Text(
"Sub",
),
],
),
),
children: <Widget>[
Container(
margin: EdgeInsets.symmetric(horizontal: 7),
child: Text("Content goes over here !",
),
)
],
));
Custom Usage #
There are several options that allow for more control:
Properties | Description |
---|---|
background |
Provides background image |
borderRadius |
Provides radius to the card |
leading |
Define an action after slidding a button |
gif |
(String) address of your gif file ot image file for background |
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) |
You can go here for the example
👍 Contribution #
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -m 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request