Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse(description.sdp) shows error on sdp_transform: ^0.3.0 #8

Open
cottheta opened this issue Jun 5, 2021 · 1 comment
Open

parse(description.sdp) shows error on sdp_transform: ^0.3.0 #8

cottheta opened this issue Jun 5, 2021 · 1 comment

Comments

@cottheta
Copy link

cottheta commented Jun 5, 2021

Error: The argument type 'String?' can't be assigned to the parameter type 'String' because 'String?' is nullable and 'String' isn't.
var session = parse(description.sdp);

it shows error on sdp_transform: ^0.3.0

@cottheta cottheta changed the title parse(description.sdp) shows error - sdp_transform: ^0.3.0 parse(description.sdp) shows error on sdp_transform: ^0.3.0 Jun 5, 2021
@ShahanAhmedDev
Copy link

You have to add null safety to the code.
Like this:
void _createOffer () async{
RTCSessionDescription description = await _peerConnection.createOffer({'offerToReceiveVideo': 1});
var session = parse(description.sdp!);
print(json.encode(session));
_offer = true;

_peerConnection.setLocalDescription(description);

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants