fix messageinput

This commit is contained in:
Salvatore Giordano
2021-05-17 11:30:05 +02:00
parent 625c2f0ad2
commit 2263dc097b
@@ -463,7 +463,9 @@ class MessageInputState extends State<MessageInput> {
);
}
Widget _buildExpandActionsButton() => Padding(
Widget _buildExpandActionsButton() {
final channel = StreamChannel.of(context).channel;
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: AnimatedCrossFade(
crossFadeState: _actionsShrunk
@@ -500,12 +502,8 @@ class MessageInputState extends State<MessageInput> {
if (!widget.disableAttachments) _buildAttachmentButton(),
if (widget.showCommandsButton &&
widget.editMessage == null &&
StreamChannel.of(context)
.channel
.config
?.commands
.isNotEmpty ==
true)
channel.state != null &&
channel.config?.commands.isNotEmpty == true)
_buildCommandButton(),
...widget.actions ?? [],
].insertBetween(const SizedBox(width: 8)),
@@ -515,6 +513,7 @@ class MessageInputState extends State<MessageInput> {
alignment: Alignment.center,
),
);
}
Expanded _buildTextInput(BuildContext context) {
final theme = StreamChatTheme.of(context);