Skip to main content

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

Constructors

AppLanguage ({bool isTest = false})

Properties

appLocalLocale

read-only

databaseFunctionsDataBaseMutationFunctions

final

hashCodeint

The hash code for this object.
read-onlyinherited

hasListenersbool

Whether any listeners are currently registered.
read-onlyinherited

isBusybool

read-onlyinherited

isTestbool

final

final

runtimeTypeType

A representation of the runtime type of the object.
read-onlyinherited

stateViewState

read-onlyinherited

Methods

addListener(VoidCallback listener) void

Register a closure to be called when the object changes.
inherited

appLanguageQuery() Future<void>

This function perform graphQL query to check the app language. The function uses gqlAuthQuery method provided by Database Functions Services.

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).
inherited

fetchLocale() Future<void>

This function fetch the language of the user's app.

initialize() Future<void>
noSuchMethod(Invocation invocation) dynamic

Invoked when a non-existent method or property is accessed.
inherited

notifyListeners() void

Call all the registered listeners.
inherited

removeListener(VoidCallback listener) void

Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited

selectLanguagePress() Future<void>

This function navigate user to /appSettingsPage route if the user is authenticated else navigate to /setUrl route.

setState(ViewState viewState) void

inherited

toString() String

A string representation of this object.
inherited

userLanguageQuery(String userId) Future<void>

This function perform graphQL query to check the user's language in the database. The function uses gqlAuthQuery method provided by Database Functions Services.

Operators

operator ==(Object other) bool

The equality operator.
inherited