buildContainer method

Widget buildContainer(
  1. BuildContext context,
  2. ThemeData theme,
  3. Offset? subMenuOffset,
  4. bool border,
)

Implementation

Widget buildContainer(BuildContext context, ThemeData theme,
    Offset? subMenuOffset, bool border) {
  final scaling = theme.scaling;
  final offset = subMenuOffset ??
      ((border ? const Offset(-4, 8) : const Offset(0, 4)) * scaling);
  return Data.inherit(
    data: this,
    child: MenuGroup(
      regionGroupId: this,
      direction: Axis.vertical,
      itemPadding: EdgeInsets.zero,
      subMenuOffset: offset,
      autofocus: false,
      builder: (context, children) {
        return IntrinsicHeight(
          child: Row(
            crossAxisAlignment: CrossAxisAlignment.stretch,
            mainAxisSize: MainAxisSize.min,
            children: children,
          ),
        ).medium();
      },
      children: widget.children,
    ),
  );
}