digitsOnly property

String get digitsOnly

Extract only digits (handy for phone numbers)

Implementation

String get digitsOnly => replaceAll(RegExp(r'\D'), '');