A simple combination of widgets to provide an Expansiontile with rounded corners. This widget uses default Flutter widgets only and is available for each platform.
This Widget returns a column with a ListTile and a ListView. It has all properties of the ListTile width a few custom inputfield. Simply load the widget in your pubspec yaml and start using it.
Default ListTile inputfields
Extra inputfields and tips
The shape will be used for the shape of the ListTile, not for the children. This is visible when pressed and will be shown in the ink splash.
Use the RoundedExpansionTile in a Card-widget with the same shape for the best result.
Card( shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)), child: RoundedExpansionTile( shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)), title: Text('Some title'), children: [ child1, child2, child3, ... ], ), ),
This will be used to show the expansion animation. It is used for the Expansion it self and the rotation / animation of the Icon. By default the duration is 500 milliseconds.
The children that will be displayd when the ListTile is expanded.
The padding around the children. This is not the same as the contentpadding.
The curve used for the children animation. By default it uses
When provided this will override the default hamburger menu icon (AnimatedIcon). This icon will rotate by default but can be set to false see rotateTrailing.
Rotate the custom trailing icon when provided. By default this is true. When set to false the icon stays the same. Provide the trailing with an arrow down to make the widget look like the default ExpansionTile.
When set to true there will be no trailing at all. Even when provided custom trailing this
boolwill prevent it from being shown.