Game.fromJson constructor

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

Parse from a json

Implementation

factory Game.fromJson(Map<String, dynamic> json) => Game(
      id: int.parse(json['id']),
      shortName: json['short_name'],
      title: json['title'],
      text: FormattedText.fromJson(json['text']),
      description: json['description'],
      photo: Photo.fromJson(json['photo']),
      animation: json['animation'] == null
          ? null
          : Animation.fromJson(json['animation']),
    );