GoogleCastMovieMediaMetadataIOS.fromMap constructor

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

Creates a movie media metadata instance from a map.

Implementation

factory GoogleCastMovieMediaMetadataIOS.fromMap(Map<String, dynamic> map) {
  return GoogleCastMovieMediaMetadataIOS(
    title: map['title'] as String?,
    subtitle: map['subtitle'] as String?,
    studio: map['studio'] as String?,
    images: map['images'] != null
        ? (map['images'] as List)
              .map(
                (x) => GoogleCastImage.fromMap(Map<String, dynamic>.from(x)),
              )
              .whereType<GoogleCastImage>()
              .toList()
        : null,
    releaseDate: map['releaseDate'] != null && map['releaseDate'] is int
        ? DateTime.fromMillisecondsSinceEpoch(map['releaseDate'])
        : null,
  );
}