Created
August 15, 2019 19:42
-
-
Save adityadroid/a7d62a1f0b83917ee590eb0fd41c6324 to your computer and use it in GitHub Desktop.
InputWidget.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:messio/config/Palette.dart'; | |
class InputWidget extends StatelessWidget { | |
final TextEditingController textEditingController = new TextEditingController(); | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
child: Row( | |
children: <Widget>[ | |
Material( | |
child: new Container( | |
margin: new EdgeInsets.symmetric(horizontal: 1.0), | |
child: new IconButton( | |
icon: new Icon(Icons.face), | |
color: Palette.primaryColor, | |
), | |
), | |
color: Colors.white, | |
), | |
// Text input | |
Flexible( | |
child: Container( | |
child: TextField( | |
style: TextStyle(color: Palette.primaryTextColor, fontSize: 15.0), | |
controller: textEditingController, | |
decoration: InputDecoration.collapsed( | |
hintText: 'Type a message', | |
hintStyle: TextStyle(color: Palette.greyColor), | |
), | |
), | |
), | |
), | |
// Send Message Button | |
Material( | |
child: new Container( | |
margin: new EdgeInsets.symmetric(horizontal: 8.0), | |
child: new IconButton( | |
icon: new Icon(Icons.send), | |
onPressed: () => {}, | |
color: Palette.primaryColor, | |
), | |
), | |
color: Colors.white, | |
), | |
], | |
), | |
width: double.infinity, | |
height: 50.0, | |
decoration: new BoxDecoration( | |
border: new Border( | |
top: new BorderSide(color: Palette.greyColor, width: 0.5)), | |
color: Colors.white), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment