withDefault method

  1. @useResult
MapDefaultExtensions<K, V> withDefault(
  1. V defaultValue
)

Returns a MapDefaultExtensions view that returns defaultValue for missing keys. Audited: 2026-06-12 11:26 EDT

Implementation

@useResult
MapDefaultExtensions<K, V> withDefault(V defaultValue) =>
    MapDefaultExtensions<K, V>(this, defaultValue);