comicDropdownWidth function

Widget comicDropdownWidth(
  1. BuildContext context,
  2. Widget face
)

face, a dropdown's closed face with its label, kept to comicDropdownMost at the start of the width it is given from 600 up; on a phone it takes its column. The face is marked (ComicAnchorFace) so a menu anchored on the wider room around it opens from the face.

Implementation

Widget comicDropdownWidth(BuildContext context, Widget face) {
  final marked = ComicAnchorFace(child: face);
  if (ComicTheme.of(context).width < 600) return marked;
  return Align(
    alignment: AlignmentDirectional.topStart,
    heightFactor: 1,
    child: ConstrainedBox(
      constraints: const BoxConstraints(maxWidth: comicDropdownMost),
      child: marked,
    ),
  );
}