value property

A value

The current value of the union.

Its type is based the nearest common interface of all the types that the value can take.

See Union2 for examples on how value works.

Implementation

A get value {
  late A res;
  final assign = (A a) => res = a;
  this(assign, assign, assign, assign, null, null, null, null, null);
  return res;
}