Fireship · @fireship

In App Purchases in Flutter

Uploaded June 27, 2019 · Length 10:54

In App Purchases in Flutter

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.

  1. 0:00

    in 2018 the game candy crush made an

  2. 0:02

    estimated four million dollars from

  3. 0:03

    in-app purchases and microtransactions

  4. 0:05

    per day and like most of the top

  5. 0:07

    grossing mobile apps they sell useless

  6. 0:09

    digital products to casual gamers in

  7. 0:11

    today's video you'll learn how to

  8. 0:12

    implement consumable in-app purchases

  9. 0:14

    and flutter allowing you to sell your

  10. 0:16

    own digital products on iOS or Android

  11. 0:18

    via microtransactions not just doing

  12. 0:20

    this for money if you're new you're like

  13. 0:27

    and subscribe and you can find these

  14. 0:29

    source code on fire ship io and congrats

  15. 0:31

    to andrei hava you won the t-shirt from

  16. 0:33

    last week sweater video let's start by

  17. 0:35

    talking about how in-app purchases work

  18. 0:36

    from a high level and how to use them

  19. 0:38

    successfully in your app the first thing

  20. 0:40

    you should know is that there are three

  21. 0:41

    main types of in-app purchases

  22. 0:42

    consumables are products that are

  23. 0:44

    depleted that can be purchased multiple

  24. 0:45

    times like coins in a game in Summa

  25. 0:47

    bowls are what we're focused on in this

  26. 0:49

    video and we'll build a feature that

  27. 0:50

    allows the user to buy some gems consume

  28. 0:52

    them and then buy some more the second

  29. 0:54

    type is a non consumable which is

  30. 0:56

    something the user purchases once like

  31. 0:57

    an upgrade and then should never have to

  32. 0:59

    purchase it again in the future and the

  33. 1:01

    third type is a subscription which gives

  34. 1:02

    the user access to the purchase for a

  35. 1:04

    limited amount of time now these

  36. 1:06

    concepts apply to both iOS and Android

  37. 1:08

    but there are some subtle yet important

  38. 1:10

    differences that we'll look at when we

  39. 1:11

    get into the code in a few minutes and

  40. 1:12

    another thing you should know about

  41. 1:13

    in-app purchases is that they're almost

  42. 1:15

    always required if you're selling

  43. 1:17

    digital content that means API is like

  44. 1:19

    stripe and PayPal are out of the

  45. 1:20

    question

  46. 1:21

    but luckily flutter just recently

  47. 1:22

    released an officially supported plugin

  48. 1:24

    for in-app purchases that provides a

  49. 1:26

    unified interface across iOS and Android

  50. 1:28

    that's what we'll be using in this video

  51. 1:29

    but it is currently in beta so things

  52. 1:31

    may change in the future now when it

  53. 1:33

    comes to making millions of dollars per

  54. 1:34

    day you need to build an app that's both

  55. 1:36

    highly addictive and that targets a wide

  56. 1:38

    audience you should design your

  57. 1:45

    interface around dopamine hits and

  58. 1:46

    compulsion loops in other words reward

  59. 1:48

    the user on a regular basis but always

  60. 1:50

    keep them chasing the dragon so now that