londonappbrewery / Flash-Chat-Flutter-Complete

The completed code for the Flash Chat Project - The Complete Flutter Development Bootcamp
https://www.appbrewery.co/
92 stars 133 forks source link

bug: hitting send button when current textField is empty will send the last message #17

Open wq-yang opened 3 years ago

wq-yang commented 3 years ago

In the chat screen, after the user has sent a message, the textField became empty, which is right for now, but if the user hits the send button again, it will send the last message.

It is because the messageText is not set to empty string after last message is sent.

This problem can also be fixed by refactoring like this Pull Request do.

tusharSarwer commented 3 years ago

click here you will find the answer