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:
@@ -10,6 +10,7 @@
|
|||||||
- `VideoAttachment` now uses `thumbUrl` to show the thumbnail
|
- `VideoAttachment` now uses `thumbUrl` to show the thumbnail
|
||||||
if it's available instead of generating them.
|
if it's available instead of generating them.
|
||||||
- Expose `widthFactor` option in `MessageWidget`
|
- Expose `widthFactor` option in `MessageWidget`
|
||||||
|
- Add `enableActionAnimation` flag to `StreamMessageInput`
|
||||||
|
|
||||||
## 5.0.1
|
## 5.0.1
|
||||||
|
|
||||||
|
|||||||
@@ -109,8 +109,12 @@ class StreamMessageInput extends StatefulWidget {
|
|||||||
this.autoCorrect = true,
|
this.autoCorrect = true,
|
||||||
this.enableMentionsOverlay = true,
|
this.enableMentionsOverlay = true,
|
||||||
this.onQuotedMessageCleared,
|
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.
|
/// List of triggers for showing autocomplete.
|
||||||
final Iterable<StreamAutocompleteTrigger> customAutocompleteTriggers;
|
final Iterable<StreamAutocompleteTrigger> customAutocompleteTriggers;
|
||||||
|
|
||||||
@@ -615,7 +619,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
|
|||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||||
child: AnimatedCrossFade(
|
child: AnimatedCrossFade(
|
||||||
crossFadeState: _actionsShrunk
|
crossFadeState: (_actionsShrunk && widget.enableActionAnimation)
|
||||||
? CrossFadeState.showFirst
|
? CrossFadeState.showFirst
|
||||||
: CrossFadeState.showSecond,
|
: CrossFadeState.showSecond,
|
||||||
firstCurve: Curves.easeOut,
|
firstCurve: Curves.easeOut,
|
||||||
|
|||||||
Reference in New Issue
Block a user