digitRegStr top-level property
A regular expression pattern that matches strings containing only digits.
This pattern ensures the string contains one or more digits (0-9) and nothing else.
Implementation
String digitRegStr = r'^[0-9]+$';
A regular expression pattern that matches strings containing only digits.
This pattern ensures the string contains one or more digits (0-9) and nothing else.
String digitRegStr = r'^[0-9]+$';