onlyDigits method

String onlyDigits()

Returns only the numeric digits from this string.

Implementation

String onlyDigits() =>
    this == null ? '' : this!.replaceAll(RegExp(r'[^0-9]'), '');