Merge pull request #33 from nosmirck/bugfix/overlay
Fix for #32. Removed the Flex causing the widget to overflow
This commit is contained in:
+52
-62
@@ -279,37 +279,33 @@ class _MessageInputState extends State<MessageInput> {
|
|||||||
],
|
],
|
||||||
color: StreamChatTheme.of(context).primaryColor,
|
color: StreamChatTheme.of(context).primaryColor,
|
||||||
),
|
),
|
||||||
child: Flex(
|
child: ListView(
|
||||||
mainAxisSize: MainAxisSize.min,
|
padding: const EdgeInsets.all(0),
|
||||||
direction: Axis.vertical,
|
shrinkWrap: true,
|
||||||
children: <Widget>[
|
children: commands
|
||||||
ListView(
|
.map(
|
||||||
padding: const EdgeInsets.all(0),
|
(c) => ListTile(
|
||||||
shrinkWrap: true,
|
title: Text.rich(
|
||||||
children: commands
|
TextSpan(
|
||||||
.map((c) => ListTile(
|
text: '${c.name}',
|
||||||
title: Text.rich(
|
style: TextStyle(fontWeight: FontWeight.bold),
|
||||||
TextSpan(
|
children: [
|
||||||
text: '${c.name}',
|
TextSpan(
|
||||||
style: TextStyle(fontWeight: FontWeight.bold),
|
text: ' ${c.args}',
|
||||||
children: [
|
style: TextStyle(
|
||||||
TextSpan(
|
fontWeight: FontWeight.w300,
|
||||||
text: ' ${c.args}',
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.w300,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
subtitle: Text(c.description),
|
],
|
||||||
onTap: () {
|
),
|
||||||
_setCommand(c);
|
),
|
||||||
},
|
subtitle: Text(c.description),
|
||||||
))
|
onTap: () {
|
||||||
.toList(),
|
_setCommand(c);
|
||||||
),
|
},
|
||||||
],
|
),
|
||||||
|
)
|
||||||
|
.toList(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -350,41 +346,35 @@ class _MessageInputState extends State<MessageInput> {
|
|||||||
],
|
],
|
||||||
color: StreamChatTheme.of(context).primaryColor,
|
color: StreamChatTheme.of(context).primaryColor,
|
||||||
),
|
),
|
||||||
child: Flex(
|
child: ListView(
|
||||||
mainAxisSize: MainAxisSize.min,
|
padding: const EdgeInsets.all(0),
|
||||||
direction: Axis.vertical,
|
shrinkWrap: true,
|
||||||
children: <Widget>[
|
children: members
|
||||||
ListView(
|
.map((m) => ListTile(
|
||||||
padding: const EdgeInsets.all(0),
|
leading: UserAvatar(
|
||||||
shrinkWrap: true,
|
user: m.user,
|
||||||
children: members
|
),
|
||||||
.map((m) => ListTile(
|
title: Text('${m.user.name}'),
|
||||||
leading: UserAvatar(
|
onTap: () {
|
||||||
user: m.user,
|
_mentionedUsers.add(m.user);
|
||||||
|
|
||||||
|
splits[splits.length - 1] = m.user.name;
|
||||||
|
final rejoin = splits.join('@');
|
||||||
|
|
||||||
|
_textController.value = TextEditingValue(
|
||||||
|
text: rejoin +
|
||||||
|
_textController.text
|
||||||
|
.substring(_textController.selection.start),
|
||||||
|
selection: TextSelection.collapsed(
|
||||||
|
offset: rejoin.length,
|
||||||
),
|
),
|
||||||
title: Text('${m.user.name}'),
|
);
|
||||||
onTap: () {
|
|
||||||
_mentionedUsers.add(m.user);
|
|
||||||
|
|
||||||
splits[splits.length - 1] = m.user.name;
|
_mentionsOverlay?.remove();
|
||||||
final rejoin = splits.join('@');
|
_mentionsOverlay = null;
|
||||||
|
},
|
||||||
_textController.value = TextEditingValue(
|
))
|
||||||
text: rejoin +
|
.toList(),
|
||||||
_textController.text.substring(
|
|
||||||
_textController.selection.start),
|
|
||||||
selection: TextSelection.collapsed(
|
|
||||||
offset: rejoin.length,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
_mentionsOverlay?.remove();
|
|
||||||
_mentionsOverlay = null;
|
|
||||||
},
|
|
||||||
))
|
|
||||||
.toList(),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user