fromMap static method

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

Construct from Map.

Implementation

static StickerType? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'stickerTypeRegular':
      return StickerTypeRegular.fromMap(_map);
    case 'stickerTypeMask':
      return StickerTypeMask.fromMap(_map);
    case 'stickerTypeCustomEmoji':
      return StickerTypeCustomEmoji.fromMap(_map);
    case null:
    default:
      return null;
  }
}