toMap method

  1. @useResult
Map<CardSet, Map<Card, int>> toMap()

Returns a map of card sets to the number of cards in that set.

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
Map<CardSet, Map<Card, int>> toMap() => Map.unmodifiable(_cards);