add func to check if child with id exists already

This commit is contained in:
2025-10-23 01:46:52 +00:00
parent 942a09a3da
commit c8ddb363b1
3 changed files with 10 additions and 1 deletions
+5
View File
@@ -241,6 +241,11 @@ class LazyCanvasController with ChangeNotifier {
markDirty();
}
/// Returns true if the child exists, false otherwise.
bool hasChild(CanvasChildId id) {
return _children.containsKey(id);
}
// ==================== Positioning Logic ====================
/// Currently rendered widgets with their position info