CustomNotification.fromMap constructor Null safety

CustomNotification.fromMap(
  1. Map<String, dynamic> param
)

Implementation

factory CustomNotification.fromMap(Map<String, dynamic> param) {
  return CustomNotification(
    sessionId: param["sessionId"] as String?,
    sessionType:
        NIMSessionTypeConverter().fromValue(param["sessionType"] as String),
    fromAccount: param["fromAccount"] as String?,
    time: param["time"] as int?,
    content: param["content"] as String?,
    apnsText: param["apnsText"] as String?,
    pushPayload: castPlatformMapToDartMap(param["pushPayload"] as Map?),
    config: CustomNotificationConfig.fromMap(
        (param["config"] as Map?)?.cast<String, dynamic>()),
    // antiSpamOption: NIMAntiSpamOption.fromMap(param["antiSpamOption"] as Map<String,dynamic>?) ,
    env: param["env"] as String?,
  );
}