withRegex static method
Implementation
static NumberInputFormatter? withRegex(String regexString) {
try {
final regex = RegExp(regexString);
return NumberInputFormatter._(regex);
} catch (e) {
// Something not right with regex string.
assert(false, e.toString());
}
return null;
}