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:
committed by
GitHub
parent
d09d3817b5
commit
7fa39c9474
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user