Skip to content

horam/flexible-expansion-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter Expansion List

A Flutter package to provide Expandable List with customizable animation and List items.

Example Project

There is a good example project in the example folder.

Demo

expansion_list

Usage

       FlexibleExpansionList(
        itemCount: data!.length,
        headerBuilder: (BuildContext context, int index, bool isExpanded) {
          return ListTile(
            title: Text(isExpanded ? 'Collapse' : 'Expand'),
          );
        },
        fixedItemBuilder: (BuildContext context, int index) {
          return ListTile(
            title: Text(data![index].title),
            subtitle: Text(data![index].subtitle),
          );
        },
        expandedItemBuilder: (BuildContext context, int index) {
          return Padding(
            padding: const EdgeInsets.symmetric(horizontal: 8),
            child: ListTile(
              title: Text(data![index].fields.title),
              subtitle: Text(data![index].fields.value),
            ),
          );
        }
      ),

Properties

Property Description Default
required int itemCount Total number of fixed items. required
required IndexedWidgetBuilder fixedItemBuilder Creates fixed list item widgets. required
required IndexedWidgetBuilder expandedItemBuilder Create The widget(s) that should be displayed when each item is expanded. required
IndexedHeaderWidgetBuilder headerBuilder Creates The widget that should be shown as the header for the whole list. null
Animation animation Expansion and collapse animation with a value of type double. CurvedAnimation
AnimationController controller Expansion and collapse animation controller. default controller with 300 milliseconds duration

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages