core/firebase/src/util library

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.