updateConfig method
Future<void>
updateConfig({
- String? ringtone,
- String? icon,
- @Deprecated('Use `AndroidManifest.xml` meta-data instead') String? notificationIcon,
- String? color,
Sets the additional configs for the Call notification
ringtone
- the name of the ringtone source (for Anfroid it should be placed by path 'res/raw', for iOS it is a name of ringtone)
icon
- the name of image in the drawable
folder for Android and the name of Assests set for iOS
notificationIcon
- the name of the image in the drawable
folder, uses as Notification Small Icon for Android, ignored for iOS
color
- the color in the format '#RRGGBB', uses as an Android Notification accent color, ignored for iOS
Implementation
Future<void> updateConfig(
{String? ringtone,
String? icon,
@Deprecated('Use `AndroidManifest.xml` meta-data instead')
String? notificationIcon,
String? color}) {
if (!Platform.isAndroid && !Platform.isIOS) return Future.value();
return _methodChannel.invokeMethod('updateConfig', {
'ringtone': ringtone,
'icon': icon,
'notification_icon': notificationIcon,
'color': color,
});
}