getOverlayEntry method
Implementation
@override
OverlayEntry getOverlayEntry(BuildContext context) {
return OverlayEntry(builder: (ctx) {
final pos = getOverlayPosition(context, props.align, constraints)
.addMargin(props.margin);
return Positioned(
top: pos.top,
left: pos.left,
right: pos.right,
bottom: pos.bottom,
child: Container(
constraints: constraints,
child: TapRegion(
groupId: props.groupId,
onTapOutside: onTapOutside,
child: Material(
type: MaterialType.card,
shape: props.shape ?? PopupMenuTheme.of(context).shape,
elevation:
props.elevation ?? PopupMenuTheme.of(context).elevation ?? 8,
color: props.color ?? PopupMenuTheme.of(context).color,
clipBehavior: props.clipBehavior,
borderRadius: props.borderRadius,
shadowColor: props.shadowColor,
borderOnForeground: props.borderOnForeground,
surfaceTintColor: props.surfaceTintColor,
child: child,
),
),
),
);
});
}