Feature Request: Add displayMode option to presentPaywall
Currently, when presenting a paywall using the RevenueCat UI library, its appearance (light or dark mode) is determined solely by the user's system-wide settings. There is no way for the application to override this and enforce a specific theme.
This is particularly problematic for applications that implement their own in-app theme switching. If a user has set the app to dark mode, but their OS is in light mode, the paywall will appear in a light theme, creating a jarring and inconsistent user experience.
I would like to propose adding an optional displayMode parameter to the presentPaywall and presentPaywallIfNeeded functions. This would allow developers to specify whether the paywall should be displayed in light, dark, or be left to the system default.
Here's a suggested implementation for the Capacitor plugin's definitions.ts:
export enum PaywallDisplayMode {
LIGHT = "light",
DARK = "dark",
}
export interface PresentPaywallOptions {
offering?: PurchasesOffering;
displayCloseButton?: boolean;
displayMode?: PaywallDisplayMode; // 'light', 'dark', or unset for system default
}
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!