toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  var out = <String, dynamic>{'type': type};
  if (id != null) out['id'] = id;
  if (payload != null) out['payload'] = payload;
  return out;
}