local<T> method

T? local<T>(
  1. String key, [
  2. dynamic value
])

Returns local data associated with the specified key

If value is set, it will write to local data.

Implementation

T? local<T>(String key, [value]) {
  if (value == null) {
    return _localData.tryGet<T>(key);
  }

  _localData.set(key, value);
  return value;
}