toSet method

  1. @useResult
Set<Card> toSet()

Returns a set of all of the cards in this collection.

This method is provided as a convenience, but is not guaranteed to be cheap to compute. For use in a hot loop, or in a UI (i.e. Flutter build() methods), it's highly recommended to use the methods on this class instead, or cache the result of this method.

Implementation

@useResult
Set<Card> toSet() => allCards.toSet();