Flutter Tutorial - Flutter Keys & Value Key

Поделиться
HTML-код
  • Опубликовано: 30 июл 2024
  • With the Flutter Value Key, you can preserve the state of Stateful Widgets while they are moving around within your Widget tree. The main Flutter Keys are ValueKey, UniqueKey, GlobalKey & ObjectKey.
    Click here to Subscribe to Johannes Milke: ruclips.net/user/JohannesMilke...
    👉 12 Week Flutter Training | heyflutter.com
    👉 Flutter Masterclass Courses | heyflutter.com/masterclass
    Source Code | github.com/JohannesMilke/key_...
    My Courses | heyflutter.com
    Follow Newsletter | johannesmilke.com/newsletter
    SUBSCRIBE HERE
    bit.ly/JohannesMilke
    SUPPORT & SPONSOR ME
    github.com/sponsors/JohannesM...
    RESOURCES
    Reorderable List View Tutorial: • Flutter Tutorial - Reo...
    GlobalKey Tutorial: • Flutter Tutorial - Flu...
    UniqueKey Tutorial: • Flutter Tutorial - Flu...
    Inherited Widget Tutorial: • Flutter Tutorial - Inh...
    Drag & Drop Widgets Tutorial: • Flutter Tutorial - Dra...
    App Internationalization Tutorial: • Flutter Tutorial - Loc...
    Create Flutter Project For App Stores Tutorial: • Flutter Tutorial - Cre...
    Detect Wife, Mobile & No Internet Tutorial: • Flutter Tutorial - Det...
    Detect App Background & App Closed Tutorial: • Flutter Tutorial - Det...
    Change App Icon Tutorial: • Flutter Tutorial - Cha...
    Native Splash Screen Tutorial: • Flutter Tutorial - Nat...
    TIMELINE
    0:00 Introduction Flutter Value Key
    1:08 Purpose Of Value Key
    1:31 Usecase: Remove Widget From List
    3:06 Add Value Key
    4:44 Add Value Key With Object
    5:53 Usecase: Reorderable ListView
    6:59 Add Value Key With Object Value
    SHARE | SUBSCRIBE | LIKE FOR MORE VIDEOS LIKE THIS
    *********
    SOCIAL MEDIA: Follow Us :-)
    Twitter | / heyflutter_
    Linkedin | / heyflutter
    LEARN MORE
    SOURCE CODE | github.com/JohannesMilke
    ARTICLES | / johannesmilke
    PLAYLISTS
    All Flutter Videos | • Flutter Tutorial - Flu...
    Widgets - Flutter | • Flutter Tutorial - Flu...
    Plugins - Flutter | • Flutter Tutorial - Flu...
    Animations - Flutter | • Flutter Tutorial - Tra...
    Designs - Flutter | • Flutter Tutorial - Flu...
    Firebase - Flutter | • Flutter Tutorial - Pag...
    State Management - Flutter | • Flutter Tutorial - Riv...
    CREDITS
    Copyright song "Corporate Technology" by scottholmesmusic.com
    #Flutter #Tutorial #JohannesMilke
    LIKE & SHARE & ACTIVATE THE BELL
    Thanks For Watching :-)
    bit.ly/JohannesMilke
  • НаукаНаука

Комментарии • 33

  • @HeyFlutter
    @HeyFlutter  Год назад

    This might help you :)
    👉 12 Week Flutter Training from Newbie to Expert: heyflutter.com
    Source Code: github.com/JohannesMilke/key_value_example

  • @gilsonconceicao5201
    @gilsonconceicao5201 Год назад

    Thanks for sharing. Precise and clear !

    • @HeyFlutter
      @HeyFlutter  Год назад

      You are welcome, @gilsonconceicao5201 😊

  • @DC-hz2su
    @DC-hz2su 3 года назад +4

    Great video Mike 👍.
    If anyone wants to assign a random id then I would suggest them looking at the UUID package for that. This package really helps when working with dynamic widgets like a list of fields as shown in the video.

    • @DC-hz2su
      @DC-hz2su 3 года назад +1

      @@HeyFlutter I completely understand what you mean and I appreciate the feedback.
      But I think I didn't clearly clarify my case in my previous comment. I'm using the UUID generated id as an object property which then gets assigned to the key which guarantees that it won't be changing in every build.
      I also looked at the video you recommended about the Unique key. I found that it is great for the use case you shown in it. But I think it won't fit in my case as I researched and found over StackOverflow that UniqueKey doesn't create strong random data. From this, I understood that it safely generates a random id for one user DB but that id could still match or found in other users DB. And then if that user data is to be used in a shared database in the future then that could lead to some probability of conflicts in DB as the data grows. I know that there would still be approaches to handle if something like that happens but from what I understood I think that UUID would be a clean approach in that case. I might be wrong here so please feel free to correct me.
      As always thank you for making the amazing content. Keep going 👍.

  • @karthikr9288
    @karthikr9288 3 года назад +3

    Learning a lot from your videos, thank you very very much 👍🏼

  • @mohammadb8041
    @mohammadb8041 8 месяцев назад

    Hi, big thanks for all you do for the community! I'm picking up a ton from you, and it's awesome.

    • @HeyFlutter
      @HeyFlutter  8 месяцев назад

      You are welcome, @mohammadb8041 😊

  • @thidiyaslimbu464
    @thidiyaslimbu464 3 года назад

    I had always wondered what ValueKeys were and how I would utilise them. Glad, I know them now.✌️✌️

  • @mohammadal-sadiqh.3871
    @mohammadal-sadiqh.3871 2 года назад

    The best tutorials on youtube.
    Thanks a lot

  • @salahuddinshaikh7847
    @salahuddinshaikh7847 3 года назад

    Nice explanation

  • @excellencemichel4875
    @excellencemichel4875 3 года назад

    You are a doctor of flutter. Thank you bro

  • @vinothvino1275
    @vinothvino1275 2 года назад

    Thanks, Great explanation 👌

  • @spinoff2011
    @spinoff2011 2 года назад

    Great explanation! Thanks!

  • @jiren8991
    @jiren8991 3 года назад +1

    I thought that I'd be confused for eternity when it comes to keys in flutter, because even the official video of flutter team couldn't explain me the about it, however your video was very helpful in this case.

    • @jiren8991
      @jiren8991 3 года назад +1

      @@HeyFlutter thanks

  • @user-or7ji5hv8y
    @user-or7ji5hv8y 3 года назад

    Great stuff

  • @void4904
    @void4904 3 года назад

    Awesome 👍🙏

  • @TrikNgonlen
    @TrikNgonlen 3 года назад

    lovely, as always...

  • @RaymondAtivie
    @RaymondAtivie 3 года назад

    Great comment thank you

  • @hectorprx
    @hectorprx 3 года назад

    Thanks

  • @yogameleniawanp6368
    @yogameleniawanp6368 2 года назад

    the key is complicated but this is truly amazing tutorial and explanation, thank you..

  • @antd1857
    @antd1857 3 года назад

    Thank you very much. I just could not find the error in my code. Watched a little and tried a little but still errors persisted. Fortunately I watched the video till the end. It worked for me only after I used the example of 'user.name'. Thanks

  • @mohsinikram8921
    @mohsinikram8921 3 года назад

    Complicated topic but Easy Explanation with example :)

  • @ankitparmar547
    @ankitparmar547 3 года назад

    150st Like !
    Keep up the good work :)

  • @iGhostr
    @iGhostr 3 года назад

    I literally spent 5 hours trying to fix the reorderable List bug. Now it's too late but thanks for showing your workaround

    • @iGhostr
      @iGhostr 3 года назад

      @@HeyFlutter sorry for saying workaround. I'll check the link and thanks for explaining the concept to me.
      Greeting from Hungary (•‿•)

  • @humamalbach2785
    @humamalbach2785 3 года назад

    Thank you for this tutorial. I don't know what is the best way to store product images on a good cloud and cloud for node js,,database mongoodb ,,flutter ,,back End node js ,, This is my first app thank you

    • @humamalbach2785
      @humamalbach2785 3 года назад

      thank you very very much 👍🏼and Sorry I don't speak English well

  • @arnaudduquenoy2061
    @arnaudduquenoy2061 3 года назад

    If you are not the best FLUTTER INSTRUCTOR you come close :) maybe it would be great also to produce tutorials about advanced STATE MANAGEMENT or advanced modern UI implementation with implicit/explicit animations (also with use of the ANIMATION package) and RIVE code driven animations ? Because the real advantage of FLUTTER over the other cross platform solutions is its UI capabilities :) THEY ARE ONLY IDEAS. I would never tell you what to do ! Once again thank you for your very good videos

    • @arnauduquenoy75
      @arnauduquenoy75 3 года назад

      @@HeyFlutter indeed you already covered so many things Johannes :) I also liked the longer tutorials like the DDD tuto from Resocoder that teach people like me to DRIVE a real world project

  • @dewanderers
    @dewanderers 3 года назад

    Please tell how to implement the more option.
    Means when click on the three dots (normally available on the right top corner) then a list of options pop up there.
    Please let us know how we can do it in flutter.

    • @dewanderers
      @dewanderers 3 года назад

      @@HeyFlutter thanks 😊