toNegativeUnicode method

String toNegativeUnicode([
  1. int? fractionDigits
])

The negative Unicode representation of this num.

-0.0 is treated the same as 0.0 (so, considered positive).

Example:

1.1.toNegativeUnicode() == '1.1'
0.toNegativeUnicode() == '0'
(-5).toNegativeUnicode() == '−5'
(-10.27).toNegativeUnicode(1) == '−10.3'

Implementation

String toNegativeUnicode([int? fractionDigits]) => this < 0
    ? '$minusSign${_formatted(fractionDigits)}'
    : _formatted(fractionDigits);