connectycube-flutter-call-kit
connectycube-flutter-call-kit copied to clipboard
Error with connectycube_flutter_callkit
in the main method i initilized connectycube as below
Future<void> main() async { var widgetsBinding = WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, ); ConnectycubeFlutterCallKit.instance.updateConfig( ringtone: 'custom_ringtone', icon: 'app_icon', notificationIcon: 'ic_notification', color: '#07711e');}
and to show the incoming call i used this method
void showCall( BuildContext context) {var incomingCall; CallEvent callEvent = CallEvent(sessionId: "1",callType: incomingCall.callType,callerId: incomingCall.callerId, callerName: 'Caller Name',opponentsIds: incomingCall.opponentsIds,userInfo: {'customParameter1': 'value1'});ConnectycubeFlutterCallKit.showCallNotification(callEvent);Future<void> _onCallAccepted(CallEvent callEvent) { Navigator.of(context).push(MaterialPageRoute(builder: (context) { return (Settings()); }));} Future<void> _onCallRejected(CallEvent callEvent) async { // the call was rejected } ConnectycubeFlutterCallKit.instance.init( onCallAccepted: _onCallAccepted, onCallRejected: _onCallRejected, ); }
but it produces me an error i've been seaching all this week about this issue but i didnt found any good documentation nor a video so if anyone had the same issue and solved please share the solution with us