fix: textfield height issues solved

This commit is contained in:
Deven Joshi
2020-10-29 15:40:30 +05:30
parent d9d0bba999
commit dbb4b37161
+23 -22
View File
@@ -282,26 +282,25 @@ class MessageInputState extends State<MessageInput> {
Expanded _buildTextInput(BuildContext context) { Expanded _buildTextInput(BuildContext context) {
return Expanded( return Expanded(
child: Center( child: Center(
child: LimitedBox( child: Container(
maxHeight: widget.maxHeight, clipBehavior: Clip.antiAlias,
child: Container( decoration: BoxDecoration(
clipBehavior: Clip.antiAlias, borderRadius: BorderRadius.circular(32.0),
decoration: BoxDecoration( border: Border.all(
borderRadius: BorderRadius.circular(32.0), color: Colors.grey,
border: Border.all(
color: Colors.grey,
),
), ),
child: Column( ),
mainAxisSize: MainAxisSize.min, child: Column(
children: [ mainAxisSize: MainAxisSize.min,
_buildAttachments(), children: [
TextField( _buildAttachments(),
LimitedBox(
maxHeight: widget.maxHeight,
child: TextField(
key: Key('messageInputText'), key: Key('messageInputText'),
enabled: _inputEnabled, enabled: _inputEnabled,
minLines: null, minLines: null,
maxLines: null, maxLines: null,
expands: true,
onSubmitted: (_) { onSubmitted: (_) {
sendMessage(); sendMessage();
}, },
@@ -412,8 +411,8 @@ class MessageInputState extends State<MessageInput> {
), ),
textCapitalization: TextCapitalization.sentences, textCapitalization: TextCapitalization.sentences,
), ),
], )
), ],
), ),
), ),
), ),
@@ -514,11 +513,13 @@ class MessageInputState extends State<MessageInput> {
...commands ...commands
.map( .map(
(c) => ListTile( (c) => ListTile(
leading: c.name == 'giphy' ? CircleAvatar( leading: c.name == 'giphy'
backgroundColor: Colors.black, ? CircleAvatar(
child: Image.asset('images/giphy_icon.png'), backgroundColor: Colors.black,
maxRadius: 12.0, child: Image.asset('images/giphy_icon.png'),
) : null, maxRadius: 12.0,
)
: null,
title: Text.rich( title: Text.rich(
TextSpan( TextSpan(
text: '${c.name.capitalize()}', text: '${c.name.capitalize()}',