RecentSession.fromMap constructor Null safety

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

Implementation

factory RecentSession.fromMap(Map<String, dynamic> param) {
  return RecentSession(
    sessionId: param['sessionId'] as String,
    updateTime: param['updateTime'] as int,
    ext: param['ext'] as String?,
    lastMsg: param['lastMsg'] as String?,
    lastMsgType: param['lastMsgType'] as int?,
    recentSession: NIMSession.fromMap(
        Map<String, dynamic>.from(param['recentSession'] as Map)),
    sessionType: NIMSessionTypeConverter().fromValue(param['sessionType']),
    sessionTypePair: param['sessionTypePair'] as String?,
    revokeNotification: param['revokeNotification'] == null
        ? null
        : NIMRevokeMessage.fromMap(
            Map<String, dynamic>.from(param['revokeNotification'] as Map)),
  );
}