fromMap static method
Implementation
static PlaybackEventMessage fromMap(Map<dynamic, dynamic> map) =>
PlaybackEventMessage(
processingState:
ProcessingStateMessage.values[map['processingState'] as int],
updateTime:
DateTime.fromMillisecondsSinceEpoch(map['updateTime'] as int),
updatePosition: Duration(microseconds: map['updatePosition'] as int),
bufferedPosition:
Duration(microseconds: map['bufferedPosition'] as int),
duration: map['duration'] == null || map['duration'] as int < 0
? null
: Duration(microseconds: map['duration'] as int),
icyMetadata: map['icyMetadata'] == null
? null
: IcyMetadataMessage.fromMap(
map['icyMetadata'] as Map<dynamic, dynamic>),
currentIndex: map['currentIndex'] as int?,
androidAudioSessionId: map['androidAudioSessionId'] as int?,
);