format method

String format(
  1. String value
)

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;
}