fromMap static method

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

Construct from Map.

Implementation

static CanBoostChatResult? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'canBoostChatResultAlreadyBoosted':
      return CanBoostChatResultAlreadyBoosted.fromMap(_map);
    case 'canBoostChatResultOk':
      return CanBoostChatResultOk.fromMap(_map);
    case 'canBoostChatResultPremiumSubscriptionNeeded':
      return CanBoostChatResultPremiumSubscriptionNeeded.fromMap(_map);
    case 'canBoostChatResultWaitNeeded':
      return CanBoostChatResultWaitNeeded.fromMap(_map);
    case 'canBoostChatResultInvalidChat':
      return CanBoostChatResultInvalidChat.fromMap(_map);
    case 'canBoostChatResultPremiumNeeded':
      return CanBoostChatResultPremiumNeeded.fromMap(_map);
    case null:
    default:
      return null;
  }
}