zeus_grid 1.3.0
zeus_grid: ^1.3.0 copied to clipboard
A high-performance, tactical grid engine for Flutter. Featuring an immutable state-driven drag-and-resize system with built-in collision detection.
1.3.0 Aspect Ratio Reflow (Approach 3) #
- New Feature: Aspect Ratio-Driven Grid Reflow - Replaced aggressive boundary pushing with a smart reflow system. Modules that overflow the viewport now scale down to maintain their original aspect ratio (respecting constraints) and reflow to the first available slot.
- UX: Visual Stability - Reflow is now selective; modules that still fit the new viewport remain in their original "tactical" positions, while only overflowing modules are re-packed.
- Refinement: Reflow Logic - Implemented a first-fit packing algorithm using an occupancy map to ensure non-overlapping layouts during window resizing.
- Fix: Tests - Updated and added new test cases to verify aspect ratio scaling and reflow accuracy.
1.2.1 UX Refinement #
- Fix: Intentional Docking - Refined the module removal logic to distinguish between "outside the window" (snaps back to edge) and "inside the Arsenal" (docks/removes).
- UX: Persistent Ghosting - Existing modules now keep their ghost preview visible even when hovering the Arsenal, providing better feedback before release.
- Fix: Tests - Updated
grid_arsenal_hover_testto match the new intentional docking behavior.
1.2.0 Responsive & Performance Update #
- New Feature: Responsive Columns - Added
columnsparameter toZeusGrid. When set, the grid automatically calculates cell dimensions based on available width, allowing for responsive column-based layouts (e.g., a "4-column grid") that adapt to window resizing. - Performance: ValueNotifier Architecture - Refactored
_focusedModuleIdand active sessions to useValueNotifierandValueListenableBuilder. This enables surgical rebuilds of only the affected modules, significantly reducing the overhead on the main widget tree during hover and drag operations. - UX: Explicit Arsenal Docking - Improved module removal logic. Modules now only return to the Arsenal when explicitly dragged over the sidebar.
- UX: Edge Snapping - Dragging a module outside the window bounds (anywhere except the sidebar) now correctly snaps it to the last valid edge position instead of removing it.
- Stability: Resource Management - Implemented
dispose()method inZeusGridstate to properly cleanup all internal notifiers, preventing potential memory leaks in complex applications. - Fix: Out-of-bounds Resizing - Fixed a bug where resizing a module past the window edge would cause it to be incorrectly removed from the grid.
1.1.0 Tactical Expansion #
- New Feature: Max Constraints - Added
maxWandmaxHtoZeusModule. Dashboards can now enforce maximum sizes for widgets. - New Feature: Multi-directional Gravity - Introduced
PackDirectionsupport (up,down,left,right). Auto-packing now supports advanced flow patterns beyond simple downward gravity. - New Feature: Customizable Resize Handles - Added
resizeHandleBuildertoModuleStyle. Developers can now fully theme and replace the resize anchors. - New Feature: Collision Callbacks - Added
onCollisionDetectedcallback toZeusGrid, allowing host apps to react to invalid placements (e.g., showing a warning toast). - Performance: Granular Rebuild Architecture - Optimized the grid stack to rebuild only the actively moving module and its neighbors, preventing full-stack rebuilds during high-frequency drag events.
- Performance: Optimized Layout Resizing - The grid now intelligently skips layout recalculations when the viewport expands, only triggering bounds-pushing logic during shrinking.
- UX: Ghost Drag Fill - Ghost previews now feature a translucent semi-transparent fill for better visibility.
- UX: Persistent Visibility - Modules no longer disappear when dragged past the window edges or over the arsenal menu.
- Fix: Consistency Fix - Standardized all grid calculations to use strict
.floor()logic, eliminating edge-case "rubber-banding" glitches.
1.0.0 Production Grade Release #
- New Feature: Auto-packing / Collision Resolution - Modules now dynamically "push" each other out of the way during drag and resize operations, ensuring a valid layout at all times.
- New Feature: Ghost Preview & Smooth Snapping - Implemented pixel-perfect visual tracking. Modules follow the cursor smoothly while a "Ghost" outline shows the grid-snapped landing spot. Includes a polished 150ms snap animation upon release.
- New Feature: State Serialization - Added
toJson()andZeusModule.fromJson()support, making it easy to save and load custom dashboard layouts. - Performance: Layered Rendering Architecture - Decoupled high-frequency movement updates from the static grid, drastically reducing the widget rebuild count.
- Performance: Repaint Boundary Isolation - Isolated the grid background, individual modules, and arsenal drawer into separate GPU layers to minimize repaint overhead.
- Performance: Widget Granularity - Refactored module rendering into granular
StatelessWidgetclasses to leverage Flutter's internal caching and skip unnecessary widget-tree diffing. - Performance: Hit-Testing Optimization - Implemented an interaction lock that disables hit-testing for background modules during active drag sessions, reducing input latency.
- Visuals: Advanced Tactical Feedback - Added dynamic shadows and "tactical glows" to active modules.
- Visuals: Smooth Style Transitions - Refactored module cards to use
AnimatedContainerfor fluid background, border, and shadow changes. - Fix: Interaction Stability - Resolved flickering during module hover/focus changes and fixed "flashing" warning states during boundary violations.
0.9.0 #
- Breaking Change: Simplified the grid system to an exclusive fixed 1:1 pixel-to-unit architecture.
- Breaking Change: Removed
useFixedGrid,columns, androwsparameters fromZeusGrid. - New Feature: Added
cellSideparameter to control grid density (1 unit =cellSidepixels). - New Feature: Implemented Viewport Boundary Pushing – modules are automatically pushed back into bounds if the viewport shrinks.
- New Feature: Added dynamic grid expansion – the grid now automatically fills the entire viewport without skewing.
- Enhancement: Precision resizing – fixed coordinate rounding issues for pixel-perfect handle tracking.
- Enhancement: Improved "Maths-Page" grid aesthetics with configurable minor and major lines.
- UX: Enhanced resize handle hit testing and interaction priority.
- UX: Added movement threshold to prevent accidental module removals.
0.8.6 #
- Initial support for multi-axis resizing.
- Added "Arsenal" side drawer for unplaced modules.
- Implemented collision detection and visual feedback.