- class RegCheckUtils {
- static bool isLocalImagePath(String path) {
- return RegExp(r'^/.+').hasMatch(path);
- }
- static bool isNetworkImagePath(String path) {
- return RegExp(r'^(http|https)://.+').hasMatch(path);
- }
- static bool isAssetPath(String path) {
- return RegExp(r'^[a-zA-Z0-9]+://').hasMatch(path);
- }
- }
|