toJson method

Map<String, dynamic> toJson()
override

Converts the BaseDTO to a JSON object.

This method can be used when making HTTP requests to convert the DTO to a format that can be sent in the request.

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['name'] = this.name;
  data['title'] = this.title;
  data['content'] = this.content;
  data['design'] = this.design;
  return data;
}