build method
- @override
- BuildContext context,
- Sockets model
override
Builds the UI according to the state in model
.
Implementation
@override
Widget build(BuildContext context, Sockets model) => DropdownButton<RoverType>(
value: model.rover,
onChanged: model.setRover,
focusNode: FocusNode(),
items: [
for (final type in RoverType.values) DropdownMenuItem(
value: type,
child: Text(type.humanName),
),
],
);