decoder property
Returns the decoder of this
, converting from T
to S
.
It may be stateful and should not be reused.
Implementation
@override
Converter<Map<String, dynamic>, UndoTreeEventSourcedModel<S, B, E>>
get decoder => ConverterFn((m) => UndoTreeEventSourcedModel<S, B, E>._(
initialState: ArgumentError.checkNotNull(m['initialState'] as S?),
state: m['state'] as S? ??
ArgumentError.checkNotNull(m['initialState'] as S?),
tree: _undoTreeCodec.decode(ArgumentError.checkNotNull(
m['tree'] as Map<String, dynamic>?,
)),
));