fromMap static method

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

Construct from Map.

Implementation

static SecretChatState? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'secretChatStatePending':
      return SecretChatStatePending.fromMap(_map);
    case 'secretChatStateReady':
      return SecretChatStateReady.fromMap(_map);
    case 'secretChatStateClosed':
      return SecretChatStateClosed.fromMap(_map);
    case null:
    default:
      return null;
  }
}