toJson method

Map<String, dynamic> toJson()

Converts this model into a JSON map, including the ID.

Implementation

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