toString method
Returns a String representation of this
.
Implementation
@override
String toString() {
if (_rational.isInteger) return _rational.toString();
var value = toStringAsFixed(scale);
while (
value.contains('.') && (value.endsWith('0') || value.endsWith('.'))) {
value = value.substring(0, value.length - 1);
}
return value;
}