menu
dartlin package
documentation
collections.dart
GetOrPut extension
GetOrPut extension
dark_mode
light_mode
GetOrPut<
K
,
V
>
extension
on
Map
<
K
,
V
>
Methods
getOrPut
(
K
key
,
V
defaultValue
(
K
value
)
)
→ V
Available on Map
<
K
,
V
>
, provided by the
GetOrPut
extension
Returns the value for the given key. If the key is not found in the map, calls the defaultValue function, puts its result into the map under the given key and returns it.
dartlin package
documentation
collections
GetOrPut extension
collections library