Fireship · @fireship
In App Purchases in Flutter
Uploaded June 27, 2019 · Length 10:54
Summary
Implement consumable in-app purchases in Flutter for iOS and Android using the official plugin.
- flutter in-app purchases
- consumable purchases
- ios in-app purchases
- android in-app purchases
- flutter plugin
- mobile app development
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
in 2018 the game candy crush made an
- 0:02
estimated four million dollars from
- 0:03
in-app purchases and microtransactions
- 0:05
per day and like most of the top
- 0:07
grossing mobile apps they sell useless
- 0:09
digital products to casual gamers in
- 0:11
today's video you'll learn how to
- 0:12
implement consumable in-app purchases
- 0:14
and flutter allowing you to sell your
- 0:16
own digital products on iOS or Android
- 0:18
via microtransactions not just doing
- 0:20
this for money if you're new you're like
- 0:27
and subscribe and you can find these
- 0:29
source code on fire ship io and congrats
- 0:31
to andrei hava you won the t-shirt from
- 0:33
last week sweater video let's start by
- 0:35
talking about how in-app purchases work
- 0:36
from a high level and how to use them
- 0:38
successfully in your app the first thing
- 0:40
you should know is that there are three
- 0:41
main types of in-app purchases
- 0:42
consumables are products that are
- 0:44
depleted that can be purchased multiple
- 0:45
times like coins in a game in Summa
- 0:47
bowls are what we're focused on in this
- 0:49
video and we'll build a feature that
- 0:50
allows the user to buy some gems consume
- 0:52
them and then buy some more the second
- 0:54
type is a non consumable which is
- 0:56
something the user purchases once like
- 0:57
an upgrade and then should never have to
- 0:59
purchase it again in the future and the
- 1:01
third type is a subscription which gives
- 1:02
the user access to the purchase for a
- 1:04
limited amount of time now these
- 1:06
concepts apply to both iOS and Android
- 1:08
but there are some subtle yet important
- 1:10
differences that we'll look at when we
- 1:11
get into the code in a few minutes and
- 1:12
another thing you should know about
- 1:13
in-app purchases is that they're almost
- 1:15
always required if you're selling
- 1:17
digital content that means API is like
- 1:19
stripe and PayPal are out of the
- 1:20
question
- 1:21
but luckily flutter just recently
- 1:22
released an officially supported plugin
- 1:24
for in-app purchases that provides a
- 1:26
unified interface across iOS and Android
- 1:28
that's what we'll be using in this video
- 1:29
but it is currently in beta so things
- 1:31
may change in the future now when it
- 1:33
comes to making millions of dollars per
- 1:34
day you need to build an app that's both
- 1:36
highly addictive and that targets a wide
- 1:38
audience you should design your
- 1:45
interface around dopamine hits and
- 1:46
compulsion loops in other words reward
- 1:48
the user on a regular basis but always
- 1:50
keep them chasing the dragon so now that


