flutter_firebase_chat_core library

Classes

FirebaseChatCore
Provides access to Firebase chat data. Singleton, use FirebaseChatCore.instance to aceess methods.
FirebaseChatCoreConfig
Class that represents the chat config. Can be used for setting custom names for rooms and users collections. Call FirebaseChatCore.instance.setConfig before doing anything else with FirebaseChatCore.instance if you want to change the default collection names. When using custom names don't forget to update your security rules and indexes.

Extensions

RoleToShortString on Role
Extension with one toShortString method.
RoomTypeToShortString on RoomType
Extension with one toShortString method.

Functions

fetchUser(FirebaseFirestore instance, String userId, String usersCollectionName, {String? role}) Future<Map<String, dynamic>>
Fetches user from Firebase and returns a promise.
processRoomDocument(DocumentSnapshot<Map<String, dynamic>> doc, User firebaseUser, FirebaseFirestore instance, String usersCollectionName) Future<Room>
Returns a types.Room created from Firebase document.
processRoomsQuery(User firebaseUser, FirebaseFirestore instance, QuerySnapshot<Map<String, dynamic>> query, String usersCollectionName) Future<List<Room>>
Returns a list of types.Room created from Firebase query. If room has 2 participants, sets correct room name and image.