import 'dart:convert'; class StringUtils { /// 字符串转换为 json static String toJson(Object object) { return jsonEncode(object); } 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!); } }