CachedNetworkImage (Package of the Week)

Поділитися
Вставка
  • Опубліковано 14 жов 2024
  • Learn more about CachedNetworkImage → goo.gle/3wovaGc
    A picture is worth 1,000 words, but is it worth 2,000? Use CachedNetworkImage to stop re-downloading images in your Flutter apps 🌄💙
    This video is also subtitled in Chinese, Indonesian, Italian, Japanese, Korean, Portuguese, and Spanish.
    Learn everything about Flutter at → goo.gle/2WAhEN1
    Get more tips! → goo.gle/Flutte...
    Subscribe to Flutter! → goo.gle/FlutterYT
    #PackageoftheWeek #Widgets #Flutter
    product: Flutter - Development - User interface; fullname: Khanh Nguyen;

КОМЕНТАРІ • 53

  • @jehatdeniz8260
    @jehatdeniz8260 2 роки тому +51

    I cannot express that how great people flutter engineers are. These video made me better today. Thank you flutter team.

  • @seyhmusozbek
    @seyhmusozbek 2 роки тому +12

    I love the way it is always "and thats it". all of big works is in just some teeny tiny words.

  • @tiga2456
    @tiga2456 2 роки тому +5

    This is one of the greatest widgets ever. It will save us a lot of money 💸💸💸

  • @mohdubaid3502
    @mohdubaid3502 2 роки тому +3

    I was searching for this type of widget for so long ....😍😍

  • @Aspiiire
    @Aspiiire 2 роки тому +19

    Less money when dealing with Firestore great 😁

  • @ayoubelbadaoui7000
    @ayoubelbadaoui7000 2 роки тому +3

    i have been waiting for this kind of widget thank you flutter team

    • @ArtemFun
      @ArtemFun 2 роки тому +2

      it's a pretty old package. And it's not from the official flutter team.

  • @iamvikram
    @iamvikram 2 роки тому +2

    I am glad this package is being highlighted. I found this package so useful in my application.

  • @muhammedameen1543
    @muhammedameen1543 2 роки тому +4

    It's next level, flutter the future 🖤🖤

  • @takudzwamakusha5941
    @takudzwamakusha5941 2 роки тому +3

    Thank you flutter team!

  • @Lensbreak
    @Lensbreak 2 роки тому +7

    Does it replace the package flutter_cache_manager_firebase ?

    • @Problemsolver434
      @Problemsolver434 2 роки тому +2

      I think this is for all use cases, not just when you're using a firebase backend

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

      CachedNetworkImage accepts normal urls. When you use firebase storage you can use the firebase cache manager together with CachedNetworkImage to supply gs:// urls. You can set your own cache managers for the image widget. So it doesn't replace the package, they can be used together.

  • @santiagoguzman4259
    @santiagoguzman4259 2 роки тому +4

    Genial, muy bueno. Larga vida a Flutter!

  • @emphieishere
    @emphieishere 4 місяці тому +1

    This is the great package and the Flutter engineers are a great team, but i have one question. Why, even if it is cached, it still "loads" shortly the picture when i select the page in my bottomnavbar where this picture located. why can't it get initially loaded if it is already being cached?

    • @begula_real
      @begula_real 4 місяці тому +2

      Yup same question here. i was thinking to dowload pictures as local assets and then i do logic, if image link still the same as saved in sharedpref, then ImageAsset will be used instead. If no then delete the old one and dowload the new as local asset
      Still curious about how this widget works, cause the loading is just kinda same as ImageNetwork usual widget

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

    become more likely (Package of the month) 😁
    Well done.

  • @dennisk648
    @dennisk648 8 місяців тому

    I love how there are no docs on what types of caching are implemented. Is it based on "expires" , "etag", "max age"?

  • @andressilva5693
    @andressilva5693 2 роки тому +3

    What if the image hosted in the URL changes? That is, it's the same URL, but the image changes.. Would CachedNetworkImage update? Or is there a way to force it to update?

    • @ReneFloor
      @ReneFloor 2 роки тому +13

      I'm the maker of the package. It uses http cache-control headers to check the validity of the image. So the first important header is the max-age, for example when you set that to 1 day it will use the same (possible old) image for at least a day. After that day it will use the eTag to check if the image is still the same, or outdated. When it's still the same the backend should return a 304 (not modified) and the data usage will be minimal. When it's changed it will return a new file with new cache-control information.

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

      @@ReneFloor thanks for the wonderfull package, It was super handy in old times, but now Image.network caches as well, so can you please tell what the difference?

  • @Fuhrry
    @Fuhrry 2 роки тому +2

    So I can make the graphics on app load with this widget?

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

      Ya its a pro just that it would increase app data

  • @dizelvinable
    @dizelvinable 2 роки тому +3

    Great 👍

  • @lusaiblatheef
    @lusaiblatheef 2 роки тому +3

    Already using this

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

      me too. it's a pretty old package.

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

    Nice package but don't you hate seeing this weird naming like 'imageUrl' parameter here? It if were just 'url' would it be confusing to a user taking into account that the widget name is 'CachedNetworkImage'?'

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

      I agree, these are old choices and not weird enough for breaking changes (at least not to me).

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

      @@ReneFloor No need for breaking changes, just adding `url` field and putting deprecation warning to `imageUrl` (and coping its value to `url` if specified) will do

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

    How do you create this animation? Which application is used ?

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

    perfect, was hoping to have some kind of custom key, and there it is: `cacheKey` parameter exists! thanks!

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

    Please, allign audio volume on the intro and the voice in the video. IMO, the intro was too loud.

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

    Thanking you

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

      Glad you liked the video, Janam! Be sure to check out the links in the description for more great tips and tutorials 😎

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

    Doesn't Work For Firebase Fetched images?

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

    Does this cache the image in memory, or on disk?

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

    I just want to cache an image from url, for multipart request. Any idea?

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

    awesome

  • @هواتف-م9ر
    @هواتف-م9ر 2 роки тому +2

    Does it update when the url changes ?

  • @usamahaider7865
    @usamahaider7865 5 місяців тому

    can anyone help me out if we rendered multiple images in PageView take a time(3s) even local assets
    then what should we do?
    preCacheImage and didChangeDependecy did not wok

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

    Awesome

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

    How to move cached image to downloads folder so that user data can be saved

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

    Please improve the SEO in flutter web

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

    do you have this for video???

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

    Does it work with Web?

    • @ReneFloor
      @ReneFloor 2 роки тому +2

      It does work on web, but doesn't do any caching there. When you use the html renderer the browser manages the caching for you.

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

    Other departments of google are on one side, and flutter team on the other !
    Still flutter team wins

  • @ailikethough.6921
    @ailikethough.6921 2 роки тому +3

    I don't recommend this package. Your app will crash sometimes

    • @smootherthan.butter
      @smootherthan.butter Рік тому

      what really? how is happen?

    • @begula_real
      @begula_real 4 місяці тому

      Maybe you forgot to place error builder in case some unexpected error happened on loading?

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

    1st