cast<RK, RV> method
Provides a view of this map as having RK
keys and RV
instances, if necessary.
If this map is already a Map<RK, RV>
, it is returned unchanged.
If this set contains only keys of type RK
and values of type RV
, all read operations will work correctly. If any operation exposes a non-RK
key or non-RV
value, the operation will throw instead.
Entries added to the map must be valid for both a Map<K, V>
and a Map<RK, RV>
.
Implementation
Map<RK, RV> cast<RK, RV>();
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-core/Map/cast.html