expressiveWidestOption function

Widget expressiveWidestOption(
  1. BuildContext context,
  2. List<String> labels,
  3. Widget face
)

face, a select's read-only field: in a window ExpressiveSelect.wideFrom or wider, at least as wide as its widest option of labels needs, up to the width it is given (Flutter's DropdownButton is as wide as its widest item), so a person reads any choice whole and the face does not change width as they choose; on a phone, as it is (its column's width; a choice too long for it ends in an ellipsis).

Implementation

Widget expressiveWidestOption(
  BuildContext context,
  List<String> labels,
  Widget face,
) {
  if (MediaQuery.sizeOf(context).width < ExpressiveSelect.wideFrom ||
      labels.isEmpty) {
    return face;
  }
  return _WidestOption(labels: labels, child: face);
}