set<T extends Object> method
Associates value with its typed key.
Implementation
void set<T extends Object>(
MambaContextKey<T> key,
MambaContextValue<T> value,
) {
if (!key._accepts(value)) {
throw ArgumentError.value(
value,
'value',
'does not match the primitive type of the context key',
);
}
_values[key] = value;
}