Skip to content

Latest commit

 

History

History
46 lines (42 loc) · 1.41 KB

README.md

File metadata and controls

46 lines (42 loc) · 1.41 KB

Expandable Widgets

A package that provides expandable widgets for Flutter. Written in %100 Dart.

Examples

General use:

         Expandable(
          primaryWidget: Container(
            height: 30,
            child: Center(child: Text('Hello world!')),
          ),
          secondaryWidget: Container(
            height: 45,
            child: Center(
              child: Column(
                children: [
                  Text('Hello'),
                  Text('World!'),
                ],
              ),
            ),
          ),
          backgroundColor: Colors.grey.withOpacity(0.4),
          showArrowIcon: true,
          centralizePrimaryWidget: true,
          isClickable: true,
          padding: EdgeInsets.all(5.0),
         ),

For a long text:

         ExpandableText(
          elevation: 5,
          padding: EdgeInsets.all(10.0),
          animationDuration: Duration(milliseconds: 500),
          textWidget: Text(
            data,
            maxLines: 3,
            overflow: TextOverflow.ellipsis,
          ),
          showArrowIcon: true,
          initiallyExpanded: false,
          hoverOn: false,
          arrowLocation: ArrowLocation.right,
          finalArrowLocation: ArrowLocation.bottom,
         ),