expandable_tile 1.0.1 copy "expandable_tile: ^1.0.1" to clipboard
expandable_tile: ^1.0.1 copied to clipboard

A simple and customizable Flutter widget that expands or collapses when tapped.Perfect for showing and hiding content dynamically with a clean, interactive UI.

Pub Version Likes Popularity

โ˜• Buy Me a Coffee #

Buy Me a Coffee

๐Ÿ”ฝ Expandable Tile (Flutter) #

A Flutter package that helps you expand or collapse widgets to show/hide content with customizable animations. It supports both horizontal and vertical directions and allows flexible customization to fit different UI needs.


๐ŸŽฌ Demo Video #

[Demo]


๐Ÿ“ฑ Use Cases #

  • Expandable sections in forms or FAQs.
  • Slide-in side menus or horizontal drawers.
  • Toggle content areas with smooth transitions.
  • Build custom accordion or collapsible lists.

โœจ Features #

  • Show/hide widgets with various animation styles.
  • Supports vertical and horizontal expansion.
  • Support some animation types.
  • Support change color, style title
  • Change width title or use fit width base on length title
  • Easily customizable animation types.
  • Clean API for integration in different widget trees.
  • Lightweight and fast.

๐Ÿ—๏ธ Architecture & Technologies #

Component Description
ExpandableTileView Main widget to expand/collapse content with animation
ExpandableAnimation Enum to select animation type (e.g., size, fade, scale, def)
AxisExpand Enum to control direction of expansion (horizontal or vertical)
ExpandTileController Main controller to control state of expand (isExpand,axis,...)

๐Ÿงพ Constructor Parameters #

Field Type Default Description
title String required The widget displayed as the expandable tile's title.
child Widget required The content widget shown when expanded.
width double? null The width of the entire tile. If null, it adapts to the content.
axis AxisExpand AxisExpand.vertical The direction of expansion: vertical or horizontal.
titleBGColor Color? null Background color for the title section.
titleTextStyle TextStyle? null Text style for the title (if it's a Text widget).
widthFill bool true If true, the total width of the ExpandableTile will fit title and child
posHorizontal bool false Applies only if axis is horizontal. If true, title on left, child on right.

๐Ÿš€ Usage #

โœ… Basic Usage #

๐Ÿ“ Default Size Animation

Child Horizontally
ExpandableTileView.animatedDef(
  title: "Animation default horizontal",
  axis: AxisExpand.horizontal,
  posHorizontal: true,
  child: Text("his is demo for expand text vertical. The Child is Text."),
)
Child Vertically
ExpandableTileView.animatedDef(
  title: "Animation default horizontal",
  axis: AxisExpand.horizontal,
  child: Text("his is demo for expand text vertical. The Child is Text."),
)

๐ŸŒซ๏ธ Fade Animation

ExpandableTileView.animatedFade(
  title: "Animation fade",
  child: Text("Fading in and out!"),
)

๐Ÿ” Scale Animation

ExpandableTileView.animatedScale(
  title: Text("Animation scale"),
  child: Text("Scaling animation!"),
)

โš™๏ธ Setup #

To install the expandable_tile package, add the following to your pubspec.yaml file:

dependencies:
  expandable_tile: ^1.0.1

๐Ÿ“ฆ Supported SDKs #

  • Flutter: Stable channel
  • Android: SDK 21+
  • iOS: iOS 9+

๐Ÿ™Œ Contributions #

Feel free to open issues or pull requests on GitHub.


๐Ÿ“„ License #

MIT License. See LICENSE for details.

2
likes
0
points
58
downloads

Publisher

unverified uploader

Weekly Downloads

A simple and customizable Flutter widget that expands or collapses when tapped.Perfect for showing and hiding content dynamically with a clean, interactive UI.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cupertino_icons, flutter

More

Packages that depend on expandable_tile