RCRTCRoom.fromJson constructor

RCRTCRoom.fromJson(
  1. Map<String, dynamic> jsonObj
)

Implementation

RCRTCRoom.fromJson(Map<String, dynamic> jsonObj)
    : _channel = MethodChannel('rong.flutter.rtclib/Room:${jsonObj['id']}'),
      id = jsonObj['id'],
      localUser = RCRTCLocalUser.fromJson(jsonObj['localUser']) {
  List<dynamic> jsonRemoteUserList = jsonObj['remoteUserList'];
  jsonRemoteUserList.forEach((user) {
    remoteUserList.add(RCRTCRemoteUser.fromJson(user));
  });
  _channel.setMethodCallHandler(methodCallHandler);
}