fromMap static method

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

Construct from Map.

Implementation

static SuggestedAction? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'suggestedActionUpgradePremium':
      return SuggestedActionUpgradePremium.fromMap(_map);
    case 'suggestedActionCheckPhoneNumber':
      return SuggestedActionCheckPhoneNumber.fromMap(_map);
    case 'suggestedActionEnableArchiveAndMuteNewChats':
      return SuggestedActionEnableArchiveAndMuteNewChats.fromMap(_map);
    case 'suggestedActionConvertToBroadcastGroup':
      return SuggestedActionConvertToBroadcastGroup.fromMap(_map);
    case 'suggestedActionViewChecksHint':
      return SuggestedActionViewChecksHint.fromMap(_map);
    case 'suggestedActionSubscribeToAnnualPremium':
      return SuggestedActionSubscribeToAnnualPremium.fromMap(_map);
    case 'suggestedActionCheckPassword':
      return SuggestedActionCheckPassword.fromMap(_map);
    case 'suggestedActionRestorePremium':
      return SuggestedActionRestorePremium.fromMap(_map);
    case 'suggestedActionSetPassword':
      return SuggestedActionSetPassword.fromMap(_map);
    case null:
    default:
      return null;
  }
}