GooglCastPhotoMediaMetadataIOS.fromMap constructor

GooglCastPhotoMediaMetadataIOS.fromMap(
  1. Map<String, dynamic> map
)

Creates a photo media metadata instance from a map.

Implementation

factory GooglCastPhotoMediaMetadataIOS.fromMap(Map<String, dynamic> map) {
  return GooglCastPhotoMediaMetadataIOS(
    title: map['title'],
    artist: map['albumArtist'],
    location: map['locationName'],
    latitude: map['locationLatitude']?.toDouble(),
    longitude: map['locationLongitude']?.toDouble(),
    width: map['width']?.toInt(),
    height: map['height']?.toInt(),
    creationDateTime: map['creationDate'] != null
        ? DateTime.fromMillisecondsSinceEpoch(map['creationDate'] ?? 0)
        : null,
  );
}