Mastery class
Centralized mastery level logic used across the app.
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
canSelfOverride(
String current, String target) → bool -
Whether a self-override from
currenttotargetis allowed. Users can skip forward at most 2 levels, and never directly to 'mastery'. -
effectiveMastery(
List< String> childMasteries, [String? ownMastery]) → String -
Compute effective mastery for a parent topic from its children's mastery
values. Returns
'in_progress'when children have mixed mastery levels. -
nextMastery(
String current, String sessionMode) → String? - Returns the next mastery level if the completed session mode matches the expected progression, or null if no advancement applies.
-
validationModeForLevel(
String targetLevel) → String? - Returns the session mode used to validate a given mastery level.