Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Add the following code to main.dart.
- import 'package:flutter/cupertino.dart'; //new
- // Modify the _buildTextComposer method.
- new Container(
- margin: new EdgeInsets.symmetric(horizontal: 4.0),
- child: Theme.of(context).platform == TargetPlatform.iOS ? //modified
- new CupertinoButton( //new
- child: new Text("Send"), //new
- onPressed: _isComposing //new
- ? () => _handleSubmitted(_textController.text) //new
- : null,) : //new
- new IconButton( //modified
- icon: new Icon(Icons.send),
- onPressed: _isComposing ?
- () => _handleSubmitted(_textController.text) : null,
- )
- ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement