if, by shifting up a message to make footer space, a header overflow is caused, opt of push the message down instead of up
This commit is contained in:
parent
1605fd95f3
commit
2ff70e65db
1 changed files with 9 additions and 2 deletions
|
|
@ -74,13 +74,20 @@ class MessageSelectionOverlayState extends State<MessageSelectionOverlay>
|
|||
double scrollOffset = 0;
|
||||
double animationEndOffset = 0;
|
||||
|
||||
final midpoint = (headerBottomOffset + footerBottomOffset) / 2;
|
||||
if (hasHeaderOverflow) {
|
||||
final midpoint = (headerBottomOffset + footerBottomOffset) / 2;
|
||||
animationEndOffset = midpoint - messageSize!.height;
|
||||
scrollOffset = animationEndOffset - currentBottomOffset;
|
||||
} else if (hasFooterOverflow) {
|
||||
scrollOffset = footerHeight - currentBottomOffset;
|
||||
animationEndOffset = currentBottomOffset + scrollOffset;
|
||||
animationEndOffset = footerHeight;
|
||||
|
||||
final bottomOffsetDifference = footerHeight - currentBottomOffset;
|
||||
final newTopOffset = messageOffset!.dy - bottomOffsetDifference;
|
||||
if (newTopOffset < (headerHeight + AppConfig.toolbarMaxHeight)) {
|
||||
animationEndOffset = midpoint - messageSize!.height;
|
||||
scrollOffset = animationEndOffset - currentBottomOffset;
|
||||
}
|
||||
}
|
||||
|
||||
_overlayPositionAnimation = Tween<double>(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue