decode method Null safety
- Object message
Implementation
static MediaQueueItem decode(Object message) {
final Map<Object?, Object?> pigeonMap = message as Map<Object?, Object?>;
return MediaQueueItem(
itemId: pigeonMap['itemId'] as int?,
playbackDuration: pigeonMap['playbackDuration'] as double?,
startTime: pigeonMap['startTime'] as double?,
media: pigeonMap['media'] != null
? MediaInfo.decode(pigeonMap['media']!)
: null,
autoplay: pigeonMap['autoplay'] as bool?,
preloadTime: pigeonMap['preloadTime'] as double?,
);
}