Localize class

A class responsible for managing localization and retrieving localized strings.

This class uses the Locale to provide localized strings based on the current language.

Example usage:

Localize localize = Localize(Locale('en'));
print(localize.greeting('hello')); // Outputs: Hello World

Constructors

Localize(Locale locale)
Creates a Localize instance with the specified Locale.

Properties

hashCode int
The hash code for this object.
no setterinherited
locale Locale
The current locale.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

greeting(String key) String
Retrieves the greeting string for the given key.
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

languages List<String>
A list of supported languages.
no setter
localizeValue Map<String, Map<String, String>>
A map containing localization values for different languages.
getter/setter pair

Static Methods

of(BuildContext context) Localize
Retrieves the Localize instance from the provided BuildContext.