RefreshLocalizations class

Implementation of localized strings for the ClassicHeader,ClassicFooter,TwoLevelHeader

Supported languages:now only add Chinese and English If you need to add other languages,please give me a pr

Sample code

To include the localizations provided by this class in a MaterialApp, add RefreshLocalizations.delegates to MaterialApp.localizationsDelegates, and specify the locales your app supports with MaterialApp.supportedLocales:

new MaterialApp(
  localizationsDelegates: RefreshLocalizations.delegates,
  supportedLocales: [
    const Locale('en'), // American English
    const Locale('zh'), // Israeli Hebrew
    // ...
  // ...

If you don't have the language you need here and you want to add it, you can give me a pr.

1. custom a class XXRefreshString implements  RefreshString ,and then translate them
2. add it into values
  Map<String, RefreshString> values = {
   'en': EnRefreshString(),
   'zh': ChRefreshString(),
   'fr': FrRefreshString(),
   'ru': RuRefreshString(),
   'uk': UkRefreshString(),
   'xx':XXRefreshString(), // xx indicate your country code
3. update delegate a method "isSupported"

see #175 to find more details


RefreshLocalizations(Locale locale)


currentLocalization RefreshString?
no setter
hashCode int
The hash code for this object.
no setterinherited
locale Locale
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values Map<String, RefreshString>
getter/setter pair


noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.

Static Methods

of(BuildContext context) RefreshLocalizations?