onlyDigits method

String onlyDigits()

Keeps only digit characters.

Implementation

String onlyDigits() => replaceAll(RegExp(r'[^0-9]'), '');