DecimalCodec class final
Converts ordinary decimal numbers to and from display strings.
Constructors
Properties
- decimalSeparator → String
-
Separator used between integer and fraction digits.
final
-
decoder
→ Converter<
String, num> -
Converts display strings into numeric values.
no setterinherited
-
encoder
→ Converter<
num, String> -
Converts numeric values into display strings.
no setterinherited
- grouping → bool
-
Whether integer digits are grouped.
final
- groupSeparator → String
-
Separator inserted between grouped integer digits.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
inverted
→ Codec<
String, num> -
Inverts
this.no setterinherited - maxFractionDigits → int
-
Maximum number of fraction digits to keep.
final
- minFractionDigits → int
-
Minimum number of fraction digits to keep.
final
- rounding → Rounding
-
Rounding behavior for excess fraction digits.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trimTrailingZeros → bool
-
Whether trailing zeros can be removed down to minFractionDigits.
final
Methods
-
decode(
String encoded) → num -
Alias for parse.
inherited
-
encode(
num input) → String -
Alias for format.
inherited
-
format(
num value) → String -
Formats
valueinto a display string.override -
fuse<
R> (Codec< String, R> other) → Codec<num, R> -
Fuses
thiswithother.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
String input) → num -
Parses
inputand returns the numeric value.override -
toString(
) → String -
A string representation of this object.
inherited
-
tryParse(
String input) → num? -
Parses
input, returningnullinstead of throwing FormatException.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited