getRootPanelElement static method
Returns the unique "root" panel element that matches panelId, or null.
Implementation
static KnowledgePanelElement? getRootPanelElement(
Product product,
String panelId,
) {
final List<KnowledgePanelElement> elements = getRootPanelElements(
product,
panelId: panelId,
simplified: false,
);
if (elements.length != 1) {
return null;
}
return elements.first;
}