Firebase Setup

RevenueCat makes managing in-app purchases and subscriptions a lot simpler by providing a wrapper around Apple’s StoreKit and Google Play Billing services. They also offer a robust and scalable backend infrastructure for in-app payments along with built-in purchase validation logic.

In this article, you will learn to configure in-app subscriptions in your FlutterFlow app with the help of RevenueCat integration.

You can learn more about RevenueCat here.
In-app purchases and subscriptions using RevenueCat only work on Android and iOS platforms. FlutterFlow doesn’t support in-app purchases on Web, macOS, Windows, and Linux.
Some more context on why you had to perform the above steps – to set up subscriptions on Google Play Console, the AAB/APK build file uploaded should have the BILLING permission enabled. Enabling RevenueCat on FlutterFlow adds that billing permission to your app.
You won’t be able to change or reuse a Product ID across any of your apps, even if the product is deleted.
While setting the Price, you can define it in your preferred currency and it should autofill for other local currencies along with their taxes.

Configure Firebase

Great, now we have our source code – time to set up hosting. We can do this all from the command line!

First, open your terminal in your project directory and initialize Firebase

  1. Select use an existing project and select your Firebase project. If you don’t have one yet, you can also select create a new project.
  2. Select Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys.
  3. For What do you want to use as your public directory? type build/web and hit enter.
  4. For Configure as a single-page app (rewrite all urls to /index.html)?, enter y (yes).
  5. For Set up automatic builds and deploys with GitHub?, enter n (but we’ll come back to this later!
  6. For File build/web/index.html already exists. Overwrite? enter y.

Set up is now complete – let’s give it a try

Download FlutterFlow project source code

We’ll need to download the full source code to deploy the app. This feature is available on the Standard, Team, and Pro plans for FlutterFlow.

There are two ways we can do this

Download FlutterFlow project source code

We’ll need to download the full source code to deploy the app. This feature is available on the Standard, Team, and Pro plans for FlutterFlow.

There are two ways we can do this

Preview & Deploy your web app

We need to build the web application, which will populate our build/web directory with the assets needed for hosting. Then, we can preview the URL:

flutter build web 

firebase hosting:channel:deploy myFirstPreview

 

Replace myFirstPreview with whatever you’d like to call your temporary deployment.

This will give you a URL you can use to preview your web application:

✔  hosting:channel: Channel URL (myFirebaseProject): 
https://myfirebaseproject--myfirstpreview-26ie0a1g.web.app 
[expires 2023-08-06 18:00:14]

Wrap Up

That’s it – you’ve deployed your web application! From here, you can go to your Firebase project console and see all the useful statistics on deployment history, app size, and more. You can also add a custom domain if you’d like to change it to one of your own.

Lorem Ipsum is simply dummy13

Featured Image

How to get 20 Testers in 48 Hours for FREE