feat(ui): add enableActionAnimation flag to StreamMessageInput (#1367)

* feat(ui): add enableActionAnimation flag to StreamMessageInput

* chore(ui): update changelog

* fix(ui): add doc
This commit is contained in:
Salvatore Giordano
2022-10-26 09:41:48 +02:00
committed by GitHub
parent d09d3817b5
commit 7fa39c9474
2 changed files with 6 additions and 1 deletions
@@ -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
@@ -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<StreamAutocompleteTrigger> customAutocompleteTriggers;
@@ -615,7 +619,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: AnimatedCrossFade(
crossFadeState: _actionsShrunk
crossFadeState: (_actionsShrunk && widget.enableActionAnimation)
? CrossFadeState.showFirst
: CrossFadeState.showSecond,
firstCurve: Curves.easeOut,