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
I have a page in my application that builds a NodeEditor, but I retain the controller for it in a global state.
If I rebuild the NodeEditor (the second time) with the previously used controller (that has a bunch of nodes and connections), I get a crash in render_info.dart:16:
/// get the position of object in the screen, correcting by the position of/// vertical and horizontal scrollOffsetgetObjectPosition(NodeEditorController controller, GlobalKey key) {
var obj = key.currentContext?.findRenderObject();
finalRenderBox stackRenderBox = obj asRenderBox; /// <-- obj IS NULL HERE!// fix position by scroll positionreturn stackRenderBox.localToGlobal(Offset.zero) -
controller.stackPos!+Offset(controller.horizontalScrollController.offset,
controller.verticalScrollController.offset);
}
Seems like its due to the global key being recreated when the pins are being recreated (in _InPortWidgetState, when you call controller.addInPort).
Is this a bug, or am I using the library wrong? It works phenomenally otherwise, thank you for creating another fantastic flutter package!
The text was updated successfully, but these errors were encountered:
I have a page in my application that builds a NodeEditor, but I retain the controller for it in a global state.
If I rebuild the NodeEditor (the second time) with the previously used controller (that has a bunch of nodes and connections), I get a crash in render_info.dart:16:
Seems like its due to the global key being recreated when the pins are being recreated (in
_InPortWidgetState
, when you callcontroller.addInPort
).Is this a bug, or am I using the library wrong? It works phenomenally otherwise, thank you for creating another fantastic flutter package!
The text was updated successfully, but these errors were encountered: