removeLastDigit method
Removes the last entered digit and returns the formatted output.
Implementation
String removeLastDigit() {
if (_digits.isNotEmpty) {
final digits = _digits.toString();
_digits
..clear()
..write(digits.substring(0, digits.length - 1));
} else {
_hasLeadingPlus = false;
}
return currentOutput;
}