Dice.fromJson constructor

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

Creates a new Dice object from json.

Implementation

factory Dice.fromJson(Map<String, dynamic> json) {
  return Dice(
    emoji: DiceEmoji.fromJson(json['emoji']!),
    value: json['value']!,
  );
}