templateFacts function
Label/value pairs in two columns.
Implementation
Widget templateFacts(TemplateTheme theme, List<(String, String)> items) {
final List<Widget> cells = <Widget>[
for (final (String label, String value) in items)
Padding(
padding: const EdgeInsets.only(bottom: 6),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(label, style: TextStyle(fontSize: 8, color: theme.muted)),
SizedBox(height: 1),
Text(
value,
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.bold,
color: theme.ink,
),
),
],
),
),
];
return GridView(
crossAxisCount: 2,
mainAxisSpacing: 0,
crossAxisSpacing: 12,
childAspectRatio: 4.2,
children: cells,
);
}