Spec-Zone.ru › Dart 2

dart:core

Метод updateAll

void updateAll(
  1. V update(
    1. K key,
    2. V value
    )
)

Обновляет все значения.

Итерируется по всем парам ключ-значение в карте и обновляет их результатом вызова update.

final terrestrial = <int, String>{1: 'Mercury', 2: 'Venus', 3: 'Earth'};
terrestrial.updateAll((key, value) => value.toUpperCase());
print(terrestrial); // {1: MERCURY, 2: VENUS, 3: EARTH}

Реализация

void updateAll(V update(K key, V value));

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-core/Map/updateAll.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API