MultiBinaryType<T, U> constructor
const
MultiBinaryType<T, U> ({
- Map<
U, BinaryType< subtypes = const {},T> > - BinaryType<
T> getSubtype(- U
A BinaryType that selects one of multiple other BinaryTypes to serialize an object based on fields common to all possible types.
{@template prelude}
The set of fields common to all possible types that can be used to identify
the specific type to use is knows as the prelude. It may be a single value
(e.g String type) or multiple values in a record (e.g
(int protocolVersion, String type)).
The prelude type must correctly implement Object.== and Object.hashCode.
Implementation
const MultiBinaryType({
this.subtypes = const {},
this.getSubtype = _getSubtype,
});