shouldShowTrayNotification property
bool
get
shouldShowTrayNotification
Whether this push should appear in the system tray (vs in-app only).
Implementation
bool get shouldShowTrayNotification {
if (!hasDisplayableContent) {
return false;
}
final normalizedType = (type ?? 'notification').toLowerCase();
const inAppOnlyTypes = <String>{
'roadblock',
'roadblock-image',
'banner',
'pip',
'tooltip',
'in_app',
'in-app',
};
for (final inAppType in inAppOnlyTypes) {
if (normalizedType.contains(inAppType)) {
return false;
}
}
return normalizedType.isEmpty ||
normalizedType == 'notification' ||
normalizedType == 'default' ||
normalizedType == 'push';
}