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();
- ChatMessage message = new ChatMessage(
- text: text,
- animationController: new AnimationController( //new
- duration: new Duration(milliseconds: 700), //new
- vsync: this, //new
- ), //new
- ); //new
- setState(() {
- _messages.insert(0, message);
- });
- message.animationController.forward(); //new
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement