toJson method

  1. @override
Map<String, Object?> toJson()

Returns this as a serializable JSON value.

Implementation

@override
Map<String, Object?> toJson() => {
      'runtimeType': 'YUndoEvent',
      'origin': (origin == null
          ? const None().toJson()
          : Option.fromValue(origin).toJson((some) => some.toList())),
      'kind': kind.toJson(),
      'stack-item': stackItem.toJson(),
    };