fix: set the leader size when attach get called

This commit is contained in:
appflowy 2022-09-20 21:14:57 +08:00
parent bb61bf0a30
commit e178c7c4f4

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