Skip to content

Unconditional Delivery Listeners

The where clause argument in the addCreateListener method is optional. When it is not provided, the real-time database will deliver any new object created in the database's table:

EventHandler<Map> orderEventHandler = Backendless.data.of("Order").rt();

orderEventHandler.addCreateListener((createdOrder) {
  print("New Order object has been created. Object ID - ${createdOrder['objectId']}");
});
EventHandler<Order> orderEventHandler = Backendless.data.withClass<Order>().rt();

orderEventHandler.addCreateListener((createdOrder) {
  print("New Order object has been created. Object ID - ${createdOrder.objectId}");
});