toMap method Null safety

Map toMap()

Implementation

Map toMap() {
  return {
    "albumId": albumId,
    "assetId": assetId,
    "type": type == MediaType.image ? "IMAGE" : "VIDEO",
    "uri": uri,
  };
}