Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Modify the _handleSubmittted method definition as follows.
- void _handleSubmitted(String text) {
- _textController.clear();
- setState(() { //new
- _isComposing = false; //new
- }); //new
- ChatMessage message = new ChatMessage(
- text: text,
- animationController: new AnimationController(
- duration: new Duration(milliseconds: 700),
- vsync: this,
- ),
- );
- setState(() {
- _messages.insert(0, message);
- });
- message.animationController.forward();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement