ImageRepository

class ImageRepository(db: FirebaseFirestore = Firebase.firestore)

Handles the data in the Firestore database for the Image class.

Parameters

db

The Firestore database instance.

Constructors

Link copied to clipboard
constructor(db: FirebaseFirestore = Firebase.firestore)

Properties

Link copied to clipboard

Cached images synchronized with Firestore.

Functions

Link copied to clipboard
fun addImage(image: Image)

Adds a new image to the Firestore database.

Link copied to clipboard
fun deleteImage(image: Image)

Deletes an image from the Firestore database.

Link copied to clipboard
fun updateImage(updatedImage: Image)

Overwrites an existing image in the Firestore database with updated data.