fix: Fixed command picker
This commit is contained in:
@@ -1461,16 +1461,31 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
padding:
|
padding:
|
||||||
const EdgeInsets.only(left: 4.0, right: 8.0, top: 8.0, bottom: 8.0),
|
const EdgeInsets.only(left: 4.0, right: 8.0, top: 8.0, bottom: 8.0),
|
||||||
child: StreamSvgIcon.lightning(
|
child: StreamSvgIcon.lightning(
|
||||||
color: Color(0xFF000000).withAlpha(128),
|
color: _commandsOverlay != null
|
||||||
|
? StreamChatTheme.of(context).accentColor
|
||||||
|
: Color(0xFF000000).withAlpha(128),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () async {
|
||||||
|
if (_openFilePickerSection) {
|
||||||
|
setState(() {
|
||||||
|
_animateContainer = false;
|
||||||
|
_openFilePickerSection = false;
|
||||||
|
_filePickerSize = _kMinMediaPickerSize;
|
||||||
|
});
|
||||||
|
await Future.delayed(Duration(milliseconds: 300));
|
||||||
|
}
|
||||||
|
|
||||||
if (_commandsOverlay == null) {
|
if (_commandsOverlay == null) {
|
||||||
_commandsOverlay = _buildCommandsOverlayEntry();
|
setState(() {
|
||||||
Overlay.of(context).insert(_commandsOverlay);
|
_commandsOverlay = _buildCommandsOverlayEntry();
|
||||||
|
Overlay.of(context).insert(_commandsOverlay);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
_commandsOverlay?.remove();
|
setState(() {
|
||||||
_commandsOverlay = null;
|
_commandsOverlay?.remove();
|
||||||
|
_commandsOverlay = null;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user