Game.fromJson constructor

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

Parses a Game from TDLib JSON.

Implementation

factory Game.fromJson(Map<String, dynamic> json) => Game(
      id: _readInt(json['id']),
      shortName: _readString(json['short_name']),
      title: _readString(json['title']),
      text: _readObject(json['text'], FormattedText.fromJson),
      description: _readString(json['description']),
      photo: _readObject(json['photo'], Photo.fromJson),
      animation: _readOptional(json['animation'], Animation.fromJson),
    );