Milestone class
One row in _MilestonesList. Synthesised from progress + streak data;
not a stored entity. The tone is a visual hint for the trailing pill.
Constructors
- Milestone({required DateTime date, required int level, required String detail, required MilestoneTone tone})
-
const
- Milestone.fromMasteryTransition({required DateTime date, required String topicTitle, required String mastery})
-
Pick a tone heuristically from the mastery transition. Higher levels
read as "forest" (deep), evaluation reads as "plum", everything else
falls back to "ochre" (the streak/retention voice).
factory
Properties
- date → DateTime
-
final
- detail → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- level → int
-
Mastery level 0..5 reached by this transition. Carried instead of a
rendered headline: providers have no
BuildContext, so the localized title is resolved at the widget bymilestoneTitleLabel.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tone → MilestoneTone
-
final
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