FluentNumber class
A numeric value plus its formatting options.
Auto-coerced from any host-language num (or its subtypes int /
double). Numeric variant keys ([1], [42]) match by numeric
equality; identifier keys ([one], [other]) match by CLDR plural
category, supplied by the bundle's backend. Use IntlBackend from
package:fluent_intl (or IcuBackend from package:fluent_icu) for
real CLDR matching.
- Inheritance
-
- Object
- FluentValue
- FluentNumber
- Annotations
-
- @immutable
Constructors
- FluentNumber(num value, [FluentNumberOptions options = const FluentNumberOptions()])
-
Wraps
valuewith its formattingoptions.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- options → FluentNumberOptions
-
The NUMBER options carried by this value.
final
- rawString → String
-
Locale-blind string form. Used for diagnostics and as a fallback;
real rendering routes through the bundle's number formatter.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → num
-
The number to format and plural-select on.
final
Methods
-
format(
FluentFormatContext context) → String -
Render this value to its final string under
context.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveDigits(
) → ({String digits, int fractionDigits}) - Resolve this value against its digit options into an exact decimal digit string plus the count of visible fraction digits.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited