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
+4
View File
@@ -13,3 +13,7 @@
## 1.0.3 ## 1.0.3
- Update example - Update example
## 1.0.4
- Add `hasChild` method to controller
+5
View File
@@ -241,6 +241,11 @@ class LazyCanvasController with ChangeNotifier {
markDirty(); markDirty();
} }
/// Returns true if the child exists, false otherwise.
bool hasChild(CanvasChildId id) {
return _children.containsKey(id);
}
// ==================== Positioning Logic ==================== // ==================== Positioning Logic ====================
/// Currently rendered widgets with their position info /// Currently rendered widgets with their position info
+1 -1
View File
@@ -1,6 +1,6 @@
name: infinite_lazy_grid name: infinite_lazy_grid
description: "infinitely scrollable and zoomable grid layout with lazy loading capabilities." description: "infinitely scrollable and zoomable grid layout with lazy loading capabilities."
version: 1.0.3 version: 1.0.4
homepage: https://github.com/ruinivist/infinite_lazy_grid homepage: https://github.com/ruinivist/infinite_lazy_grid
environment: environment: