DiceExpression class abstract
An abstract expression that can be evaluated.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
) → RollResult - each DiceExpression operation is callable (when we call the parsed string, this is the method that'll be used)
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
roll(
) → RollResult - Rolls the dice expression
-
rollN(
int num) → Stream< RollResult> -
Lazy iterable of rolling
num
times. Results returned as stream. -
stats(
{int num = 500}) → Future< Map< String, dynamic> > -
Performs
num
rolls and outputs stats (stddev, mean, min/max, and a histogram) -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
String input, [Random? random]) → DiceExpression - Parse the given input into a DiceExpression