toJson method

Map toJson()

Creates a json from the object

Implementation

Map toJson() {
  return {
    'id': id,
    'title': title,
    'prices': prices,
  }..removeWhere((_, v) => v == null);
}