getCleanedNumber static method

String getCleanedNumber(
  1. String text
)

Implementation

static String getCleanedNumber(String text) {
  RegExp regExp = new RegExp(r"[^0-9]");
  return text.replaceAll(regExp, '');
}