UserContext class
Context used for message resolution: locale, gender, formality, regional variant. Defaults: gender = male, regionalVariant = MSA when not set.
Constructors
- UserContext({required String locale, ResolutionGender gender = ResolutionGender.male, FormalityLevel formality = FormalityLevel.formal, RegionalVariant regionalVariant = RegionalVariant.msa})
-
const
Properties
- formality → FormalityLevel
-
Formality for formal/informal variants.
final
- gender → ResolutionGender
-
Gender for gendered strings. Default male.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- locale → String
-
Locale code (e.g. 'ar', 'ar_SA', 'en').
final
- regionalVariant → RegionalVariant
-
Regional variant (e.g. MSA, Gulf, Egyptian). Default MSA.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{String? locale, ResolutionGender? gender, FormalityLevel? formality, RegionalVariant? regionalVariant}) → UserContext -
mergeOverrides(
{String? locale, ResolutionGender? gender, FormalityLevel? formality, RegionalVariant? regionalVariant}) → UserContext - Merge overrides onto this context. Overrides win.
-
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