pda_template/lib/core/utils/extensions/stringUtils.dart

21 lines
359 B
Dart
Raw Permalink Normal View History

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;
}
try {
double num = double.parse(value!);
return true;
} catch (e) {
return false;
}
}
}