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.

Steps:
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 };

  1. update delegate a method "isSupported"
  @override

see #175 to find more details



Constructors

RefreshLocalizations(Locale locale)

Properties

currentLocalization RefreshString
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
locale Locale
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
values Map<String, RefreshString>
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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 Methods

of(BuildContext context) RefreshLocalizations

Constants

delegate → const RefreshLocalizationsDelegate