onDocumentCreatedWithAuthContext method

JSFunction onDocumentCreatedWithAuthContext(
  1. JSAny documentOrOpts,
  2. JSFunction handler
)

Event handler that triggers when a document is created in Firestore.

@param documentOrOpts - Options or a string document path. @param handler - Event handler which is run every time a Firestore create occurs.

Implementation

external JSFunction onDocumentCreatedWithAuthContext(
  JSAny documentOrOpts,
  // (FirestoreAuthEvent<QueryDocumentSnapshot> event) => FutureOr<void>
  JSFunction handler,
);