toJson method

Map<String, Object> toJson()

Return a table representing the structure of the Json object that will be sent to the client to represent this response.

Implementation

Map<String, Object> toJson() {
  var jsonObject = <String, Object>{};
  jsonObject[EVENT] = event;
  var params = this.params;
  if (params != null) {
    jsonObject[PARAMS] = params;
  }
  return jsonObject;
}