PluralItem class final
复数词条(keyone/keyother 子键 + @plural(var) 注解)
Excel 示例:
itemCount | @plural(count) | | ← 父行(注解)
itemCountone | | {count} item | {count} 件
itemCountother | | {count} items | {count} 件
Constructors
-
PluralItem({required String key, String? description, required String pivotParam, required List<
PlaceholderParam> additionalParams, required Map<String, Map< translations})PluralForm, String> > -
const
Properties
-
additionalParams
→ List<
PlaceholderParam> -
除 pivot 以外的其他类型化参数(提取自各 form 值)
final
-
allParams
→ List<
PlaceholderParam> -
所有参数:pivot 排第一,之后是 additionalParams
no setter
- description → String?
-
词条描述,来自 Excel description 列(注解行为 null)
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → String
-
finalinherited
- pivotParam → String
-
驱动复数变化的变量名(如 "count"),类型固定为 num
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
translations
→ Map<
String, Map< PluralForm, String> > -
language → (PluralForm → 模板字符串)
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toIcu(
String language) → String - 生成该语言的 ICU plural 字符串
-
toString(
) → String -
A string representation of this object.
inherited
-
valueFor(
String language) → String? -
获取指定语言的值,若该语言无翻译则 fallback 到首个非空语言
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited