Skip to content
Merged
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 @@ -5,6 +5,7 @@ import '../../../stream_core_flutter.dart';

enum StreamMessageComposerInputTrailingState {
send,
edit,
microphone,
voiceRecordingActive,
}
Expand All @@ -19,16 +20,20 @@ class StreamCoreMessageComposerInputTrailing extends StatelessWidget {
});

final TextEditingController controller;
final VoidCallback onSendPressed;
final VoidCallback? onSendPressed;
final VoiceRecordingCallback? voiceRecordingCallback;
final StreamMessageComposerInputTrailingState buttonState;

@override
Widget build(BuildContext context) {
if (buttonState == StreamMessageComposerInputTrailingState.send || voiceRecordingCallback == null) {
if (buttonState == StreamMessageComposerInputTrailingState.send ||
buttonState == StreamMessageComposerInputTrailingState.edit ||
voiceRecordingCallback == null) {
return StreamButton.icon(
key: _messageComposerInputTrailingSendKey,
icon: context.streamIcons.paperPlane,
icon: buttonState == StreamMessageComposerInputTrailingState.edit
? context.streamIcons.checkmark2Small
: context.streamIcons.paperPlane,
size: StreamButtonSize.small,
onTap: onSendPressed,
);
Expand Down
Loading