AppLanguage class
AppLanguage view model class interact with modal in the context of the App Language.
The class provides methods that set's the language, change the language in the modal.
Methods include:
fetchLocale
changeLanguage
selectLanguagePress
dbLanguageUpdate
appLanguageQuery
userLanguageQuery
Inheritance
: - Object
- ChangeNotifier
- BaseModel
- AppLanguage
Constructors
[AppLanguage][]
:
Properties
[appLocal] [→ Locale] : getter for appLocal. ::: features no setter :::
[databaseFunctions] [→ DataBaseMutationFunctions] : Functions related to database mutations. ::: features final :::
[hashCode] [→ int] : The hash code for this object. ::: features no setterinherited :::
[hasListeners] [→ bool] : Whether any listeners are currently registered. ::: features no setterinherited :::
: ::: features no setterinherited :::
[isTest] [→ bool] : Represents a boolean value indicating whether the current environment is a test environment. ::: features final :::
[navigationService] [→ NavigationService] : A service that provides navigation-related functionalities. ::: features final :::
[runtimeType] [→ Type] : A representation of the runtime type of the object. ::: features no setterinherited :::
: ::: features no setterinherited :::
Methods
[addListener][([[VoidCallback] listener]) → void ] : Register a closure to be called when the object changes. ::: features inherited :::
[appLanguageQuery][ [→ Future<[void>]] ] : Queries the app language.
[changeLanguage][([[Locale] type]) [→ Future<[void>]] ] : This function change the app default language.
[dbLanguageUpdate][ [→ Future<[void>]] ]
: This function updates the Database Language by running the graphQL
mutations
.
dispose [→ void ] : Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed). ::: features inherited :::
[fetchLocale][ [→ Future<[void>]] ] : This function fetch the language of the user's app.
[initialize][ [→ Future<[void>]] ] : initialiser.
[localeResoultion][([[Locale?] locale, ][[Iterable[<[Locale]>]] supportedLocales]) [→ Locale] ] : This function fetches the appropriate locale for the user's app based on the provided locale and supported locales.
[noSuchMethod][([[Invocation] invocation]) → dynamic ] : Invoked when a nonexistent method or property is accessed. ::: features inherited :::
notifyListeners [→ void ] : Call all the registered listeners. ::: features inherited :::
[removeListener][([[VoidCallback] listener]) → void ] : Remove a previously registered closure from the list of closures that are notified when the object changes. ::: features inherited :::
[selectLanguagePress][ [→ Future<[void>]] ] : Navigates the user after choosing lthe anguage.
[setState][([[ViewState] viewState]) → void ]
: ::: features inherited :::
[toString][ [→ String] ] : A string representation of this object. ::: features inherited :::
[userLanguageQuery][([[String] userId]) [→ Future<[void>]] ] : This function perform graphQL query to check the user's language in the database.
Operators
[operator ==][([[Object] other]) [→ bool] ] : The equality operator. ::: features inherited :::
- talawa
- lang_view_model
- AppLanguage class