toJson method

Map<String, dynamic> toJson()

Converts the Assignment to a JSON map.

Implementation

Map<String, dynamic> toJson() {
  return {'type': _enumToString(type), 'amount': amount};
}