withAncestors property

Iterable<Fragment> get withAncestors

Return this fragment and all its enclosing fragment.

Implementation

Iterable<Fragment> get withAncestors sync* {
  var current = this;
  while (true) {
    yield current;
    final enclosing = current.enclosingFragment;
    if (enclosing == null) {
      break;
    }
    current = enclosing;
  }
}