fix: Corrected giphy chip

This commit is contained in:
Deven Joshi
2020-10-19 12:15:47 +05:30
parent 77978eee12
commit bb346ea55e
+27 -23
View File
@@ -296,27 +296,29 @@ class MessageInputState extends State<MessageInput> {
borderRadius: BorderRadius.circular(32), borderRadius: BorderRadius.circular(32),
), ),
contentPadding: EdgeInsets.all(4), contentPadding: EdgeInsets.all(4),
prefix: _giphyEnabled ? Center( prefix: _giphyEnabled
child: Chip( ? Chip(
backgroundColor: StreamChatTheme.of(context).accentColor, backgroundColor: StreamChatTheme.of(context).accentColor,
label: Row( label: Text(
mainAxisSize: MainAxisSize.min, 'GIPHY',
children: [ style: TextStyle(color: Colors.white),
Icon(StreamIcons.lightning, color: Colors.white,), ),
SizedBox(width: 2,), avatar: Icon(
Text('GIPHY', style: TextStyle(color: Colors.white),), StreamIcons.lightning,
], color: Colors.white,
) ),
), )
) : null, : null,
suffixIcon: _giphyEnabled ? IconButton( suffixIcon: _giphyEnabled
icon: Icon(Icons.cancel_outlined), ? IconButton(
onPressed: () { icon: Icon(Icons.cancel_outlined),
setState(() { onPressed: () {
_giphyEnabled = false; setState(() {
}); _giphyEnabled = false;
}, });
) : null, },
)
: null,
), ),
textCapitalization: TextCapitalization.sentences, textCapitalization: TextCapitalization.sentences,
), ),
@@ -650,7 +652,8 @@ class MessageInputState extends State<MessageInput> {
return Center( return Center(
child: InkWell( child: InkWell(
child: Padding( child: Padding(
padding: const EdgeInsets.only(left: 4.0, right: 8.0, top: 8.0, bottom: 8.0), padding: const EdgeInsets.only(
left: 4.0, right: 8.0, top: 8.0, bottom: 8.0),
child: Icon(StreamIcons.lightning), child: Icon(StreamIcons.lightning),
), ),
onTap: () { onTap: () {
@@ -666,7 +669,8 @@ class MessageInputState extends State<MessageInput> {
return Center( return Center(
child: InkWell( child: InkWell(
child: Padding( child: Padding(
padding: const EdgeInsets.only(left: 8.0, right: 4.0, top: 8.0, bottom: 8.0), padding: const EdgeInsets.only(
left: 8.0, right: 4.0, top: 8.0, bottom: 8.0),
child: Icon(StreamIcons.attach), child: Icon(StreamIcons.attach),
), ),
onTap: () { onTap: () {