toJson method

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

Implementation

@override
Map<String, dynamic> toJson() {
  var json = <String, dynamic>{};
  json['type'] = 'Message';
  json.addAll({
    'index': index,
    'name': name,
    'messageObjectId': messageObjectId,
    'size': size,
  });
  _setIfNotNull(json, 'handler', handler?.toJson());
  _setIfNotNull(json, 'location', location?.toJson());
  return json;
}