17 lines
290 B
Dart
17 lines
290 B
Dart
class StringUtils {
|
|
|
|
static bool isEmpty(String? value) {
|
|
if(value == null || value == "") {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
static bool isNumber(String? value) {
|
|
if(isEmpty(value)) {
|
|
return false;
|
|
}
|
|
return RegExp(r'^\d+$').hasMatch(value!);
|
|
}
|
|
|
|
} |