build method
Describes the part of the UI represented by this widget.
Implementation
@override
Widget build(BuildContext context) {
final theme = ThemeScope.of(context);
final selected = _selectedOption();
final label = selected?.label ?? placeholder;
final style = _copyStyle(textStyle ?? theme.bodyMedium)
..foreground(theme.onSurface);
final content = Row(
gap: 1,
children: [
Text(label, style: style),
Text('v', style: style),
],
);
return Button(
child: content,
size: size,
variant: variant,
enabled: enabled && onChanged != null,
onPressed: _nextValue == null ? null : _selectNext,
);
}