asModel function

Model asModel(
  1. Map map
)

Cast the map if needed.

Implementation

Model asModel(Map map) => map is Model ? map : map.cast<K, V>();