createOffer method

Future<RTCSessionDescription?> createOffer()

Implementation

Future<RTCSessionDescription?> createOffer() async {
  try {
    final RTCSessionDescription sdp =
        await rtcPeerConnection!.createOffer(offerSdpConstraints);
    await rtcPeerConnection!.setLocalDescription(sdp);
    return sdp;
  } catch (error) {
    print(error);
  }
  return null;
}