isNestedContentMediaElement function

bool isNestedContentMediaElement(
  1. Element element
)

Media nested under a tappable card/row (device art, status glyphs, …).

Not under a compact icon host — that host already observes as icon.

Implementation

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