Skip to main content
Question

PaywallView is freezing when opening it. (frame drop)

  • December 8, 2025
  • 2 replies
  • 29 views

Forum|alt.badge.img+4

Hi, not sure why, but in my flutter app even in --release mode, when i click to open the PaywallView it kind of freezing a little bit…

Demo with --release:
https://drive.google.com/file/d/1RAyQG2awd1Q1bKXJYh3G9GLryo0pcYU8/view?usp=sharing

P.s. with `await RevenueCatUI.presentPaywallIfNeeded` is working awesome and there is no freeze. The single issue there is that i want to not have it in a `showCupertinoSheet`…


Here’s my code:

import 'package:flutter/material.dart';
import 'package:purchases_ui_flutter/purchases_ui_flutter.dart';

class PremiumButtonLime extends StatelessWidget {
const PremiumButtonLime({super.key});

@override
Widget build(BuildContext context) {
return ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFFBFE737),
foregroundColor: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
side: const BorderSide(color: Colors.black, width: 1.5),
),
),
onPressed: () => Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => Scaffold(
body: SafeArea(
child: PaywallView(onDismiss: () => Navigator.of(context).pop()),
),
),
),
),
child: const Text('PRO', style: TextStyle(fontWeight: FontWeight.w800, fontSize: 20)),
);
}
}


 

purchases_flutter: ^9.9.10

purchases_ui_flutter: ^9.9.10

2 replies

alejandra-wetsch
RevenueCat Staff
Forum|alt.badge.img+6

Hey ​@Elisei Nicolae

Thank you for reaching out and providing code snippets along with a demo screen recording of what you’re seeing!

The only reason I can think that could cause this effect is that the PaywallView needs to fetch the Offering and Paywall data at the moment the View is displayed, and that small freeze you see could be due to the Paywall loading.

Have you tried passing the Offering to the PaywallView and seeing if the freezing still happens?

You can do so like this:

Offerings offerings = await Purchases.getOfferings();

final selectedOffering = offerings?.getOffering(offering) ?? offerings?.current;

PaywallView(offering: selectedOffering, onDismiss:{....})

You can ensure that the offerings are loaded after configuration, so they are already loaded when the Paywall is presented.

I hope this helps!


Forum|alt.badge.img+4

Hey ​@alejandra-wetsch

i tried, but still there is lag / freezing the same..
 

import 'package:flutter/material.dart';
import 'package:purchases_flutter/purchases_flutter.dart';
import 'package:purchases_ui_flutter/purchases_ui_flutter.dart';

class PremiumButtonLime extends StatefulWidget {
const PremiumButtonLime({super.key});

@override
State<PremiumButtonLime> createState() => _PremiumButtonLimeState();
}

class _PremiumButtonLimeState extends State<PremiumButtonLime> {
Offering? _offering;

@override
void initState() {
super.initState();
_loadOffering();
}

Future<void> _loadOffering() async {
final offerings = await Purchases.getOfferings();
if (mounted) {
setState(() {
_offering = offerings.current;
});
}
}

void _showPaywall() {
print('_offering =$_offering');
Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => Scaffold(
body: SafeArea(
child: PaywallView(
offering: _offering,
onDismiss: () => Navigator.of(context).pop(),
),
),
),
),
);
}

@override
Widget build(BuildContext context) {
return ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFFBFE737),
foregroundColor: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
side: const BorderSide(color: Colors.black, width: 1.5),
),
),
onPressed: _showPaywall,
child: const Text(
'PRO',
style: TextStyle(fontWeight: FontWeight.w800, fontSize: 20),
),
);
}
}