LanguageManagement class
The LanguageManagement class is a utility for managing and switching the language used in a Flutter application. It provides static methods to retrieve the current language and change the app's language dynamically.
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 Properties
- getCurrentLanguage → String
-
Returns the current language code used in the application.
no setter
Static Methods
-
changeLanguage(
String language) → dynamic - The changeLanguage method is used to switch the app's language by changing the locale via the LanguageChangeProvider language (String): The language code (e.g., "en", "ar") representing the desired language to switch to