Skip to main content
Version: 5.5

Notifications

Mealz provides a notification service to make your UI more interactive for customers. Currently we handle two events :

  • Recipe added to cart
  • Recipe liked

We have added notifications like Toaster, so you can add this to listen:

// show toast to users on certain events
Mealz.Notifications.toaster.listen { notification ->
when (notification) {
is ToasterNotification.RecipeAdded -> {
println("Mealz.Notifications.recipesCount recipe add")
}
is ToasterNotification.RecipeLiked -> {
println("Mealz.Notifications.recipesCount recipe like")
}
}
println("Mealz.Notifications.recipesCount $")
}
info

By default, notifications are disabled. You must provide content for the events you wish to enable for this to work.