uiExpandedTile method
Provides the ability to have an expansion list of widgets.
Implementation
Widget uiExpandedTile({
required List<Widget> children,
required Widget title,
Key? key,
bool enabled = true,
bool initiallyExpanded = false,
dynamic leading,
ExpansionTileThemeData? style,
Widget? subtitle,
dynamic trailing,
}) {
// Make sure we are using things properly
assert(
leading is IconData || leading is Image || leading == null,
"leading can only be an Image, IconData, or null type",
);
assert(
trailing is IconData || trailing is Image || trailing == null,
"trailing can only be an Image, IconData, or null type",
);
final w = ExpansionTile(
key: key,
enabled: enabled,
leading: leading is IconData ? Icon(leading) : leading,
initiallyExpanded: false,
title: title,
subtitle: subtitle,
trailing: trailing is IconData ? Icon(trailing) : trailing,
children: children,
);
return style != null ? ExpansionTileTheme(data: style, child: w) : w;
}