createOffer method
Implementation
@override
Future<RTCSessionDescription> createOffer(
[Map<String, dynamic>? constraints]) async {
try {
final response =
await WebRTC.invokeMethod('createOffer', <String, dynamic>{
'peerConnectionId': _peerConnectionId,
'constraints': constraints ?? defaultSdpConstraints
});
String sdp = response['sdp'];
String type = response['type'];
return RTCSessionDescription(sdp, type);
} on PlatformException catch (e) {
throw 'Unable to RTCPeerConnection::createOffer: ${e.message}';
}
}