Perhaps:

    _expandedState = new Set.from(expandedState)

assuming that that factory ctor returns a mutable set.