fromMap static method

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

Construct from Map.

Implementation

static TargetChat? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'targetChatInternalLink':
      return TargetChatInternalLink.fromMap(_map);
    case 'targetChatChosen':
      return TargetChatChosen.fromMap(_map);
    case 'targetChatCurrent':
      return TargetChatCurrent.fromMap(_map);
    case null:
    default:
      return null;
  }
}