set method

void set(
  1. String key,
  2. dynamic value, {
  3. bool shadows = true,
})

Sets a given key-value in this frame. If shadows is true (default) always sets in this frame If false, this will find the nearest ancestor that has the key and override it If no ancestor has the key, it is set locally

Implementation

void set(String key, dynamic value, {bool shadows = true}) {
  if (shadows) {
    data[key] = value;
  } else {
    final outerFrame = _frameForKey(key) ?? this;
    outerFrame.set(key, value, shadows: true);
  }
}