hasExcludedPopupOpen property

bool get hasExcludedPopupOpen

A named popup listed in disabledRoutes (e.g. an OTP dialog) excludes the whole capture while it is open: it is drawn over the page and its contents would otherwise be captured under the page's permission.

Implementation

bool get hasExcludedPopupOpen {
  try {
    final names = (openPopupNames ?? () => OpenPopupRoutes.names)();
    return names.any(routes.isRouteDisabled);
  } catch (_) {
    // Fail closed: an unknown popup state must not leak excluded content.
    return true;
  }
}