INNER CODE UNIT · Dart

Checks

flutter-webrtc/dart-sip-ua · lib/src/config.dart:77

class Checks {
  Map<String, Null Function(Settings src, Settings? dst)> mandatory =
      <String, Null Function(Settings src, Settings? dst)>{
    'sockets': (Settings src, Settings? dst) {
      List<SIPUASocketInterface>? sockets = src.sockets;

      /* Allow defining sockets parameter as:
       *  Socket: socket
       *  List of Socket: [socket1, socket2]
       *  List of Objects: [{socket: socket1, weight:1}, {socket: Socket2, weight:0}]
       *  List of Objects and Socket: [{socket: socket1}, socket2]
       */
      List<SIPUASocketInterface> copy = <SIPUASocketInterface>[];
      if (sockets is List && sockets!.isNotEmpty) {
        for (SIPUASocketInterface socket in sockets) {
          copy.add(socket);
        }
      } else {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…