spec<K, V> static method
HandlerSpec<CRDTORMapHandler<K, V> >
spec<K, V>(
- String type, {
- ValueCodec<
K> ? keyCodec, - ValueCodec<
V> ? valueCodec,
The kind this handler is, under type.
Only the tag is asked for: the class knows the rest.
Pass it wherever a kind is named: BaseCRDTDocument.register,
BaseCRDTDocument.handler, and a container's child and insertChild.
Implementation
static HandlerSpec<CRDTORMapHandler<K, V>> spec<K, V>(
String type, {
ValueCodec<K>? keyCodec,
ValueCodec<V>? valueCodec,
}) =>
HandlerSpec<CRDTORMapHandler<K, V>>(
type,
(doc, id) => CRDTORMapHandler<K, V>(
doc,
id,
handlerType: type,
keyCodec: keyCodec,
valueCodec: valueCodec,
),
formats: _formats,
);