isRoot property

bool get isRoot

Whether this node is a top-level entry of the document.

Implementation

bool get isRoot => depth == 0;