diff --git a/packages/stream_chat_flutter/CHANGELOG.md b/packages/stream_chat_flutter/CHANGELOG.md index c225c677..da349964 100644 --- a/packages/stream_chat_flutter/CHANGELOG.md +++ b/packages/stream_chat_flutter/CHANGELOG.md @@ -10,6 +10,7 @@ - `VideoAttachment` now uses `thumbUrl` to show the thumbnail if it's available instead of generating them. - Expose `widthFactor` option in `MessageWidget` +- Add `enableActionAnimation` flag to `StreamMessageInput` ## 5.0.1 diff --git a/packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart b/packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart index 130d0462..5dabf3fd 100644 --- a/packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart +++ b/packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart @@ -109,8 +109,12 @@ class StreamMessageInput extends StatefulWidget { this.autoCorrect = true, this.enableMentionsOverlay = true, this.onQuotedMessageCleared, + this.enableActionAnimation = true, }); + /// If true the message input will animate the actions while you type + final bool enableActionAnimation; + /// List of triggers for showing autocomplete. final Iterable customAutocompleteTriggers; @@ -615,7 +619,7 @@ class StreamMessageInputState extends State return Padding( padding: const EdgeInsets.symmetric(horizontal: 8), child: AnimatedCrossFade( - crossFadeState: _actionsShrunk + crossFadeState: (_actionsShrunk && widget.enableActionAnimation) ? CrossFadeState.showFirst : CrossFadeState.showSecond, firstCurve: Curves.easeOut,