toJson method

Map<String, dynamic> toJson()

Converts an instance to json.

Implementation

Map<String, dynamic> toJson() => {
  idKey: id,
  userIdKey: userId ?? "",
  dataKey: data,
};