Skip to main content

app_alerts 0.1.0 copy "app_alerts: ^0.1.0" to clipboard
app_alerts: ^0.1.0 copied to clipboard

App-wide, prioritized alert delivery for Flutter. Polls (or receives pushed) alerts from a configurable backend source, tracks what has already been presented, and shows urgent pop-up alerts above eve [...]

0.1.0 #

Initial release.

  • Alert / AlertFeed — the JSON wire contract, with tolerant parsing (malformed rows are skipped, unknown alert types fall back to inline).
  • AlertSource abstraction with HttpAlertSource (poll a JSON document, e.g. on NetStorage/CDN), WebSocketAlertSource (push with auto-reconnect and optional HTTP cold-start sync), and SampleAlertSource (useSampleData: true).
  • AlertsController — polling + push merge, expiry filtering, presented-alert deduplication, and backend-priority ordering; urgent alerts published one at a time, inline alerts as a sorted listenable list.
  • AlertHistoryStore with in-memory default and DelegatingAlertHistoryStore for app-owned persistence, keeping the package plugin-free.
  • AppAlerts facade with AppAlerts.builder for one-line, app-wide urgent pop-ups above every route; configurable dismiss-lock duration (default 2 s) during which only the OK button dismisses.
  • InlineAlertsBuilder for host-styled inline alerts.
  • Alert URLs: optional url (+ goLabel) contract fields for deep links or external sites, routed through the app-supplied onOpenUrl handler. URL-carrying urgent alerts show a Go/Dismiss button pair; inline consumers receive alert.url and can reuse the handler via AlertsController.openUrl.
  • urgentAlertBuilder escape hatch to replace the built-in pop-up with a fully custom, app-themed presentation while keeping scheduling, dedupe, and app-inerting in the package.
  • Full accessibility: screen-reader announcements, semantic modal route, focus containment, keyboard operation, 48 px touch targets.
  • Race-hardened by design: id-scoped dismissal (a double-tap can never consume an unseen alert), synchronous state transitions decoupled from history-store I/O, re-entrancy-safe polling, and start-up that survives a failing history store.
  • Runs on all Flutter platforms including web and embedded — pure-Dart dependencies only (http, web_socket_channel), widget-layer-only UI.
1
likes
150
points
43
downloads

Documentation

API reference

Publisher

verified publisherframboos.dev

Weekly Downloads

App-wide, prioritized alert delivery for Flutter. Polls (or receives pushed) alerts from a configurable backend source, tracks what has already been presented, and shows urgent pop-up alerts above every route — or hands inline alert content to the host app to render in its own style. Pure-Dart transport; runs on mobile, desktop, web, and embedded.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, http, web_socket_channel

More

Packages that depend on app_alerts