updateMap method

void updateMap(
  1. String sliceName,
  2. MapEntry mapEntry
)

updates a Map on the bridge

Implementation

void updateMap(String sliceName, MapEntry mapEntry) {
  if (_data.containsKey(sliceName)) {
    (_data[sliceName]['slice'] as Map)
        .addEntries([mapEntry].cast<MapEntry>());
  } else {
    Map cache = {};
    cache[mapEntry.key] = mapEntry.value;
    _data[sliceName] = {'slice': cache, 'type': Map};
  }
  notifyListeners();
}