GoogleCastQueueItemIOS.fromMap constructor
Creates a GoogleCastQueueItemIOS from a Map representation.
This factory parses the provided map
and constructs an instance
with the corresponding values, handling iOS-specific field names and types.
Implementation
factory GoogleCastQueueItemIOS.fromMap(Map<String, dynamic> map) {
return GoogleCastQueueItemIOS(
mediaInformation: GoogleCastMediaInformationIOS.fromMap(
Map<String, dynamic>.from(map['mediaInformation'])),
activeTrackIds: List.from(map['activeTracksIds'] ?? []),
autoPlay: map['autoPlay'] ?? false,
customData: map['customData'],
itemId: map['itemId'],
playbackDuration: map['playbackDuration'] == null
? null
: Duration(seconds: map['playbackDuration']),
preLoadTime: Duration(seconds: map['preLoadTime'] ?? 0),
startTime: Duration(seconds: map['startTime'] ?? 0),
);
}