Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,18 @@ class _DefaultStreamMessageComposerLeading extends StatelessWidget {
Widget build(BuildContext context) {
// 45 degrees = 0.125 turns
const closedRotation = 0.125;
final showButton = !props.isAudioRecordingFlowActive && props.controller.message.command == null;

return AnimatedOpacity(
opacity: props.isAudioRecordingFlowActive ? 0.0 : 1.0,
duration: props.isAudioRecordingFlowActive ? Duration.zero : const Duration(milliseconds: 200),
opacity: showButton ? 1.0 : 0.0,
duration: showButton ? const Duration(milliseconds: 200) : Duration.zero,
curve: Curves.easeInQuint,
child: AnimatedSize(
duration: const Duration(milliseconds: 200),
alignment: Alignment.bottomCenter,
child: Row(
children: [
if (!props.isAudioRecordingFlowActive) ...[
if (showButton) ...[
AnimatedRotation(
turns: props.isPickerOpen ? closedRotation : 0,
duration: const Duration(milliseconds: 150),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ class DefaultStreamChatMessageComposer extends StatelessWidget {
controller: inputController.textFieldController,
placeholder: props.placeholder,
focusNode: props.focusNode,
command: inputController.message.command?.toUpperCase(),
onDismissCommand: inputController.clear,
),
if (props.canAlsoSendToChannel)
DmCheckboxListTile(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class StreamMessageInputController extends ValueNotifier<Message> {
}

/// Sets a command for the message.
set command(String command) {
set command(String? command) {
// Setting the command should also clear the text and attachments.
message = message.copyWith(
text: '',
Expand Down
Loading