You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although I do think what I'm currently doing is a little bit hacky, considering I have 10+ fields on the widget state, I'd need to create those same fields on the CustomRenderObject and update them all accordingly. This is super verbose.
My current workaround is just to get the RenderBox of child's self at runtime when it's requested to show a tooltip.
TargetInformation_getTargetInformation(BuildContext context) {
final box = context.findRenderObject() asRenderBox?;
if (box ==null) {
throwStateError(
'Cannot find the box for the given object with context $context',
);
}
final targetSize = box.getDryLayout(constBoxConstraints.tightForFinite());
final target = box.localToGlobal(box.size.center(Offset.zero));
final offsetToTarget =Offset(
-target.dx + box.size.width /2,
-target.dy + box.size.height /2,
);
returnTargetInformation(
targetSize,
target,
offsetToTarget,
);
}
The text was updated successfully, but these errors were encountered:
Although I do think what I'm currently doing is a little bit hacky, considering I have 10+ fields on the widget state, I'd need to create those same fields on the CustomRenderObject and update them all accordingly. This is super verbose.
My current workaround is just to get the RenderBox of child's self at runtime when it's requested to show a tooltip.
The text was updated successfully, but these errors were encountered: