buildSection method
Build an expansion tile section
Implementation
Widget buildSection({
required String title,
String? subtitle,
required List<Widget> children,
bool initiallyExpanded = false,
}) {
return ExpansionTile(
title: Text(
title,
style: TextStyle(fontWeight: FontWeight.w600, color: textColor),
),
subtitle: subtitle != null
? Text(subtitle, style: TextStyle(fontSize: 12, color: subtitleColor))
: null,
initiallyExpanded: initiallyExpanded,
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: children,
),
),
],
);
}