RandomSnapshot class
Opaque, versioned snapshot of a SeededRandom's internal state — serializable so a caller (e.g. a save file, or IDEA-42's replay capsule) can persist an RNG stream and later resume it at the exact point it left off, via SeededRandom.fromSnapshot.
Constructors
- RandomSnapshot({required int algorithmVersion, required int state})
-
const
Properties
- algorithmVersion → int
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → int
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromJson(
Map< String, Object?> json) → RandomSnapshot - Throws FormatException for a missing/wrong-typed field — same "untrusted input, fail loud rather than silently produce a bogus RNG stream" posture as the rest of this package's persisted state.