Skip to content

Commit e19324f

Browse files
committed
🔥 chore(.gitignore): add .firebase/hosting.YnVpbGRcd2Vi.cache to ignore list
🎨 style(README.md): update README with project description and screenshot 🔧 chore(firebase.json): add firebase hosting configuration for chat-app-ws site 🐛 fix(chat_page.dart): remove condition to check if message is from other user to fix bug where messages are not received 🎨 style(contacts_page.dart): use const for Icon widget in FloatingActionButton widget
1 parent 4fb020e commit e19324f

File tree

6 files changed

+26
-5
lines changed

6 files changed

+26
-5
lines changed

.firebaserc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"default": "jam-8-apps"
4+
}
5+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ app.*.map.json
4242
/android/app/debug
4343
/android/app/profile
4444
/android/app/release
45+
.firebase/hosting.YnVpbGRcd2Vi.cache

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# app_chat
22

3-
A new Flutter project.
3+
Chat App with WebSocket Backend
4+
5+
![Flutter Chat App UI and websocket](https://imgur.com/TVqui84.png)
46

57
## Getting Started
68

firebase.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"hosting": {
3+
"public": "build/web",
4+
"site": "chat-app-ws",
5+
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
6+
"rewrites": [
7+
{
8+
"source": "**",
9+
"destination": "/index.html"
10+
}
11+
]
12+
}
13+
}

lib/screens/chat_page.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ class _ChatPageState extends State<ChatPage> {
4343
String msg = data['msg'];
4444
String timestamp = data['timestamp'];
4545

46-
if (id == otherUser.id) {
47-
onMessageReceived(msg);
48-
}
46+
// if (id == otherUser.id) {
47+
onMessageReceived(msg);
48+
// }
4949
});
5050
}
5151

lib/screens/contacts_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class _ContactsPageState extends State<ContactsPage> {
8080
);
8181
},
8282
label: const Text('Send a message'),
83-
icon: Icon(Icons.message_outlined),
83+
icon: const Icon(Icons.message_outlined),
8484
),
8585
);
8686
}

0 commit comments

Comments
 (0)