fromMap static method

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

Construct from Map.

Implementation

static MessageFileType? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'messageFileTypeUnknown':
      return MessageFileTypeUnknown.fromMap(_map);
    case 'messageFileTypePrivate':
      return MessageFileTypePrivate.fromMap(_map);
    case 'messageFileTypeGroup':
      return MessageFileTypeGroup.fromMap(_map);
    case null:
    default:
      return null;
  }
}