Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @override
- Widget build(BuildContext context) {
- return WillPopScope(
- child: Container(
- child: Row(
- mainAxisAlignment: MainAxisAlignment.end,
- children: <Widget>[
- isWIllPop
- ? Material(
- child: new Container(
- margin: new EdgeInsets.symmetric(horizontal: 1.0),
- child: FadeInImage.assetNetwork(
- placeholder: 'animation/loading.gif',
- image: 'BASE_URL/pictureUrl',
- width: 50,
- height: 200,
- ),
- ),
- color: Colors.white,
- )
- : Material(
- child: new Container(
- margin: new EdgeInsets.symmetric(horizontal: 1.0),
- child: FadeInImage.assetNetwork(
- placeholder: 'animation/loading.gif',
- image: 'BASE_URL/pictureUrl',
- width: 50,
- height: 50,
- ),
- ),
- color: Colors.white,
- ),
- Material(
- child: new Container(
- margin: new EdgeInsets.symmetric(horizontal: 1.0),
- child: new IconButton(
- icon: new Icon(Icons.add_circle),
- onPressed: () {},
- ),
- ),
- color: Colors.white,
- ),
- // Edit text
- Flexible(
- child: Container(
- child: TextField(
- style: TextStyle(color: Colors.blue, fontSize: 15.0),
- decoration: InputDecoration.collapsed(
- hintText: 'Type your message...',
- hintStyle: TextStyle(color: Colors.green),
- ),
- ),
- ),
- ),
- // Button send message
- Material(
- child: new Container(
- margin: new EdgeInsets.symmetric(horizontal: 8.0),
- child: new IconButton(
- icon: new Icon(Icons.send),
- onPressed: () {},
- color: Colors.blue,
- ),
- ),
- color: Colors.white,
- ),
- ],
- ),
- width: double.infinity,
- height: 50.0,
- decoration: new BoxDecoration(
- border: new Border(
- top: new BorderSide(color: Colors.green, width: 0.5)),
- color: Colors.white),
- ),
- onWillPop: onBackPress,
- );
- }
- Future<bool> onBackPress() {
- setState(() {
- isWIllPop = true;
- });
- return Future.value(true);
- }
Advertisement
Add Comment
Please, Sign In to add comment