DiceExpression class abstract

An abstract expression that can be evaluated.

Constructors

DiceExpression()

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() List<int>
each 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() int
rolls the dice expression
rollN(int num) Stream<int>
Lazy iterable of rolling N times. Results returned as stream.
stats({int num = 500, int precision = 3}) Future<Map<String, dynamic>>
Performs N 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 throws FormatException if invalid