copyWith<T> method

Context copyWith<T>(
  1. ContextKey<T> key,
  2. T value
)

Creates a new Context with the specified value for the given key

Implementation

Context copyWith<T>(ContextKey<T> key, T value) {
  return ContextCreate.create(contextMap: {
    ..._values,
    key: value,
  });
}