createAnswer method
This method is used to create webrtc answer, sets local description on internal PeerConnection object It supports both style of answer creation that is plan-b and unified.
Implementation
Future<RTCSessionDescription> createAnswer() async {
try {
RTCSessionDescription answer = await webRTCHandle!.peerConnection!.createAnswer();
await webRTCHandle!.peerConnection!.setLocalDescription(answer);
return answer;
} catch (e) {
// handling kstable exception most ugly way but currently there's no other workaround, it just works
RTCSessionDescription answer = await webRTCHandle!.peerConnection!.createAnswer();
await webRTCHandle!.peerConnection!.setLocalDescription(answer);
return answer;
}
}