flutter_notification_queue 0.4.1
flutter_notification_queue: ^0.4.1 copied to clipboard
A contextless, overlay-based in-app notification queue for Flutter with spatial positioning, gesture intents, priority triage, notification bundling, and event streams.
Changelog #
0.4.1 - 2026-09-12 #
Studio & Web Deployment #
- Web Release Display Fix: Fixed an issue in the Studio web app where configurator options and generated code snippets displayed minified type names in web release builds.
0.4.0 - 2026-08-30 #
Breaking API Changes (Deprecated Surface Removal) #
- Removed Legacy Static Singleton Facade: Removed
FlutterNotificationQueuestatic facade.NotificationControllerandNotificationScopeare now the canonical API for all notification queue management. - Removed
FnqEventTypedef: Standardized onsealed class NotificationEventfor all lifecycle event subscriptions. - Removed Legacy Action Factory: Removed
@Deprecated factory NotificationAction.onTap. UseNotificationAction.buttonor gesture intents (TapBehavior,DragBehavior) instead. - Removed
NotificationWidget.show(): Notifications are dispatched asAppNotificationpayloads viacontroller.show(...)orNotificationScope.of(context).show(...).
0.3.2 - 2026-08-26 #
Studio Application & Web Deployment #
- GitHub Pages CI/CD Workflow: Added automated GitHub Actions workflow (
deploy_pages.yml) to compile and deploy the NFQ Studio web app (example/) to GitHub Pages on version tag pushes (v*). - Interactive Web Demo Link: Integrated a prominent
img.shields.iofor-the-badge demo button inREADME.mddirecting users to the hosted NFQ Studio live web app. - Mobile Floating Action Button (FAB): Added a scroll-responsive floating action button in NFQ Studio for narrow screen viewports, enabling instant notification preview triggers on mobile devices.
0.3.1 - 2026-08-14 #
Memory Teardown & Resource Hardening #
- Automated Timer Teardown: Added
ditchAllDismissTimers()toQueueWidgetStateand integrated it intoQueueCoordinator.dispose()to ensure active tickers and auto-dismiss timers across all registered queues stop immediately on coordinator/controller disposal. - Animation Ticker Teardown: Prevented active
_snapBackControlleranimation leaks inDraggableTransitionsStateand invokedditchDismissTimer()prior to disposingNotificationWidgetState. - OverlayPortal Controller Teardown: Ensured
OverlayPortalControllerand scope bindings detach cleanly on widget unmounting.
Test Suite Hardening #
- Multi-Tenant Scope Verification: Added unit and widget test suite in
notification_scope_test.dartcovering multi-tenant subtree isolation, scope nesting overrides, unmount detachment, and graceful timer teardown.
0.3.0 - 2026-08-14 #
Architectural Evolution (v1.0 Preparation) #
NotificationControllerFacade: Introduced an explicitNotificationControllerto own configuration (queues,channels), active state, event streams, and history logging. Replaces global static state with clean dependency injection.NotificationScopeIntegration: IntroducedNotificationScope(StatefulWidget&InheritedWidget) to provide scoped access toNotificationControllerviaNotificationScope.of(context).AppNotificationIntent Payload: Separated data payload from widget rendering state. Applications dispatch immutableAppNotificationpayloads viacontroller.show(AppNotification(...)).- Expanded Controller Surface: Added
show,tryShow,dismiss,dismissAll,dismissNewest,dismissGroup,relocate,reorder,snooze,pin,unpin,getHistory,clearHistory, andeventsdirectly toNotificationController. - Sealed Event Hierarchy: Renamed
FnqEventbase class toNotificationEvent(typedef FnqEvent = NotificationEventprovided for backward compatibility). - Deprecation Path: Marked
FlutterNotificationQueue,NotificationWidget.show(), and directNotificationWidgetinstantiation as@Deprecated. Seedoc/migration_v0_4.mdfor complete migration guidance.
Bug Fixes & Stability #
- Reorder & Relocate Null Safety: Resolved unexpected
nullvalue errors and unmounted state crashes during card reordering and relocation interactions. - Context-Aware Scope Resolution: Implemented a 3-tier coordinator lookup hierarchy (
explicit -> NotificationScope.maybeCoordinatorOf(context) -> FlutterNotificationQueue.coordinator) across UI overlay, queue widgets, and draggable transitions, preventing scopedNotificationControllerinstances from defaulting to global static singletons. - Blueprint Coordinator Preservation: Preserved
coordinatorreferences acrosscopyToQueue(relocation) andcopyForRequeue(snooze) blueprint copies. - Unmounted Timer Prevention: Prevented calling
initDismissTimer()on unmounting notification states after successful relocation.
Documentation & Tooling #
- Migration Guide: Added comprehensive migration documentation in
doc/migration_v0_4.md. - Studio Application: Refactored
example/Studio app to showcaseNotificationControllerandNotificationScopepatterns.
0.2.0 - 2026-07-19 #
Consolidated API & Subclass Removal #
- Simplified NotificationQueue: Removed all 8 specialized subclasses (
TopLeftQueue, etc.) in favor of a single, highly configurable concreteNotificationQueueclass with aconstconstructor. - QueuePosition Helpers: Simplified
generateQueue()onQueuePositionto directly buildNotificationQueueinstances, removing duplicate subclass-generation switch blocks.
Internal State Decoupling #
- Introduced NotificationEntry: Decoupled
NotificationWidgetconfiguration blueprint from active runtime state (dismiss timers, pinned lifecycle, resolved priority) by introducing the internalNotificationEntrywrapper class. - QueueCoordinator & Layout State: Refactored state-storage maps and animation list managers to use
NotificationEntry, preventing potentialGlobalKeyconflicts.
0.1.0 - 2026-07-10 #
Initial Public Preview Baseline #
All features from early pre-releases (0.4.0 - 0.7.0) consolidated into a single unified public baseline.
Interaction Engine (Physics & Reordering)
- Reorder Behavior: Users can pick up notifications and seamlessly rearrange them within their queue, empowering sophisticated inbox management.
- Overlap Mechanics: Replaced legacy gap-based targeting with a deeply physical "Overlap Target" model. The engine dynamically calculates the 2D bounding
Rectof every active notification on the fly to yield precise target indices. - Perfect Deadband Hysteresis: Implemented a "Gravity Well" (Target-Centric State) algorithm. The active drop zone applies a persistent 40-pixel magnetic lock to its own hit-test calculations, generating a flawless 80-pixel optical deadband that is 100% immune to pointer jitter, velocity spikes, and physical hand vibrations.
- Premium Bounding Reticles: Replaced the destructive horizontal center-line drop indicator with a Selection Reticle. Hovering over a card instantly frames its exterior in a glowing border while subtly darkening the interior (Recess Effect).
- Self-Target Suppression: The physics engine natively understands "cancel" drags. Hovering a payload over its own original starting slot visually suppresses all target feedback, rendering an empty placeholder hole so the user can comfortably drop the card back to safely abort.
- Smooth Height & Spring Snapbacks: Added dynamic height transitions when notifications expand or collapse, and physical spring snapback physics for aborted cancel drags.
- Visual Grab Cursors: Added grab and grabbing cursor states on draggable cards to improve desktop UX.
Layout, Grouping & Customization
- Notification Grouping & Bundling: Introduced dynamic stack configuration parameters (custom layer count, offsets, scales), recursive-safe swipe dismissals with reason propagation, and non-overlapping indicators with direction-aware tap-to-expand.
- Visual Boundaries: Added per-queue
maxWidthconstraints and layout collision delegate resolution. - Adaptive Close Button: Opacity-based model (
0.0–1.0) with subtle presence for touch devices (starts at0.3opacity for discoverability) and progressive enhancement (hidden until hover on desktop). - Hover-to-Pause Dismissal: Hovering over a notification card pauses its auto-dismiss timer, which resumes smoothly when the pointer leaves.
Core API & Observability
- Dynamic Channel Parking: Introduced runtime routing updates where dragging/relocating a notification card dynamically updates the routing rules for all future notifications of its channel.
- Event History Log: Added an in-memory, LIFO bounded ring buffer (
maxHistoryEntries) to capture notification events. AddedgetHistory()for querying with filters (channelName, dismissReason, since, limit) andclearHistory()for cache management. - Zero-overhead Disabling: When disabled (
maxHistoryEntriesis set to0or less), the history subscription is completely cancelled and detached, guaranteeing zero runtime performance or memory overhead. - Logd Core Integration: Upgraded logging package to
logdversion^0.8.6and integrated package-wide structured log handlers. - Stable Event Proxy: Replaced transient event streams with a persistent broadcast proxy stream to prevent zombie listeners across configure/reset cycles.
- Per-Notification Permanence: Added
permanent: trueflag to individualNotificationWidgets to bypass channel-level default dismiss durations.