numberString method

String numberString()

Digits only ("0" when null). "a1b2" → "12"

Implementation

String numberString() => (this ?? "0").replaceAll(RegExp("[^0-9]"), "");