Chat Page - lawsonpeters12/Tech-Connect GitHub Wiki
Table of Contents
Overview
The ChatPage consists of an appBar, a StreamBuilder, and a TextField. The appBar consists of a menu icon that allows the user to choose what Chat Topic they want to chat in, as well as the title of the current chat. The StreamBuilder displays texts and images that that are stored in the Firestore messages collection in reverse chronological order. Firestore stores the content of every message, the user who sent it, the timestamp it was sent, Chat Topic it was sent in, and whether it is is an image or text. The TextField allows users to type and send messages. There is also a camera button, which allows to user to send messages. The popup allows the user to take a picture or choose from gallery.
Sending Images
Tech Connect supports sending images in chat. The images are stored as a URL on Firestore with the tag "image". To send an image, a user can click on the Camera icon at the bottom right, which allows them to send a picture from their gallery.
Chat Topics
There are multiple Chat Topics that users can send messages in. Messages sent in a certain chat topic will only appear there. To select a topic, the user can click on the Menu icon at the top left, and choose a topic from the popup.
User Guide
To send messages, type in the bottom TextField, then press Enter or press the icon next to the TextField. To send an image, click on the Camera icon, then select an image from your gallery. To Change chat topics, select the Menu icon at the left of the appBar, and choose your topic.