StakeDiceState class final

Describes state of the stake dice

Inheritance
Available extensions
Annotations
  • @immutable

Constructors

StakeDiceState({required String stateHash, required int stakeGramAmount, required List<int> suggestedStakeGramAmounts, required int currentStreak, required List<int> prizePerMille, required int streakPrizePerMille})

Properties

currentStreak int
currentStreak The number of rolled sixes towards the streak; 0-2
final
hashCode int
The hash code for this object.
no setteroverride
prizePerMille List<int>
prizePerMille The number of Grams received by the user for each 1000 Grams staked if the dice outcome is 1-6 correspondingly; may be empty if the stake dice can't be sent by the current user
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stakeGramAmount int
stakeGramAmount The amount of TON Grams staked in the previous roll; in the smallest units of the currency
final
stateHash String
stateHash Hash of the state to use for sending the next dice; may be empty if the stake dice can't be sent by the current user
final
streakPrizePerMille int
streakPrizePerMille The number of Grams received by the user for each 1000 Grams staked if the dice outcome is 6 three times in a row with the same stake
final
suggestedStakeGramAmounts List<int>
suggestedStakeGramAmounts The amounts of Grams that are suggested to be staked; in the smallest units of the currency
final

Methods

copyWith({String? stateHash, int? stakeGramAmount, List<int>? suggestedStakeGramAmounts, int? currentStreak, List<int>? prizePerMille, int? streakPrizePerMille}) StakeDiceState

Available on StakeDiceState, provided by the StakeDiceStateExtensions extension

getConstructor() String
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromJson(Map<String, dynamic>? json) StakeDiceState?

Constants

constructor → const String