StakeDiceState class final
Describes state of the stake dice
Constructors
-
StakeDiceState({required String stateHash, required int stakeGramAmount, required List<
int> suggestedStakeGramAmounts, required int currentStreak, required List<int> prizePerMille, required int streakPrizePerMille, dynamic extra, int? clientId}) -
Describes state of the stake dice
const
-
StakeDiceState.fromJson(Map<
String, dynamic> json) -
Parses a StakeDiceState from TDLib JSON.
factory
Properties
- clientId → int?
-
Identifier of the TDLib client that sent this object.
final
- currentStreak → int
-
The number of rolled sixes towards the streak; 0-2
final
- extra → dynamic
-
"@extra" of the request this object answers.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
prizePerMille
→ List<
int> -
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
-
The amount of TON Grams staked in the previous roll; in the smallest units of the currency
final
- stateHash → String
-
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
-
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> -
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, dynamic extra, int? clientId}) → StakeDiceState -
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g.
field: () => nullto clear it. -
getConstructor(
) → String -
TDLib type name, e.g.
updateNewMessage.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this object to TDLib JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- CONSTRUCTOR → const String
- TDLib type name.