INNER CODE UNIT · Dart
getName
flutter-webrtc/dart-sip-ua · lib/src/constants.dart:114
static String getName(SipMethod? method) {
int period = method.toString().indexOf('.');
return method.toString().substring(period + 1);
}
static SipMethod? fromString(String? name) {
if (name != null) {
String cleanName = name.toUpperCase();
for (SipMethod method in SipMethod.values) {
if (getName(method) == cleanName) {
return method;
}
}
return null;
}
return null;
}
}