unified_popups
2.2.3, released 4 weeks ago by an unverified publisher
Unified overlay popup system for Flutter offering toast, loading, confirm, sheet, menu and more without needing a BuildContext.
What it does
Provides a single runtime API to show various overlay popups (toast, loading, confirm dialogs, sheets, menus, etc.) on a private overlay above the app. It manages lifecycle, back‑button and route policies centrally, keeping the page route stack clean.
AI-written summary of version 2.2.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need global popups that can be triggered from services or async callbacks
- You want a consistent API for different popup types with shared back‑button handling
- You prefer not to pass BuildContext around
Skip it when
- You need system‑level notifications or push messages
- You require platform‑specific UI that isn’t an overlay
- You already use a dedicated dialog/sheet library and don’t need a unified system
Strengths
- No BuildContext required for showing popups
- One unified API covers many popup types
- Configurable back‑button and route policies
- Supports toast queuing and custom surfaces
Weaknesses
- Only works as an in‑app overlay, not for OS notifications
- Adds another overlay layer which may conflict with other overlay packages
- Learning curve to understand its lifecycle and policies
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Add unified_popups to pubspec, include Pop.routeObserver in navigatorObservers and use Pop.hostBuilder as the app builder.
dependencies:
unified_popups: ^2.2.3
MaterialApp(
navigatorObservers: [Pop.routeObserver],
builder: Pop.hostBuilder,
home: const HomePage(),
);
Pop.toast(const ToastConfig.text('Saved', type: ToastType.success));
final ok = await Pop.confirm(const ConfirmConfig(
title: 'Delete?',
content: 'This cannot be undone.',
confirmText: 'Delete',
cancelText: 'Cancel',
)).result;Alternatives
Packages that do the same job and could replace unified_popups.
- fluttertoast
Simple toast notifications without the extra overlay management
85Compare - bot_toast
Provides toast and loading overlays with a similar no‑context API
50Compare - overlay_support
Offers lightweight overlay widgets for toasts and notifications
50Compare