A Flutter app to show how to implement in-app purchase using the in-app-purchase package

Overview

Flutter in-app purchase

A Flutter project to show to implement in-app purchase using the in_app_purchase package

Simple UI but it's okay 🥲 😉

WhatsApp.Video.2022-07-24.at.11.04.51.PM.mp4

Getting Started

To getting start with this project please make sure to take those steps done:

  • Flutter 3.0.0 or higher installed

  • Have your app bundle sent to stores for production to activate in-app purchase, see here steps to release flutter apps

  • Create product and subscription on stores. we'll use product with ID in.app.purchase.testeproduct and subscription in.app.purchase.testesubscription. See here how to do it for Android and IOS

We'll use in_app_purchase package. This plugin supports in-app purchases (IAP) through an underlying store, which can be the App Store (on iOS) or Google Play (on Android)

This project has examples of code for the following tasks:

  • Listening to purchase updates

  • Connecting to the underlying store

  • Loading products for sale

  • Restoring previous purchases

  • Making a purchase

  • Upgrading or downgrading an existing in-app subscription

  • Accessing platform specific product or purchase properties (for purchase validation purposes)

NOTE: Please remember to always verify purchase on backend side before delivery it to user. Did add code section where you can see how to extract those data to send to your own backend

NOTE: This project was written using riverpod as state management but you can apply the same logic for others of your preference, feel free to change 😏

Packages

in_app_purchase ^3.0.6

hooks_riverpod ^1.0.4

flutter_hooks ^0.18.5+1

Contribuition

If you notice an expected behavior or would like to have any feature related in-app purchase implemented, then feel free to report or contribute with your pull request

Linkedin LinkedIn

You might also like...

Flutter Local Notifications - Learn how to implement local notifications into both Android and iOS using flutter_local_notifications plugin.

Flutter Local Notifications - Learn how to implement local notifications into both Android and iOS using flutter_local_notifications plugin.

Flutter Local Notifications Example Flutter Local Notifications - Learn how to implement local notifications into both Android and iOS using flutter_l

Nov 29, 2022

A quick sample app on how to implement a friend list and a profile page in Flutter.

A quick sample app on how to implement a friend list and a profile page in Flutter.

FlutterMates All code resides in the /lib folder: there's no Android / iOS specific code needed. The article, slides and how this came to be, is here.

Jan 8, 2023

The app to demo animation with Flutter by implement Facebook reactions

The app to demo animation with Flutter by implement Facebook reactions

Facebook Reactions Animation Description The app to demo animation with Flutter by implement Facebook reactions. Watch the demo video for more clarity

Dec 30, 2022

Flutterbiometric - A sample app showing how to implement biometric authentication in flutter

Flutterbiometric - A sample app showing how to implement biometric authentication in flutter

Flutter Tutorial - Fingerprint & Touch ID - Local Auth By using Flutter Local Au

Jan 1, 2022

judou app implement by flutter

judou app implement by flutter

JuDou Judou is my favorite app,so I implemented it in flutter UI 首页 详情 订阅 发现 订阅作者 用户句子 用户收藏 话题 Getting Started This project is a starting point for a

Nov 23, 2022

Example implement todo with BLOC flutter

exampletododevindo A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you start

Aug 9, 2021

Demo project to implement MVU architecture in a Flutter application

flutter_mvu A playground project for implementing MVU in Flutter CICD Automated

Dec 16, 2021

An easy to implement custom switch created for Flutter.

An easy to implement custom switch created for Flutter.

flutter_switch An easy to implement custom switch created for Flutter. Give it a custom height and width, border for the switch and toggle, border rad

Dec 6, 2022

Flutter plugin to implement a Boom Menu, with icons, title, subtitle, animated FAB Icons and hide on scrolling.

Flutter plugin to implement a Boom Menu, with icons, title, subtitle, animated FAB Icons and hide on scrolling.

Flutter Boom Menu Usage The BoomMenu widget is built to be placed in the Scaffold.floatingActionButton argument, replacing the FloatingActionButton wi

Aug 1, 2022
Owner
António Nicolau
Mobile developer
António Nicolau
Flutter ticket pass - A Flutter Widget to display the details of a ticket/pass purchased by customers and display the details of the purchase

ticket_pass_package A Flutter package to display the purchase of a ticket/pass along with additional details such as list of buyers. The source code i

null 40 Aug 13, 2022
Flutter Application to purchase movie tickets, search for a movie, view movie details and proceed to select seats and movie times.

Flutter Application to purchase movie tickets, search for a movie, view movie details and proceed to select seats and movie times.

Stanley Valenzuela 6 May 25, 2022
react-native native module for In App Purchase.

Documentation Published in website. Announcement Version 8.0.0 is currently in release candidate. The module is completely rewritten with Kotlin and S

dooboolab 2.3k Dec 31, 2022
Show a draggable floating chat icon button and show messages on screens

Show a draggable floating chat icon button and show messages on screens Features A widget for displaying a chat icon (or custom widget) on top of a ba

CU Apps 4 May 5, 2022
This is a repository for Flutter Focused Menu, an easy to implement package for adding Focused Long Press Menu to Flutter Applications

Focused Menu This is an easy to implement package for adding Focused Long Press Menu to Flutter Applications Current Features Add Focused Menu to Any

Paras Jain 160 Dec 26, 2022
A new Flutter package which helps you to implement Ticket Widget in your app.

flutter_ticket_widget A new Flutter package which helps you to implement Ticket Widget in your app. The source code is 100% Dart, and everything resid

Mohak Gupta 112 Dec 22, 2022
CircularProfileAvatar is a Flutter package which allows developers to implement circular profile avatar

CircularProfileAvatar is a Flutter package which allows developers to implement circular profile avatar with border, overlay, initialsText and many other awesome features, which simplifies developers job. It is an alternative to Flutter's CircleAvatar Widget.

Muhammad Adil 85 Oct 5, 2022
A Package to implement, change and use Themes in Flutter

Modern Themes Github: https://github.com/Jules-Media/Modern_Themes Pub.dev: https://pub.dev/packages/modern_themes About With this Plugin you can impl

Jules Media 2 Jun 22, 2022
A Dart package that helps to implement value based equality without needing to explicitly override == and hashCode.

Simplify Equality Comparisons Overview Being able to compare objects in Dart often involves having to override the == operator as well as hashCode. No

Felix Angelov 747 Jan 8, 2023
Challenge yourself every weekend with flutter. Join me to implement challenging UI & digital designs using Flutter.

Weekend With Flutter This is my new challenge. Every weekend, I want to implement challenging UI & digital designs using Flutter. you can join me with

Payam Zahedi 16 Feb 24, 2022