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