eventBoomerangCatcher

inline fun eventBoomerangCatcher(key: String, crossinline onEvent: () -> Unit): BoomerangCatcher(source)

Creates a BoomerangCatcher specifically for handling event notifications. This catcher checks if the Boomerang contains an event with the specified key and calls the provided callback when the event is caught.

This is useful when you only need to be notified that something happened, without needing to pass any additional data.

Return

A BoomerangCatcher that handles the specified event

Parameters

key

The event key to match against

onEvent

Callback function to execute when the event is caught