Merge pull request #33 from nosmirck/bugfix/overlay

Fix for #32. Removed the Flex causing the widget to overflow
This commit is contained in:
Salvatore Giordano
2020-04-16 09:30:54 +02:00
committed by GitHub
+8 -18
View File
@@ -279,15 +279,12 @@ class _MessageInputState extends State<MessageInput> {
], ],
color: StreamChatTheme.of(context).primaryColor, color: StreamChatTheme.of(context).primaryColor,
), ),
child: Flex( child: ListView(
mainAxisSize: MainAxisSize.min,
direction: Axis.vertical,
children: <Widget>[
ListView(
padding: const EdgeInsets.all(0), padding: const EdgeInsets.all(0),
shrinkWrap: true, shrinkWrap: true,
children: commands children: commands
.map((c) => ListTile( .map(
(c) => ListTile(
title: Text.rich( title: Text.rich(
TextSpan( TextSpan(
text: '${c.name}', text: '${c.name}',
@@ -306,10 +303,9 @@ class _MessageInputState extends State<MessageInput> {
onTap: () { onTap: () {
_setCommand(c); _setCommand(c);
}, },
))
.toList(),
), ),
], )
.toList(),
), ),
), ),
), ),
@@ -350,11 +346,7 @@ class _MessageInputState extends State<MessageInput> {
], ],
color: StreamChatTheme.of(context).primaryColor, color: StreamChatTheme.of(context).primaryColor,
), ),
child: Flex( child: ListView(
mainAxisSize: MainAxisSize.min,
direction: Axis.vertical,
children: <Widget>[
ListView(
padding: const EdgeInsets.all(0), padding: const EdgeInsets.all(0),
shrinkWrap: true, shrinkWrap: true,
children: members children: members
@@ -371,8 +363,8 @@ class _MessageInputState extends State<MessageInput> {
_textController.value = TextEditingValue( _textController.value = TextEditingValue(
text: rejoin + text: rejoin +
_textController.text.substring( _textController.text
_textController.selection.start), .substring(_textController.selection.start),
selection: TextSelection.collapsed( selection: TextSelection.collapsed(
offset: rejoin.length, offset: rejoin.length,
), ),
@@ -384,8 +376,6 @@ class _MessageInputState extends State<MessageInput> {
)) ))
.toList(), .toList(),
), ),
],
),
), ),
), ),
); );