shouldDisplayAndroidPush function

bool shouldDisplayAndroidPush(
  1. Map<String, dynamic> data
)

Whether the payload should trigger a local Android notification display.

Implementation

bool shouldDisplayAndroidPush(Map<String, dynamic> data) {
  final title = data['title']?.toString().trim();
  final body = data['body']?.toString().trim();
  return (title != null && title.isNotEmpty) ||
      (body != null && body.isNotEmpty) ||
      OpenCDPPushPayload.parseImageUrl(data) != null ||
      OpenCDPPushPayload.parseActions(data).isNotEmpty;
}