fromMap static method

NotificationType? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static NotificationType? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'notificationTypeNewCall':
      return NotificationTypeNewCall.fromMap(_map);
    case 'notificationTypeNewPushMessage':
      return NotificationTypeNewPushMessage.fromMap(_map);
    case 'notificationTypeNewMessage':
      return NotificationTypeNewMessage.fromMap(_map);
    case 'notificationTypeNewSecretChat':
      return NotificationTypeNewSecretChat.fromMap(_map);
    case null:
    default:
      return null;
  }
}