build method

  1. @override
Widget build(
  1. BuildContext context,
  2. 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),
      ),
    ],
  );