getNumericOnly method

String getNumericOnly({
  1. bool aFirstWordOnly = false,
})

Returns only numeric characters from the string.

Implementation

String getNumericOnly({bool aFirstWordOnly = false}) {
  return validate().replaceAll(RegExp(r'[^0-9]'), '');
}