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
showCall( BuildContext context) {
var incomingCall; // the call received somewhere
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) async {
Navigator.of(context).push(MaterialPageRoute(builder: (context) {
return (Settings());
}));
}
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