Value method

Pointer<T> Value([
  1. X? value,
  2. String? key
])

Returns the pointer for slot key, optionally writing value into it.

Allocates the slot on first use.

Implementation

Pointer<T> Value([X? value, String? key]) {
  final p = At(_slotKey(key));
  if (value != null) writeIntoFunc(p, value);
  return p;
}