ZEGOCLOUD / zego_uikit_prebuilt_call_flutter

MIT License
17 stars 18 forks source link

Cannot invoke a non-'const' #40

Closed saemappdevs closed 7 months ago

saemappdevs commented 7 months ago

When I try to update the package from zego_uikit_prebuilt_call: ^3.3.16 to ^4.7.3 zego_uikit_signaling_plugin: ^2.1.5 to ^2.5.5

I'm getting these errors when I try to run

/C:/Users/AppDevs/AppData/Local/Pub/Cache/hosted/pub.dev/zego_uikit_prebuilt_call-4.8.4/lib/src/invitation/notification/notification_ring.dart:39:12: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. iOS: AudioContextIOS( ^^^^^^^^^^^^^^^ /C:/Users/AppDevs/AppData/Local/Pub/Cache/hosted/pub.dev/zego_uikit_prebuilt_call-4.8.4/lib/src/invitation/notification/notification_ring.dart:38:26: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. const audioContext = AudioContext( ^^^^^^^^^^^^ Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

BUILD FAILED in 22s Error: Gradle task assembleDebug failed with exit code 1

Would you please look into this and suggest me the possible solution

yoer commented 7 months ago

What version of your local audioplayers is (in the $projectRoot/pubspec.lock file)?

yoer commented 7 months ago

have you test flutter pub upgrade?

saemappdevs commented 7 months ago

after changing the dependency of audioplayers: ^5.2.0 the project successfully run. Thank you.