toDeltaString method

String toDeltaString({
  1. bool useAscii = false,
})

The delta string representation of this num (showing always the positive sign).

Example:

1.1.toDeltaString() == '+1.1'
0.toDeltaString() == '+0'
(-5).toDeltaString() == '-5'

Implementation

String toDeltaString({bool useAscii = false}) => isNegative
    ? (useAscii ? '$this' : toNegativeUnicode())
    : '$plusSign$this';