DocumentLanguageController class
Singleton controller that manages the document-level language selection. Persists the choice via SharedPreferences and exposes it through a ValueNotifier so consumers (e.g. SpellCheckController) can listen without direct coupling.
Properties
- current → DocumentLanguage
-
Synchronous access to the current language value.
no setter
-
currentLanguage
→ ValueNotifier<
DocumentLanguage> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
initialize(
) → Future< void> - Initializes the controller by reading the saved language from SharedPreferences. Falls back to the system locale when nothing has been saved. Safe to call multiple times.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setLanguage(
DocumentLanguage lang) → Future< void> - Changes the document language and persists the choice.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → DocumentLanguageController
-
no setter