Flutter: Shared Preferences In 5 Minutes | Data Persistence

Поділитися
Вставка
  • Опубліковано 22 лип 2024
  • Course to build a production-ready app 👉 robertbrunhage.com/course
    Join the Discord Community: / discord
    2 month of free premium Skillshare ➡️ bit.ly/Skillshare-Robert
    Let's learn how to trigger something to happen on our third startup of our app. To do that we will use Shared_preferences which is a plugin to store non trivial data!
    ⭐⭐⭐ SUPPORT ME ⭐⭐⭐
    Patreon: / robertbrunhage
    PayPal: www.paypal.me/RobertBrunhage
    ⭐⭐⭐ CONNECT WITH ME ON SOCIAL MEDIA ⭐⭐⭐
    Twitter: / robertbrunhage
    Instagram: / robertbrunhagedev
    Facebook: bit.ly/RobertDev
    ⭐⭐⭐ SETUP ⭐⭐⭐
    🎤 Mic: amzn.to/2TbXOKl
    🎧 Headphones: amzn.to/2XBRzxR
    🖱️ Mouse: amzn.to/2WQRetK (black)
    📷 Webcam: amzn.to/2SHkCfZ
    ⌨️ Keyboard: Ducky Shine 3 (brown switches)
    Subscribe ➡️ bit.ly/2SUyRhx
    Github: github.com/RobertBrunhage/You...
    If you want to support me in making high-quality videos consider my Patreon: / robertbrunhage

КОМЕНТАРІ • 28

  • @baeewele
    @baeewele 4 роки тому +48

    Most chaotic 5 minutes of my life

  • @mksmurff
    @mksmurff 5 років тому +5

    Simple and to the point. Great video thanks

  • @justusndegwa
    @justusndegwa 3 роки тому

    So simple yet so clear. Thanks a lot.

  • @michaeltolsma7717
    @michaeltolsma7717 3 роки тому

    Is there a way to use this for multiple key-value pairs? For example, if I wanted to store a bunch of review cards that have two sides?

  • @hamadawaled11
    @hamadawaled11 2 роки тому +1

    How can I store user's password in safe inside shared preferences

  • @RossittoS
    @RossittoS 3 роки тому

    Perfect! Thank you!

  • @DialecticalMaterialismRocks
    @DialecticalMaterialismRocks 2 роки тому

    A very helpful tutorial!

  • @edimoreira6405
    @edimoreira6405 4 роки тому +3

    Thank you :)

  • @albinsjolin649
    @albinsjolin649 4 роки тому

    Tack!

  • @oOMikyStarOo
    @oOMikyStarOo 5 років тому +4

    Nice video! What VSCode extension are you using to show where the block ends?

    • @RobertBrunhage
      @RobertBrunhage  5 років тому +2

      Thanks! The extension I use for the block ends is called "Bracket Pair Colorizer 2
      "

  • @borisllonalonso99
    @borisllonalonso99 4 роки тому

    Hi! Is there any way to store and object instead of a int or string? Thank you!

    • @chordfunc3072
      @chordfunc3072 4 роки тому +1

      One solution would be to just make a SomeObject.fromMap factory method on your object and a toMap() instance method.
      Then you could use jsonEncode to make you object into a string you can store in SharedPreferences.
      And use jsonDecode to convert your JSON string into a map that you can pass to the fromMap function to re-create your object.
      (Can't remember if the functions where actually called jsonEncode and jsonDecode but you get the idea)

  • @aamanmujawar7055
    @aamanmujawar7055 2 роки тому

    how to insert flutter list data in php sql ?

  • @ashishmagar5566
    @ashishmagar5566 4 роки тому

    can you please make videos on paypal and braintree integration

  • @amarsad5147
    @amarsad5147 3 роки тому +1

    thanks for this video but I wonder if shared preference is reliable . can I rely on it to know if the user uses the app for the fist time or should I do it with sql

    • @RobertBrunhage
      @RobertBrunhage  3 роки тому +1

      You can totally use shared preferences for that, and I would even recommend it instead of sql for such a thing!

  • @hamzaimran1991
    @hamzaimran1991 5 років тому +4

    Keep up the good work!
    First to comment!

  • @sudhirmanandhar4818
    @sudhirmanandhar4818 3 роки тому +1

    is shared preference secure ? can anyone with admin privileges access the key value pair and change it.

  • @irhas6555
    @irhas6555 3 роки тому

    What kind of reason to implement this?

    • @snotool
      @snotool 3 роки тому

      Persistent login for instance

  • @Klootviool17
    @Klootviool17 Рік тому

    I'm not planning on making a function for every key in my shared preferences.... Useless tutorial for me

  • @anothercath
    @anothercath 4 роки тому +5

    Why do you keep ending your sentences with an inflection? It sounds like you're asking me instead of telling me what to do. That's so weird man. Stop it.

    • @tullahnazari1035
      @tullahnazari1035 4 роки тому +5

      Maybe he speaks more than one language and doesn't realize he is doing this....pretty normal stuff here

    • @justusndegwa
      @justusndegwa 3 роки тому +1

      Why do people assume English is the ordained everyone's first language.