MessageDice.fromJson constructor

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

Parse from a json

Implementation

factory MessageDice.fromJson(Map<String, dynamic> json) => MessageDice(
      initialState: json['initial_state'] == null
          ? null
          : DiceStickers.fromJson(json['initial_state']),
      finalState: json['final_state'] == null
          ? null
          : DiceStickers.fromJson(json['final_state']),
      emoji: json['emoji'],
      value: json['value'],
      successAnimationFrameNumber: json['success_animation_frame_number'],
    );