Skip to main content

purchases_flutter: ^8.3.2

purchases_ui_flutter: ^8.3.2

 

When I configure RevenueCat using PurchaseConfiguration(“key"), the application’s back button handling is overridden and stops working. When I press the device back button from navigation or even use the back gesture, I get the following log in the console.

 

D/RevenueCatUI(21343): Paywalls: Close paywall initiated
 

 

@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Center(
child: PaywallFooterView(
offering: offering, // Optional Offering object obtained through getOfferings,
onRestoreCompleted: (CustomerInfo customerInfo) {
// Optional listener. Called when a restore has been completed.
// This may be called even if no entitlements have been granted.
},
onDismiss: () {
// Dismiss the paywall, i.e. remove the view, navigate to another screen, etc.
// Will be called when a purchase succeeds.
},
contentCreator: (bottomPadding) => YourPaywall(bottomPadding),
),
),
),
);
}


The back button and swiping are normal ways for the user to close the paywall. If you'd like to change this, you can use the PaywallView directly so you have full control over how to display it and how to allow users to dismiss it. See our docs here: https://www.revenuecat.com/docs/tools/paywalls/displaying-paywalls#android

 

Or is the back button not working even when not viewing the paywall, i.e. on any screen of your app?