showNotification method

Future<bool> showNotification({
  1. required int id,
  2. String? title,
  3. String? body,
  4. required String channelId,
  5. required String channelName,
  6. String? payload,
  7. String? largeIcon,
  8. String? bigPicture,
  9. String? smallIcon,
  10. String? visibility,
  11. String? accentColor,
  12. List<Map<String, String?>>? buttons,
})

Post a notification from native code (used to render foreground pushes on Android, since FCM does not draw one while the app is open). Returns true if it was shown. No-op / false where unsupported. payload is stashed on the tap intent and delivered back via onNotificationTap.

Implementation

Future<bool> showNotification({
  required int id,
  String? title,
  String? body,
  required String channelId,
  required String channelName,
  String? payload,
  String? largeIcon,
  String? bigPicture,
  String? smallIcon,
  String? visibility,
  String? accentColor,
  List<Map<String, String?>>? buttons,
}) async => false;