StateRecommendationService class
Recommends frequency states based on time of day and user history.
Mapping logic:
- Morning (6–10): Focus, Energy — wake up and activate
- Midday (10–14): Focus, Create — deep work window
- Afternoon (14–18): Calm, Relief — wind down from peak
- Evening (18–22): Calm, Meditate, Heart — transition to rest
- Night (22–6): Sleep, Lucid — prepare for sleep
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
-
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
-
getRecommendationReason(
String stateId, {String lang = 'es'}) → String - Context message explaining why this state is recommended.
-
getRecommendations(
{DateTime? now, Set< String> ? recentStateIds}) → List<FrequencyState> - Returns 3 recommended states for the current time slot. Returns 3 recommended states for the current time slot. Optionally pass recent state IDs to personalize order.
-
getRecommendedNow(
{DateTime? now}) → FrequencyState - Returns the top recommended state for right now.
-
getTimeGreeting(
{String lang = 'es', DateTime? now}) → String - Human-readable greeting for the time of day.