removeZero method
Removes trailing zeros from a double's string representation.
Implementation
String removeZero() {
RegExp regex = RegExp(r'([.]*0)(?!.*\d)');
String s = toString().replaceAll(regex, '');
return s;
}
Removes trailing zeros from a double's string representation.
String removeZero() {
RegExp regex = RegExp(r'([.]*0)(?!.*\d)');
String s = toString().replaceAll(regex, '');
return s;
}