标签:cti span types type null string pes rip last
///枚举类型转string
String enumToString(o) => o.toString().split(‘.‘).last;
///string转枚举类型
T enumFromString<T>(Iterable<T> values, String value) {
return values.firstWhere((type) => type.toString().split(‘.‘).last == value,
orElse: () => null);
}
标签:cti span types type null string pes rip last
原文地址:https://www.cnblogs.com/sundaysme/p/12704532.html