Phase 4 Stage 4: notif gate + home permission-denied banner
Notif Gate full screen at /onboarding/notif-gate, reached from waiting payment on confirmed/consumed status. Auto-advances to /chat/searching when permission is already granted; otherwise shows izinkan/nanti aja HaloButton CTAs. NotifPermission helper wraps firebase_messaging + permission_handler with readStatus/request/openAppSettings; cached in notifPermissionStatusProvider that re-reads on app foreground via an internal WidgetsBindingObserver. home_screen amber banner above-the-fold when notifPermissionStatusProvider reports denied. Dismissable for the session via homeNotifBannerDismissedProvider (in-memory StateProvider, no persistence - cold-restart re-shows). nyalain CTA -> openAppSettings(). Manifest + Info.plist permission entries added. Note: main.dart still pre-requests FirebaseMessaging permission at boot, which can pre-resolve status so the gate auto-advances instead of acting as the first prompt. Left intact for now; can be removed in a later stage if the gate should be the first-ask UX. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import 'features/auth/screens/force_register_screen.dart';
|
||||
import 'features/auth/screens/set_display_name_screen.dart';
|
||||
import 'features/onboarding/onboarding_screen.dart';
|
||||
import 'features/onboarding/screens/esp_screen.dart';
|
||||
import 'features/onboarding/screens/notif_gate_screen.dart';
|
||||
import 'features/onboarding/screens/usp_screen.dart';
|
||||
import 'features/splash/splash_screen.dart';
|
||||
import 'features/home/home_screen.dart';
|
||||
@@ -147,6 +148,13 @@ GoRouter buildRouter(Ref ref) {
|
||||
path: '/onboarding/anon/usp',
|
||||
builder: (_, __) => const UspScreen(verified: false),
|
||||
),
|
||||
// Phase 4 Stage 4 — post-payment OS-notif gate. Sits under the
|
||||
// `/onboarding/*` carve-out so the auth/onboarding redirect rules let
|
||||
// anonymous + authenticated users transit through unhindered.
|
||||
GoRoute(
|
||||
path: '/onboarding/notif-gate',
|
||||
builder: (_, __) => const NotifGateScreen(),
|
||||
),
|
||||
// Alias for the OTP-blocked popup's "lanjut tanpa verif" exit. The
|
||||
// popup may fire from any point in the verified branch (after the
|
||||
// user has already passed ESP+USP), so we expose a stable terminal
|
||||
|
||||
Reference in New Issue
Block a user