spaceParents property

List<SpaceParent> spaceParents

The parents of this room. Currently this SDK doesn't yet set the canonical flag and is not checking if this room is in fact a child of this space. You should therefore not rely on this and always check the children of the space.

Implementation

List<SpaceParent> get spaceParents =>
    states[EventTypes.spaceParent]
        ?.values
        .map((state) => SpaceParent.fromState(state))
        .where((child) => child.via?.isNotEmpty ?? false)
        .toList() ??
    [];