EventListener

interfaceEventListener<T>


An interface for event listeners.

Summary

Public functions

Unit
onEvent(value: T?, error: FirebaseFirestoreException?)

onEvent will be called with the new value or the error if an error occurred.

Public functions

onEvent

fun onEvent(value: T?, error: FirebaseFirestoreException?): Unit

onEvent will be called with the new value or the error if an error occurred. It's guaranteed that exactly one of value or error will be non-null.

Parameters
value: T?

The value of the event.null if there was an error.

error: FirebaseFirestoreException?

The error if there was error.null otherwise.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-21 UTC.