value property

D get value

Returns the current value of the struct.

If the struct is a literal, the returned value is detached from the underlying memory and can be mutated independently. Otherwise, its memory reference is preserved.

Implementation

D get value {
  final value = ref;
  if (!value._requiresOp) {
    value.structSyncFromMemory();
    value.op = null;
  }
  return value;
}