StickerFormat.fromJson constructor

StickerFormat.fromJson(
  1. Map<String, dynamic> json
)

a StickerFormat return type can be :

Implementation

factory StickerFormat.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case StickerFormatWebp.CONSTRUCTOR:
      return StickerFormatWebp.fromJson(json);
    case StickerFormatTgs.CONSTRUCTOR:
      return StickerFormatTgs.fromJson(json);
    case StickerFormatWebm.CONSTRUCTOR:
      return StickerFormatWebm.fromJson(json);
    default:
      return const StickerFormat();
  }
}