feat: commands ui
This commit is contained in:
@@ -415,7 +415,20 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
child: ListView(
|
child: ListView(
|
||||||
padding: const EdgeInsets.all(0),
|
padding: const EdgeInsets.all(0),
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
children: commands
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(4.0),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
|
child: Icon(StreamIcons.lightning, color: StreamChatTheme.of(context).accentColor),
|
||||||
|
),
|
||||||
|
Text('Instant Commands')
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
...commands
|
||||||
.map(
|
.map(
|
||||||
(c) => ListTile(
|
(c) => ListTile(
|
||||||
title: Text.rich(
|
title: Text.rich(
|
||||||
@@ -439,6 +452,7 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -544,6 +558,7 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_chosenCommand = c;
|
_chosenCommand = c;
|
||||||
_commandEnabled = true;
|
_commandEnabled = true;
|
||||||
|
_messageIsPresent = false;
|
||||||
});
|
});
|
||||||
_commandsOverlay?.remove();
|
_commandsOverlay?.remove();
|
||||||
_commandsOverlay = null;
|
_commandsOverlay = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user