CustomLocalizations class

CustomLocalizations. 自定义本地化支持.

Constructors

CustomLocalizations(Locale locale)

Properties

hashCode int
The hash code for this object.
no setterinherited
locale Locale
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getString(String id, {String? languageCode, String? countryCode, List<Object>? params, String defValue = ''}) String
get string by id,Can be specified languageCode,countryCode. 通过id获取字符串,可指定languageCode,countryCode.
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

instance CustomLocalizations?
getter/setter pair
supportedLocales Iterable<Locale>
supported Locales 支持的语言
getter/setter pair

Static Methods

init(BuildContext context) → void
不推荐使用.
of(BuildContext context) CustomLocalizations?