decode method Null safety

CastMessage decode(
  1. Object message
)

Implementation

static CastMessage decode(Object message) {
  final Map<Object?, Object?> pigeonMap = message as Map<Object?, Object?>;
  return CastMessage(
    namespace: pigeonMap['namespace'] as String?,
    message: pigeonMap['message'] as String?,
  );
}