GooglCastPhotoMediaMetadataAndroid.fromMap constructor

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

Creates a photo media metadata instance from a map.

Implementation

factory GooglCastPhotoMediaMetadataAndroid.fromMap(Map<String, dynamic> map) {
  return GooglCastPhotoMediaMetadataAndroid(
    title: map['title'],
    artist: map['artist'],
    location: map['location'],
    latitude: map['latitude']?.toDouble(),
    longitude: map['longitude']?.toDouble(),
    width: map['width']?.toInt(),
    height: map['height']?.toInt(),
    creationDateTime: map['creationDateTime'] != null
        ? DateTimeString.tryParse(map['creationDateTime'])
        : null,
  );
}