Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. // Add the following code to main.dart.
  2.  
  3. import 'package:flutter/cupertino.dart'; //new
  4.  
  5. // Modify the _buildTextComposer method.
  6.  
  7. new Container(
  8. margin: new EdgeInsets.symmetric(horizontal: 4.0),
  9. child: Theme.of(context).platform == TargetPlatform.iOS ? //modified
  10. new CupertinoButton( //new
  11. child: new Text("Send"), //new
  12. onPressed: _isComposing //new
  13. ? () => _handleSubmitted(_textController.text) //new
  14. : null,) : //new
  15. new IconButton( //modified
  16. icon: new Icon(Icons.send),
  17. onPressed: _isComposing ?
  18. () => _handleSubmitted(_textController.text) : null,
  19. )
  20. ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement