isStandaloneMediaElement function

bool isStandaloneMediaElement(
  1. Element element
)

Visible image / SVG / GIF / Lottie host (not an inner leaf under Ensemble*).

Implementation

bool isStandaloneMediaElement(Element element) {
  final type = mediaWidgetType(element.widget);
  if (type == null) return false;
  if (_hasMediaHostAncestor(element)) return false;
  if (hasPrimaryControlAncestor(element)) return false;
  return true;
}