commonDecoders top-level property
Predefined decoders for common types
Implementation
final commonDecoders = () {
// register extra common types on first access
undefinedOr<T>(dynamic f) => f<UndefinedOr<T>>();
TypePlus.addFactory(undefinedOr);
TypePlus.addFactory(<T>(dynamic f) => f<Defined<T>>(), superTypes: [undefinedOr]);
TypePlus.addFactory(<T>(dynamic f) => f<Undefined<T>>(), superTypes: [undefinedOr]);
TypePlus.addFactory(<T>(dynamic f) => f<DBRef<T>>());
TypePlus.add<BsonKey>();
TypePlus.add<ObjectId>();
TypePlus.add<Uint8List>();
TypePlus.add<Uuid>();
return _commonDecoders;
}();