INNER CODE UNIT · Dart

SipMethodHelper

flutter-webrtc/dart-sip-ua · lib/src/constants.dart:113

class SipMethodHelper {
  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;
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…