Skip to content

The content behind the paywall reacts when users click on the paywall background. #1023

Description

‼️ Required data ‼️

Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.

There are a lot of things that can contribute to things not working. Having a very basic understanding of your environment will help us understand your issue faster!

Environment

  • Output of flutter doctor
    Flutter (Channel stable, 3.19.3, on macOS 14.4 23E214 darwin-arm64, locale en-US)
    • Flutter version 3.19.3 on channel stable at /Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ba39319843 (11 days ago), 2024-03-07 15:22:21 -0600
    • Engine revision 2e4ba9c6fb
    • Dart version 3.3.1
    • DevTools version 2.31.1
  • Version of purchases-flutter
    6.24.0
  • Testing device version e.g.: iOS 15.5, Android API 30, etc.
    iOS 17.4
  • How often the issue occurs- every one of your customers is impacted? Only in dev?
  • Debug logs that reproduce the issue
  • Steps to reproduce, with a description of expected vs. actual behavior

Describe the bug

  1. Create a remotely configurable paywall.
  2. Create simple app.
Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Purchases.configure(PurchasesConfiguration(''));
  runApp(const MyApp());
}

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

  Future<void> _presentPaywall() async {
    await RevenueCatUI.presentPaywall();
  }

  @override
  Widget build(BuildContext context) {
    var numbers = List.generate(10, (i) => i);
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          leading: IconButton(
            onPressed: () => _presentPaywall(),
            icon: const Icon(Icons.add),
          ),
        ),
        body: GridView.builder(
          gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, mainAxisSpacing: 10.0, crossAxisSpacing: 10.0),
          itemCount: numbers.length,
          itemBuilder: (BuildContext context, int index) {
            return GestureDetector(
              onTap: () => debugPrint(index.toString()),
              child: Container(color: Colors.amber),
            );
          },
        ),
      ),
    );
  }
}
  1. Click Add icon to present paywall.
  2. Start clicking somewhere on the paywall background.

Expected behavior:
The content behind the paywall shouldn't react when users click on the paywall background.
Actual behavior:
The content behind the paywall reacts when users click on the paywall background and, in this example, prints indexes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions