From 77978eee1249dbddd53762944fc39d5feb3a0eec Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Mon, 19 Oct 2020 12:07:07 +0530 Subject: [PATCH] fix: Corrected padding and giphy chip --- lib/src/message_input.dart | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/lib/src/message_input.dart b/lib/src/message_input.dart index c7548b37..a2fda653 100644 --- a/lib/src/message_input.dart +++ b/lib/src/message_input.dart @@ -288,6 +288,7 @@ class MessageInputState extends State { }, style: Theme.of(context).textTheme.bodyText2, autofocus: false, + textAlignVertical: TextAlignVertical.center, decoration: InputDecoration( hintText: 'Write a message', prefixText: _giphyEnabled ? null : ' ', @@ -295,16 +296,18 @@ class MessageInputState extends State { borderRadius: BorderRadius.circular(32), ), contentPadding: EdgeInsets.all(4), - prefix: _giphyEnabled ? 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),), - ], - ) + 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), @@ -647,7 +650,7 @@ class MessageInputState extends State { 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: 4.0, right: 8.0, top: 8.0, bottom: 8.0), child: Icon(StreamIcons.lightning), ), onTap: () { @@ -663,7 +666,7 @@ class MessageInputState extends State { 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: 8.0, right: 4.0, top: 8.0, bottom: 8.0), child: Icon(StreamIcons.attach), ), onTap: () {