decode method Null safety

MediaLoadRequestData decode(
  1. Object message
)

Implementation

static MediaLoadRequestData decode(Object message) {
  final Map<Object?, Object?> pigeonMap = message as Map<Object?, Object?>;
  return MediaLoadRequestData(
    shouldAutoplay: pigeonMap['shouldAutoplay'] as bool?,
    currentTime: pigeonMap['currentTime'] as int?,
    mediaInfo: pigeonMap['mediaInfo'] != null
        ? MediaInfo.decode(pigeonMap['mediaInfo']!)
        : null,
  );
}