ZEGOCLOUD / zego_uikit_prebuilt_call_flutter

MIT License
17 stars 17 forks source link

On call someone - 'package:zego_uikit_prebuilt_call/src/invitation/internal/internal_instance.dart': Failed assertion: line 21 pos 12: '_pageManager != null': pageManager is null, please call ZegoUIKitPrebuiltCallInvitationService().init(...) when user login #73

Closed jitendravn closed 1 month ago

jitendravn commented 1 month ago

'package:zego_uikit_prebuilt_call/src/invitation/internal/internal_instance.dart': Failed assertion: line 21 pos 12: '_pageManager != null': pageManager is null, please call ZegoUIKitPrebuiltCallInvitationService().init(...) when user login

yoer commented 1 month ago

please call ZegoUIKitPrebuiltCallInvitationService().init(...) when user login

jitendravn commented 1 month ago

@yoer I already called this when user logged in Look at the code

void onUserLogin({User? user}) { print('on user login called'); ZegoUIKitPrebuiltCallInvitationService().init( appID: int.parse(getEnv('ZEGO_APP_ID')) /input your AppID/, appSign: getEnv('ZEGO_APP_SIGN') /input your AppSign/, ... ... }

yoer commented 1 month ago

_pageManager has valued in ZegoUIKitPrebuiltCallInvitationService().init.

you can add breakpoint on package:zego_uikit_prebuilt_call/src/invitation/internal/internal_instance.dart line 21

yoer commented 1 month ago

if you use zim_kit package with prebuilt_call package, please make sure call ZegoUIKitPrebuiltCallInvitationService().init before ZIMKit().connectUser