Merge pull request #1104 from AppFlowy-IO/fix/appflowy_popover_detach_bugs

fix: set the leader size when attach get called
This commit is contained in:
Nathan.fooo 2022-09-21 10:06:03 +08:00 committed by GitHub
commit bdf4e60b48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -323,9 +323,21 @@ class PopoverTargetRenderBox extends RenderProxyBox {
@override
void detach() {
super.detach();
link.leaderOffset = null;
link.leaderSize = null;
super.detach();
}
@override
void attach(covariant PipelineOwner owner) {
super.attach(owner);
if (hasSize) {
// The leaderSize was set after [performLayout], but was
// set to null when [detach] get called.
//
// set the leaderSize when attach get called
link.leaderSize = size;
}
}
@override