createWrapper method
Creates and stores a wrapper for the given key and value.
The wrapper type depends on debug:
false: uses ExpandoValueWrapper.true: uses ExpandoValueWrapperDebug (keeps a weak reference tokey).
The wrapper is weakly associated with key via the internal Expando.
Implementation
@override
ExpandoValueWrapper<V> createWrapper(K key, V value) {
final wrapper = debug
? ExpandoValueWrapperDebug<K, V>(key, value)
: ExpandoValueWrapper<V>(value);
// Weakly associate value with the key.
_expando[key] = wrapper;
return wrapper;
}