maybeHasLeadingOf static method
- BuildContext context
Returns whether any ancestor CupertinoMenuAnchor has menu items with leading widgets.
This can be used by menu items to determine whether they need to allocate space for a leading widget to align with sibling menu items.
Implementation
static bool? maybeHasLeadingOf(BuildContext context) {
return context.dependOnInheritedWidgetOfExactType<_AnchorScope>()?.hasLeading;
}