Line data Source code
1 : import 'package:flutter_chrome_cast/lib.dart';
2 :
3 : /// Android-specific implementation of photo media metadata.
4 : class GooglCastPhotoMediaMetadataAndroid extends GoogleCastPhotoMediaMetadata {
5 : /// Creates an Android photo media metadata instance.
6 0 : GooglCastPhotoMediaMetadataAndroid({
7 : super.artist,
8 : super.creationDateTime,
9 : super.height,
10 : super.latitude,
11 : super.location,
12 : super.longitude,
13 : super.title,
14 : super.width,
15 : });
16 :
17 : /// Creates a photo media metadata instance from a map.
18 0 : factory GooglCastPhotoMediaMetadataAndroid.fromMap(Map<String, dynamic> map) {
19 0 : return GooglCastPhotoMediaMetadataAndroid(
20 0 : title: map['title'],
21 0 : artist: map['artist'],
22 0 : location: map['location'],
23 0 : latitude: map['latitude']?.toDouble(),
24 0 : longitude: map['longitude']?.toDouble(),
25 0 : width: map['width']?.toInt(),
26 0 : height: map['height']?.toInt(),
27 0 : creationDateTime: map['creationDateTime'] != null
28 0 : ? DateTimeString.tryParse(map['creationDateTime'])
29 : : null,
30 : );
31 : }
32 : }
|