fix: Corrected giphy chip

This commit is contained in:
Deven Joshi
2020-10-19 12:15:47 +05:30
parent 77978eee12
commit bb346ea55e
+19 -15
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,),
Text('GIPHY', style: TextStyle(color: Colors.white),),
],
)
), ),
) : null, avatar: Icon(
suffixIcon: _giphyEnabled ? IconButton( StreamIcons.lightning,
color: Colors.white,
),
)
: null,
suffixIcon: _giphyEnabled
? IconButton(
icon: Icon(Icons.cancel_outlined), icon: Icon(Icons.cancel_outlined),
onPressed: () { onPressed: () {
setState(() { setState(() {
_giphyEnabled = false; _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: () {