keepDigitsOnly static method
Extracts only digit characters from input string
Removes all non-digit characters and whitespace. Used to convert formatted text back to digits-only for editing.
Example: "10:30 z" → "1030"
input - Input string that may contain non-digits
Returns string containing only digits
Implementation
static String keepDigitsOnly(String input) =>
_removeNonDigits(input).removeWhiteSpaces;