toJson method

Map<String, dynamic> toJson()

Serialize this component to a JSON object.

Implementation

Map<String, dynamic> toJson () => {
  'id': id,
  'name': name,
};