format method
Method for formatting value. You can use initialValue with this method.
Implementation
String format(String value) {
final isNegative = value.startsWith('-');
final newText = value.replaceAll(RegExp('[^0-9]'), '');
_formatter(newText, isNegative);
return _newString;
}