firestoreService function

  1. @riverpod
FirestoreService firestoreService(
  1. dynamic ref
)

A provider for the FirestoreService class.

This provider is used to provide the FirestoreService class to the rest of the application. It is used to interact with Firebase Firestore.

Usage:

ref.read(firestoreServiceProvider).getPosts();

Implementation

@riverpod
FirestoreService firestoreService(FirestoreServiceRef ref) {
  final firestoreInstance = ref.read(firestoreInstanceProvider);
  return FirestoreService(firestoreInstance);
}