1
2
3
4
5
6
7
8
9
10
11
12
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;
| }
|
| }
|
|