setCallNotificationAppearance static method
Configures how the incoming call notification looks.
Stored natively, so it also applies to calls raised from a data-only FCM payload while the app is dead. Call it once during startup.
smallIcon— drawable name for the status bar icon, e.g.'ic_notification'. A small icon is drawn from its alpha channel only, so this must be a monochrome notification icon, never the full colour launcher icon. When omitted the plugin looks foric_notification,ic_stat_notificationandic_stat_namein the host app before falling back to its own icon.accentColor—'#RRGGBB'or'#AARRGGBB', tints the icon and actions.colorized— paints the whole notification inaccentColor. Off by default: a light brand colour makes a colorized notification unreadable, so check it on a real device before turning it on.
Implementation
static Future<void> setCallNotificationAppearance({
String? smallIcon,
String? accentColor,
bool? colorized,
}) async {
try {
await _channel.invokeMethod('setCallNotificationAppearance', {
'smallIcon': smallIcon,
'accentColor': accentColor,
'colorized': colorized,
});
} on PlatformException catch (e) {
debugPrint("Error invoking setCallNotificationAppearance: ${e.message}");
} on MissingPluginException {
// Non-Android platform — nothing to configure.
}
}