isChildOf method

bool isChildOf(
  1. K? parent,
  2. K? child,
  3. bool deep
)

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

bool isChildOf(K? parent, K? child, bool deep) =>
    parent != null && child != null && childChecker!(parent, child, deep);