Performing hot reload...
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/agora_uikit-1.1.0/lib/controllers/rtc_event_handlers.dart:140:6: Error: No named parameter
with the name 'onMediaDeviceChanged'.
}, onMediaDeviceChanged: (deviceType) {
^^^^^^^^^^^^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-6.1.0/lib/src/agora_rtc_engine.dart:1537:9: Context: Found this candidate,
but the arguments don't match.
const RtcEngineEventHandler({
^^^^^^^^^^^^^^^^^^^^^
Try again after fixing the above error(s).
Performing hot reload...
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/agora_uikit-1.1.0/lib/controllers/rtc_event_handlers.dart:140:6: Error: No named parameter
with the name 'onMediaDeviceChanged'.
}, onMediaDeviceChanged: (deviceType) {
^^^^^^^^^^^^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-6.1.0/lib/src/agora_rtc_engine.dart:1537:9: Context: Found this candidate,
but the arguments don't match.
const RtcEngineEventHandler({
^^^^^^^^^^^^^^^^^^^^^
Try again after fixing the above error(s).
Application finished.
I am creating a video calling function in my flutter app using agora. It’s supposed to generate automatic tokens for every call.
I created a backend server with Node.js
But when I tried to run my application, I get an error about ‘onMediaDeviceChanged’. I can’t quite figure it out. Please help.
3
Answers
Agora is the crappiest library I have ever came across with. Same issue.
if you are use agora_uikit package and you got these issues; you can try to remove agora_uikit package and get agora_rtc_engine. In my case fixed it. Good Luck.
It looks like latest version of agora_uikit which is
1.1.0
is having issues with flutter latest sdk version3.3.10
. Try downgrading your agora_uikit dependency, if you are using version 1.1.0, try downgrade toagora_uikit: ^1.0.2
and also addpermission_handler: ^9.2.0
in yourpubspec.yml
file and then runflutter pub get
.