encoder property

  1. @override
Converter<UndoTreeEventSourcedModel<S, B, E>, Map<String, dynamic>> get encoder
override

Returns the encoder from S to T.

It may be stateful and should not be reused.

Implementation

@override
Converter<UndoTreeEventSourcedModel<S, B, E>, Map<String, dynamic>>
    get encoder => ConverterFn((t) => <String, dynamic>{
          'initialState': t.initialState,
          'state': t._snapshot,
          'tree': _undoTreeCodec.encode(t._tree as UndoTree<E>),
        });