flutter_firebase_chat_core library Null safety

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
Extension with one toShortString method
RoomTypeToShortString
Extension with one toShortString method

Functions

fetchUser(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, String usersCollectionName) Future<Room>
Returns a types.Room created from Firebase document
processRoomsQuery(User firebaseUser, 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.