Keeping it local: Managing a Flutter app's data

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ก.ค. 2024
  • Data locality can make or break your app's performance. Sometimes storing data in the cloud isn't feasible. Or sometimes data needs to be kept locally for caching or until the user's on a reliable internet connection. Here, we'll explore strategies and methods for storing data locally. We start from simple key/value stores and work our way up into more complex persistence mechanisms.
    Speaker: Andrew Fitz Gibbon
    Source repository → goo.gle/2JpSkIb
    Learn everything about Flutter at → goo.gle/2WAhEN1
    Subscribe to Flutter! → goo.gle/FlutterYT
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 74

  • @chichebem
    @chichebem 3 ปีที่แล้ว +34

    Thanks for the video. It explains some of the basic concepts on how to manage data locally taking advantage of disk-read speed and I definitely picked up on the concepts. Please a future video on how to sync local data to the cloud once internet connection is established will be greatly appreciated.

  • @thkp-eng
    @thkp-eng 3 ปีที่แล้ว +8

    Super important topic! It's something that we've spent a lot of time striking the right balance (what to cache, what is absolutely critical to have fresh from the server.) Thanks for making this video!

  • @kirill4531
    @kirill4531 3 ปีที่แล้ว

    A great video for beginners on how and why store data locally!
    Thank you

  • @fegyi001
    @fegyi001 3 ปีที่แล้ว +6

    Very informative, easy to follow, thanks a lot!

  • @MultiChicao
    @MultiChicao 3 ปีที่แล้ว

    Excellent explanations!! Thank you for sharing your knowledge. 👏🏽👏🏽👏🏽

  • @RishikeshShede
    @RishikeshShede 3 ปีที่แล้ว

    Thanks, man! This was really helpful and much needed 💯💖

  • @333tuberob
    @333tuberob 3 ปีที่แล้ว

    This video is perfect timing for me. Performance using local storage is crucial. You explained the concepts Really we'll. I would imagine this is important for flutter on the web, with different storage options to engineer than mobile. All good 👌 cheers.

  • @rebarius
    @rebarius 2 ปีที่แล้ว

    Omg, why did I never view this awesome video ✨ thank you so much Andrew Fitz 💪🏼 I understood every single word 👌🏼

  • @markusmcgee
    @markusmcgee 3 ปีที่แล้ว

    Good video. One of the better Flutter videos I have seen.

  • @timofrommann3292
    @timofrommann3292 3 ปีที่แล้ว +1

    It's not only informative. I love listening to Andrew. Such a joy and never booring

  • @hasansalim1868
    @hasansalim1868 3 ปีที่แล้ว

    Thanks Andrew. Very nice presentation

  • @symbally
    @symbally 3 ปีที่แล้ว

    good content and happily able to digest, thanks for making this

  • @AJ-nn9xn
    @AJ-nn9xn 3 ปีที่แล้ว +2

    Brilliantly presented thanks. Can you do a follow up showing best practice for refreshing locally stored / cached data once internet is available again?

  • @_Amilio_
    @_Amilio_ 3 ปีที่แล้ว

    Awesome lecture thank you. Moar of these pls!

  • @hoggish
    @hoggish 3 ปีที่แล้ว

    Really good explanation Thank you

  • @netdevilzzz
    @netdevilzzz 2 ปีที่แล้ว

    Great video. Thanks!

  • @stingtao
    @stingtao 2 ปีที่แล้ว

    great explanation!

  • @srourganoush5941
    @srourganoush5941 2 ปีที่แล้ว

    Thank you, God bless you

  • @NOPerative
    @NOPerative 2 ปีที่แล้ว

    AWESOME vid!

  • @ChanakaJ
    @ChanakaJ 2 ปีที่แล้ว

    Brilliant !!!

  • @sumailsasumi1294
    @sumailsasumi1294 3 ปีที่แล้ว +7

    Midnight course 😴, need some coffee here

    • @keshavchetty5174
      @keshavchetty5174 3 ปีที่แล้ว

      Same here....midnight studying. Ain't nothing better.

  • @warperone
    @warperone 3 ปีที่แล้ว

    do you have series of similar videos - great way to learn flutter

  • @tuobraun
    @tuobraun 3 ปีที่แล้ว +2

    Brilliant lecture. Thank you so much

  • @ExtraServingsBTS
    @ExtraServingsBTS 3 ปีที่แล้ว +1

    sweet! App feels much snappier.

  • @Pedro5antos_
    @Pedro5antos_ 2 ปีที่แล้ว

    Thanks a lot

  • @arifyogawiranto1687
    @arifyogawiranto1687 3 ปีที่แล้ว

    Great explanation. What extension in vscode to flutter?

  • @jonathaalves3743
    @jonathaalves3743 3 ปีที่แล้ว +4

    What if I wanted to save files locally in a structured database until I eventually got connected to the internet, how could I do that sync thing?

  • @samuelmayowa3857
    @samuelmayowa3857 3 ปีที่แล้ว

    Nice video

  • @Wilhelmification
    @Wilhelmification 3 ปีที่แล้ว +5

    I think it will be useful to have video about console commands

    • @kirill4531
      @kirill4531 3 ปีที่แล้ว +2

      Yeah, especially how you can enter the app's data folder in AndroidStudio

  • @housemajaliwa
    @housemajaliwa 2 ปีที่แล้ว +1

    Lovely

  • @anmolkapoor1068
    @anmolkapoor1068 3 ปีที่แล้ว +4

    It would have been useful if you would have explained a bit more on how to delete those cached images automatically after we hit a certain memory level.

    • @kirill4531
      @kirill4531 3 ปีที่แล้ว

      There is a cache manager property, I think that's what you need

    • @anmolkapoor1068
      @anmolkapoor1068 3 ปีที่แล้ว

      @@kirill4531 yeah I know about that, but I wanted to know how to use that efficiently or perfectly according to different needs.

  • @nicolasdupere
    @nicolasdupere 3 ปีที่แล้ว +1

    Flutter forever

  • @nwparker7
    @nwparker7 3 ปีที่แล้ว +6

    How did you get the waiting times to display in the terminal? Looks useful

    • @kirill4531
      @kirill4531 3 ปีที่แล้ว

      .addListener to this question :)

  • @youssefmuhamad3213
    @youssefmuhamad3213 3 ปีที่แล้ว +1

    I'm still waiting a simple and out of the box solution for state management in Flutter, like React Hooks and Context API. There are a bunch of cool built-in widgets already, invest more time creating some cool abstraction for us.

  • @DrMilde
    @DrMilde 3 ปีที่แล้ว

    Hi Andrew, nice explanation, thx, please note,that CachedNetworkImage is working fine, but after some time (say a couple of weeks) you get cache errors, images are somehow not readable anymore ... this will eventually crash the app 😭 only solution I found, is clearing the Cache from time to time.
    Best wishes jt

  • @kevinliu6002
    @kevinliu6002 3 ปีที่แล้ว +1

    Could you list the common uses of shared preferences? I understand it is not for critical data, but that's all I know right now.

    • @kirill4531
      @kirill4531 3 ปีที่แล้ว

      Go to officiall Flutter docs site

  • @nargessadeghi3915
    @nargessadeghi3915 3 ปีที่แล้ว

    can you please make a course about comparing database packages? like sqflite, moor, hive, objectDB, sembast?
    or can anyone introduce any?

  • @aimnblbol
    @aimnblbol 3 ปีที่แล้ว

    Anybody knows how he connected to the ios device through the command line? I wish he said so in the video. It would have helped. Nice video. Thanks

  • @fabiosabbion4930
    @fabiosabbion4930 3 ปีที่แล้ว +1

    Loved the video, but light theme in vs code should be illegal

  • @PrakashIndorkar
    @PrakashIndorkar 3 ปีที่แล้ว

    Hi .. I'm waiting for next video .. how you'll manage api provider data and local data to keep them in sync.

  • @JuanGuillermoFuentes
    @JuanGuillermoFuentes ปีที่แล้ว +1

    Hi guys, I need some help: We are working in a streaming app for android tv (in flutter) and after a few days the screen goes to black, exist some option to refresh automaticly (once a day for example) the caché to fix that problem?

  • @jagmit
    @jagmit 3 ปีที่แล้ว +1

    Which extension do you use for the TODO comment at 25:20?

    • @hanselsusanto
      @hanselsusanto 3 ปีที่แล้ว +1

      Use TODO Tree at VS Code

  • @kirill4531
    @kirill4531 3 ปีที่แล้ว

    I see you can access app's files in the terminal, why I can't access this folder in AndroidStudio in File Explorer tab?

    • @Ainigma
      @Ainigma 3 ปีที่แล้ว

      vs code maybe

  • @crnofficial
    @crnofficial 3 ปีที่แล้ว +1

    🕺🏾

  • @gripzy7571
    @gripzy7571 3 ปีที่แล้ว +3

    What is the best way to save API keys

    • @aminabekir903
      @aminabekir903 3 ปีที่แล้ว

      Save it in .env file

    • @kirill4531
      @kirill4531 3 ปีที่แล้ว

      Those that are present in Android Manifest file you can't do anything about it, they will be visible any way.
      Those that you can use in the code try to encode them

  • @user-gl9pf3io6r
    @user-gl9pf3io6r 3 ปีที่แล้ว

    are there app with flutter?
    I do not see anywhere
    flutter -> fake ?

  • @shaysframe1472
    @shaysframe1472 หลายเดือนก่อน

    Why you never hide the terminal....

  • @vrajendramandloi5917
    @vrajendramandloi5917 2 ปีที่แล้ว

    hi ,, i am using flutter SDK 1.20 a bit old not yet upgraded to 2.10+ can you suggest me how to create external Storage Folders in Android?? This is Quite important to me as Android 11 is not allowing me to create external Storage. Kindly reply me or ping me directly...

  • @scottgodfrey7855
    @scottgodfrey7855 3 ปีที่แล้ว +2

    "Without data, the app would be uninformed." Was that an intentional pun?

  • @yazidkrayem7408
    @yazidkrayem7408 3 ปีที่แล้ว +2

    Thank you for this video, but images still loading slow even if we save it and call locally

    • @yazidkrayem7408
      @yazidkrayem7408 3 ปีที่แล้ว

      @teriitube I was using Flutter-web, and I had images inside the assets folder. The problem was with the image size(over 1Mb). I published it, and the images were loading slower than I expect. Whatever I should use flashy for those images. (I will use it for the next project :D)

  • @UmairAhmadh
    @UmairAhmadh 3 ปีที่แล้ว +3

    Don't look at this and complain, this is for my reference:
    -------------------------------------------
    9:34 Shared Preference
    23:43 Caching images to disk
    31:52 SQFLite

  • @Mendez_84
    @Mendez_84 3 ปีที่แล้ว

    But you said *state* ment

  • @jeroboam4486
    @jeroboam4486 3 ปีที่แล้ว +12

    I don't want to be negative but frankly I don't see the point of this 45 minutes video to say that "yeah you can store data locally" ... duh.
    Now I would have loved a video about how to sync your local unconnected data to the cloud once you're connected.

    • @BillyMahmood
      @BillyMahmood 3 ปีที่แล้ว +1

      True

    • @mrunfunny
      @mrunfunny 3 ปีที่แล้ว +1

      true, but for beginners, this video does a great job at explaining why we need to store data locally, what are benefits and different ways to store it.

  • @scottishking9731
    @scottishking9731 3 ปีที่แล้ว +1

    I’ve encountered problem after problem downloading flutter five days and four times deleting everything and redownloading and its still not working ready to delete it all permanently. Absolute joke this. They want people to get into tech, but make the process of it that problematic it puts us off. And on top of that flutter doesn’t even have any kind of customer service and i joined reddit just to try and get help and still not further forward. Cant even speak with anyone for help with android studio either tech companies with no tech support laughable.

    • @coppice8412
      @coppice8412 2 ปีที่แล้ว +1

      Hm, I felt like the Flutter setup was one of the easiest that I had to do

  • @shedrackejeh6542
    @shedrackejeh6542 3 ปีที่แล้ว +4

    Why is statement management a nightmare in flutter

    • @khulegu
      @khulegu 3 ปีที่แล้ว +4

      when is it a nightmare? there are so many easy solutions like provider, stream.

    • @sim632
      @sim632 3 ปีที่แล้ว

      It's not, it's pretty good actually