Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. // Modify the _handleSubmittted method definition as follows.
  2.  
  3. void _handleSubmitted(String text) {
  4. _textController.clear();
  5. setState(() { //new
  6. _isComposing = false; //new
  7. }); //new
  8. ChatMessage message = new ChatMessage(
  9. text: text,
  10. animationController: new AnimationController(
  11. duration: new Duration(milliseconds: 700),
  12. vsync: this,
  13. ),
  14. );
  15. setState(() {
  16. _messages.insert(0, message);
  17. });
  18. message.animationController.forward();
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement