setNotificationIcon method

Future<void> setNotificationIcon(
  1. String icon
)

By default, PointSDK uses ic_stat_name icon in res/drawable resources for GeoTriggering and Tempo services foreground notification icons.

Use this method to assign a custom notification icon for Android foreground notification. If icon is null or doesn't exist in android's res/drawable or res/mipmap, the default one ic_stat_name will be used. If also not available, then app launcher icon is used.

IMPORTANT:

Flutter defaults shrinkResources to true for release builds, and the icon may be deleted from release builds if it's not referenced directly from code at build time. Follow Android's documentation keep-resources to specify which resources to keep.

Implementation

Future<void> setNotificationIcon(String icon) {
  return BluedotPointSdkPlatform.instance.setNotificationIcon(icon);
}