number method
The digits as an int (0 when null). "Order #42" → 42
Implementation
int number() => (this ?? "0").replaceAll(RegExp("[^0-9]"), "").toInt();
The digits as an int (0 when null). "Order #42" → 42
int number() => (this ?? "0").replaceAll(RegExp("[^0-9]"), "").toInt();