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),
),
contentPadding: EdgeInsets.all(4),
prefix: _giphyEnabled ? Center(
child: Chip(
backgroundColor: StreamChatTheme.of(context).accentColor,
label: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(StreamIcons.lightning, color: Colors.white,),
SizedBox(width: 2,),
Text('GIPHY', style: TextStyle(color: Colors.white),),
],
)
),
) : null,
suffixIcon: _giphyEnabled ? IconButton(
icon: Icon(Icons.cancel_outlined),
onPressed: () {
setState(() {
_giphyEnabled = false;
});
},
) : null,
prefix: _giphyEnabled
? Chip(
backgroundColor: StreamChatTheme.of(context).accentColor,
label: Text(
'GIPHY',
style: TextStyle(color: Colors.white),
),
avatar: Icon(
StreamIcons.lightning,
color: Colors.white,
),
)
: null,
suffixIcon: _giphyEnabled
? IconButton(
icon: Icon(Icons.cancel_outlined),
onPressed: () {
setState(() {
_giphyEnabled = false;
});
},
)
: null,
),
textCapitalization: TextCapitalization.sentences,
),
@@ -650,7 +652,8 @@ class MessageInputState extends State<MessageInput> {
return Center(
child: InkWell(
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),
),
onTap: () {
@@ -666,7 +669,8 @@ class MessageInputState extends State<MessageInput> {
return Center(
child: InkWell(
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),
),
onTap: () {