notificationTapBackground static method
void
notificationTapBackground(
- NotificationResponse notificationResponse
Implementation
@pragma('vm:entry-point')
static void notificationTapBackground(
NotificationResponse notificationResponse) {
// ignore: avoid_print
print('notification(${notificationResponse.id}) action tapped: '
'${notificationResponse.actionId} with'
' payload: ${notificationResponse.payload}');
if (notificationResponse.input?.isNotEmpty ?? false) {
// ignore: avoid_print
print(
'notification action tapped with input: ${notificationResponse.input}');
}
final String? payload = notificationResponse.payload;
if (notificationResponse.payload != null) {
debugPrint('notification payload: $payload');
var jsonData = jsonDecode(payload!);
onPressed?.call(jsonData);
}
}