map<K, V> function

Arbitrary<Map<K, V>> map<K, V>(
  1. Arbitrary<K> key,
  2. Arbitrary<V> value, {
  3. int? minLength,
  4. int? maxLength,
})

Returns an arbitrary that generates a map value.

Parameters:

  • key: The arbitrary to use to generate the keys of the map.
  • value: The arbitrary to use to generate the values of the map.
  • minLength: The minimum length of the map.
  • maxLength: The maximum length of the map.

Implementation

Arbitrary<Map<K, V>> map<K, V>(
  Arbitrary<K> key,
  Arbitrary<V> value, {
  int? minLength,
  int? maxLength,
}) =>
    MapArbitraries.map(
      key,
      value,
      minLength: minLength,
      maxLength: maxLength,
    );