takePriority method

void takePriority()

Takes priority over all other siblings, i.e. sets itself as active and all other siblings as inactive.

Implementation

void takePriority() {
  if (_parent?._children.isNotEmpty ?? false) {
    for (var child in _parent!._children) {
      child.active = false;
    }
  }
  active = true;
}