diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f58c8c..3328e4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,3 +13,7 @@ ## 1.0.3 - Update example + +## 1.0.4 + +- Add `hasChild` method to controller diff --git a/lib/core/controller/controller.dart b/lib/core/controller/controller.dart index 5d99894..59a44c4 100644 --- a/lib/core/controller/controller.dart +++ b/lib/core/controller/controller.dart @@ -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 diff --git a/pubspec.yaml b/pubspec.yaml index d09a152..c156f14 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: infinite_lazy_grid 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 environment: