build method
- @override
- BuildContext context,
- Controller model
override
Builds the UI according to the state in model
.
Implementation
@override
Widget build(BuildContext context, Controller model) => ExpansionTile(
expandedCrossAxisAlignment: CrossAxisAlignment.start,
expandedAlignment: Alignment.centerLeft,
childrenPadding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 8,
),
title: Text(
model.controls.mode.name,
style: Theme.of(context).textTheme.titleLarge,
textAlign: TextAlign.start,
),
children: [
for (final entry in model.controls.buttonMapping.entries) ...[
Text(entry.key, style: Theme.of(context).textTheme.labelLarge),
Text(
" ${entry.value}",
style: Theme.of(context).textTheme.titleMedium,
),
],
],
);