init method
void
init({
- CallEventHandler? onCallAccepted,
- CallEventHandler? onCallRejected,
- CallEventHandler? onCallIncoming,
- String? ringtone,
- String? icon,
- @Deprecated('Use `AndroidManifest.xml` meta-data instead') String? notificationIcon,
- String? color,
Initialize the plugin and provided user callbacks.
- This function should only be called once at the beginning of your application.
Implementation
void init(
{CallEventHandler? onCallAccepted,
CallEventHandler? onCallRejected,
CallEventHandler? onCallIncoming,
String? ringtone,
String? icon,
@Deprecated('Use `AndroidManifest.xml` meta-data instead')
String? notificationIcon,
String? color}) {
_onCallAccepted = onCallAccepted;
_onCallRejected = onCallRejected;
_onCallIncoming = onCallIncoming;
updateConfig(
ringtone: ringtone,
icon: icon,
notificationIcon: notificationIcon,
color: color);
initEventsHandler();
}