Stripe + Supabase with edge function and problem with FlutterFragmentActivity

Project Settings

Hi FlutterFlow community,

I'm implementing Stripe payments in my FlutterFlow app using Supabase Edge Functions for the backend. The integration works great on web, but I'm running into Android-specific requirements that need MainActivity modifications.

Current Setup:

  • FlutterFlow app with Supabase auth & database

  • Stripe payments via custom actions using flutter_stripe package

  • Supabase Edge Functions handling payment intents

  • Everything works perfectly on web

The Problem:
On Android, Stripe requires:

  1. MainActivity to extend FlutterFragmentActivity instead of FlutterActivity

  2. Android theme to use Theme.MaterialComponents instead of default theme

The Question:
Is there any way to make these Android-specific modifications while still being able to:

  • Deploy/publish through FlutterFlow's built-in deployment

  • Use FlutterFlow's automatic Play Store/App Store upload features

  • Maintain the ability to make UI changes in FlutterFlow editor

What I've tried:

  • Exporting code and making manual changes works, but then I lose FlutterFlow deployment

  • Looking for alternatives that don't require MainActivity changes

  • Considering hybrid approaches (web payments + mobile app store versions)

Ideal solution would be:
Either a way to configure these Android requirements within FlutterFlow, or a payment integration approach that doesn't require MainActivity changes but still supports mobile PaymentSheet (not just web checkout).

Has anyone successfully implemented Stripe mobile payments in FlutterFlow while keeping deployment capabilities? Any suggestions or alternative approaches would be greatly appreciated!

Thanks in advance!

What have you tried so far?
  1. Exported code and manual MainActivity changes - Successfully modified MainActivity.kt to extend FlutterFragmentActivity and updated styles.xml to use Theme.MaterialComponents. This works perfectly but breaks FlutterFlow's deployment pipeline.

  2. FlutterFlow's built-in Stripe integration - Explored using Firebase Cloud Functions instead of Supabase, but this would require migrating my entire backend infrastructure and additional Firebase costs.

  3. Web-only payments with mobile fallback - Currently using Stripe Checkout Sessions for web, but this provides poor UX on mobile (browser redirect instead of native PaymentSheet).

  4. Community tutorial implementations - Tried the Supabase + Stripe tutorial from FlutterFlow community using customerEphemeralKeySecret approach, but still hits the MainActivity requirement.

  5. Conditional initialization - Attempted to initialize Stripe only on web platform (kIsWeb) to avoid Android issues, but this limits mobile functionality.

Did you check FlutterFlow's Documentation for this topic?
Yes
2