Dice constructor

const Dice({
  1. @JsonKey(name: 'emoji') required DiceEmoji emoji,
  2. @JsonKey(name: 'value') required int value,
})

Creates an animated emoji with a random value

emoji Emoji on which the dice throw animation is based value Value of the dice

Implementation

const factory Dice({
  /// Emoji on which the dice throw animation is based
  @JsonKey(name: 'emoji') required DiceEmoji emoji,

  /// Value of the dice.
  ///
  /// 1-6 for "🎲", "🎯" and "🎳" base emoji, 1-5 for "πŸ€" and "⚽" base
  /// emoji, 1-64 for "🎰" base emoji
  @JsonKey(name: 'value') required int value,
}) = _Dice;