Compare commits
No commits in common. "8f58893553429e7fbf8d8ad04061f7ad49a7c47c" and "d833cdb733e5281af5903b357ea2eebe339c2839" have entirely different histories.
8f58893553
...
d833cdb733
@ -282,15 +282,14 @@ class _ChatBubbleState extends State<ChatBubble> with SingleTickerProviderStateM
|
|||||||
if(!widget.bubbleData.isReplyable) return;
|
if(!widget.bubbleData.isReplyable) return;
|
||||||
var dx = details.delta.dx - _dragStartPosition.dx;
|
var dx = details.delta.dx - _dragStartPosition.dx;
|
||||||
setState(() {
|
setState(() {
|
||||||
_position = (_position.dx + dx).abs() > 60 ? Offset(_position.dx, 0) : Offset(_position.dx + dx, 0);
|
_position = (_position.dx + dx).abs() > 30 ? Offset(_position.dx, 0) : Offset(_position.dx + dx, 0);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onHorizontalDragEnd: (DragEndDetails details) {
|
onHorizontalDragEnd: (DragEndDetails details) {
|
||||||
var isAction = _position.dx.abs() > 50;
|
|
||||||
setState(() {
|
setState(() {
|
||||||
_position = const Offset(0, 0);
|
_position = const Offset(0, 0);
|
||||||
});
|
});
|
||||||
if(widget.bubbleData.isReplyable && isAction) {
|
if(widget.bubbleData.isReplyable) {
|
||||||
Provider.of<ChatProps>(context, listen: false).setReferenceMessageId(widget.bubbleData.id, context, widget.chatData.token);
|
Provider.of<ChatProps>(context, listen: false).setReferenceMessageId(widget.bubbleData.id, context, widget.chatData.token);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user