scopes property

Returns the scopes from closest to root

Implementation

List<ScopedWidgetTreeSnapshot> get scopes {
  _ensureSnapshotIsFromThisFrame();
  final List<ScopedWidgetTreeSnapshot> list = [];
  ScopedWidgetTreeSnapshot? next = parentScope;
  while (next != null) {
    list.add(next);
    next = next.parentScope;
  }
  return list;
}