Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 7.0.1

- Fix published layouts failing with "Node with id not found" on web
release builds. When the layout was replaced by a freshly decoded copy
with the same `lastUpdated`, the canvas was built from that copy, whose
nodes have no parent links. The canvas is now read from the resolved
node registry.

## 7.0.0

### Breaking changes
Expand Down
8 changes: 8 additions & 0 deletions lib/src/ui/layout_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,15 @@ class _CodelesslyLayoutBuilderState extends State<CodelesslyLayoutBuilder> {
),
);

/// The canvas node from [nodeRegistry], whose parent links [loadLayout]
/// resolved.
///
/// [widget.layout] can be replaced by a freshly decoded copy with the same
/// [SDKPublishLayout.lastUpdated], which [didUpdateWidget] does not reload.
/// Its nodes have no parent links, so building from it would look up a
/// parent with an empty ID.
CanvasNode get canvasNode =>
nodeRegistry.getNodeByIdOrNull(widget.canvasId) as CanvasNode? ??
widget.layout.canvases[widget.canvasId]![widget.canvasId] as CanvasNode;

/// Whether the layout should be loaded. This is used to prevent the layout
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: codelessly_sdk
description: Codelessly CloudUI™ - Server-driven UI for Flutter. Supercharge your Flutter apps with dynamic UI and real-time updates. Build and publish UI without code!
version: 7.0.0
version: 7.0.1
homepage: https://codelessly.com/
repository: https://github.com/Codelessly/CodelesslySDK
issue_tracker: https://github.com/Codelessly/CodelesslySDK/issues
Expand Down
Loading