admin
2021-11-25 70a344485bd0c9b68ac91f72ed23ec5bfa998b09
lib/utils/string_util.dart
@@ -1,9 +1,13 @@
class StringUtil {
  //是否为电话号码
  static bool isMobile(String str) {
    return RegExp(
            '^((13[0-9])|(15[^4])|(166)|(17[0-8])|(18[0-9])|(19[8-9])|(147,145))\\d{8}\$')
        .hasMatch(str);
  }
  static bool isNullOrEmpty(String? str) {
    return str==null|| str.isEmpty || str.trim().isEmpty;
  }
}