ListMap<K, V>.unsafeFrom constructor
Creates a ListMap backed by the provided map
and list
. No defensive
copies will be made, so you have to make sure that:
Implementation
ListMap.unsafeFrom({
required Map<K, V> map,
required List<K> list,
}) : _map = map,
_list = list {
if (map.length != list.length)
throw AssertionError('Map has ${map.length} but list has ${list.length} items.');
}