fix: textfield height issues solved

This commit is contained in:
Deven Joshi
2020-10-29 15:40:30 +05:30
parent d9d0bba999
commit dbb4b37161
+8 -7
View File
@@ -282,8 +282,6 @@ class MessageInputState extends State<MessageInput> {
Expanded _buildTextInput(BuildContext context) { Expanded _buildTextInput(BuildContext context) {
return Expanded( return Expanded(
child: Center( child: Center(
child: LimitedBox(
maxHeight: widget.maxHeight,
child: Container( child: Container(
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
decoration: BoxDecoration( decoration: BoxDecoration(
@@ -296,12 +294,13 @@ class MessageInputState extends State<MessageInput> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
_buildAttachments(), _buildAttachments(),
TextField( 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,11 +411,11 @@ 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'
? CircleAvatar(
backgroundColor: Colors.black, backgroundColor: Colors.black,
child: Image.asset('images/giphy_icon.png'), child: Image.asset('images/giphy_icon.png'),
maxRadius: 12.0, maxRadius: 12.0,
) : null, )
: null,
title: Text.rich( title: Text.rich(
TextSpan( TextSpan(
text: '${c.name.capitalize()}', text: '${c.name.capitalize()}',