build method
Subclasses should override this function to display the given children, which are the parsed representation of data.
Implementation
@override
Widget build(BuildContext context, List<Widget>? children) {
final list = children ?? const <Widget>[];
if (list.length == 1) return list.single;
final visible =
(maxLines != null && maxLines! < list.length)
? list.take(maxLines!).toList()
: list;
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: visible,
);
}