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