withValue method

Context withValue(
  1. Object key,
  2. Object? value
)

Creates a new Context with a value

Implementation

Context withValue(Object key, Object? value) {
  final newContext = Context(timeout: _timeout);
  newContext._values.addAll(_values);
  newContext._values[key] = value;
  return newContext;
}