toMap method

Map<String, dynamic> toMap()

Generate a map from the object

Implementation

Map<String, dynamic> toMap() {
  return {
    'type': type.value,
    'data': data,
  };
}