isChildOf method
Returns true if parent
has child
. If deep
is true, will check sub nodes children.
Will call childChecker.
Should be overwritten if childChecker is null.
Implementation
@override
bool isChildOf(Node? parent, Node? child, bool deep) {
if (parent == null || child == null) return false;
if (deep) {
return !identical(parent, child) && parent.contains(child);
} else {
return parent.nodes.contains(child);
}
}