FormatLocale class

Locale formats define how a value ​​should be formatted in a locale-specific way.

Constructors

FormatLocale({String? decimal, String? thousands, List<int>? grouping, List<String>? currency, List<String>? numerals, String? percent, String? minus, String? nan})
Constructs a locale object for the specified definition with format and formatPrefix methods.
FormatLocale.fromJson(Map<String, dynamic> definition)
Equivalent to FormatLocale.new, but it accepts a JSON definition object instead of individual arguments.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

format(String specifier) String Function(Object?)
Returns a new format function for the given string specifier. The returned function takes a number as the only argument, and returns a string representing the formatted number.
formatPrefix(String specifier, num value) String Function(num)
Equivalent to format, except the returned function will convert values to the units of the appropriate SI prefix for the specified numeric reference value before formatting in fixed point notation.
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