Flutter Tutorial - Drag & Drop In ListView

Поділитися
Вставка
  • Опубліковано 31 гру 2024

КОМЕНТАРІ • 61

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

    This might help you :)
    👉 12 Week Flutter Training from Newbie to Expert: heyflutter.com
    Source Code: github.com/JohannesMilke/drag_drop_listview_example
    Drag & Drop Widgets - Draggable & DragTarget Tutorial: ua-cam.com/video/Bc0qB1jtHBk/v-deo.html
    Drag & Select In GridView Tutorial: ua-cam.com/video/DozNBmc79L4/v-deo.html
    Reorderable ListView Tutorial: ua-cam.com/video/0bRv3mNCj8o/v-deo.html
    Expandable ListView Tutorial: ua-cam.com/video/ReUa_Ws8EsY/v-deo.html
    Single & Multiple Selection In ListView Tutorial: ua-cam.com/video/8FVkuixvNHc/v-deo.html
    Search & Filter In ListView Tutorial: ua-cam.com/video/oFZIwBudIj0/v-deo.html
    Animated List Tutorial: ua-cam.com/video/rDFJhIobj7I/v-deo.html
    Tinder Swipe Cards Tutorial: ua-cam.com/video/v1wofhoutBk/v-deo.html
    Showcase & Highlight Widgets Tutorial: ua-cam.com/video/zbWPtF-V7g0/v-deo.html
    Slidable Tutorial: ua-cam.com/video/cswTKnXtSqk/v-deo.html
    Dismissable Tutorial: ua-cam.com/video/cswTKnXtSqk/v-deo.html
    Focused Menu Tutorial: ua-cam.com/video/Vttl7WGtkgg/v-deo.html
    Sticky Headers In ListView Tutorial: ua-cam.com/video/QVxd0K_74Pc/v-deo.html
    ListView Tutorial: ua-cam.com/video/bJGRmldntOI/v-deo.html
    ListView & ScrollController Tutorial: ua-cam.com/video/XWfg_d2t_Hk/v-deo.html
    GridView Tutorial: ua-cam.com/video/2MVXP6nNzoQ/v-deo.html

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

    Thanks Johannes, for this in-depth demo of this package, looks like a really useful package, implementing all these features from scratch would be quite tedious, so for a use case where these features are needed, this looks like a great option. This package definitely goes to my shortlist of great ones.

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

    Thanks johannes very good explanation. Saves lot of my time.

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

      Glad to hear that, You are welcome @tehniatmirza1439! 😊

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

    Thanks Johannes
    , is it possible to remove the draghandle and drag it from anywhere in the container?

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

      Thank You Kağan Kılıç! Follow this link: pub.dev/packages/draggable_widget
      I hope you will get your answer 🙂

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

    I would love to see how to implement onItemDraggingChanged

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

    Such a great video!!! Thank you so much!!!!

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

      You’re most welcome, @jardelnunes6363! 🙂

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

    Good job! Thank you for sharing this. I'm new in flutter. I just wanted to know it is possible to switch a DragAndDropItem to a widget too???
    Due to the length of my code, I'm ganna build the draggble items in a separate file.

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

    Hello! Is there a new version of this? I think the package has some errors

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

      Hey 😊, @janinequintal670! Check out the latest version of package here: pub.dev/packages/drag_and_drop_lists

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

    Is there a way to store the index when the items are reordered so that it survives a hot restart?

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

      Thank You Poom 2! Follow this link: stackoverflow.com/questions/53908025/flutter-sortable-drag-and-drop-listview
      I hope you will get your answer 🙂

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

    🙄😲 Now that's some timing! I totally need this for an app I'm working on now. Thanks!

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

    I need to also pin a list tile there is widget called pinable listview but it doesn't work for me since my list tiles name aren't just int, there is string too. What am I supposed to do?

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

      Thanks, maryam Fallah! 🙂 try to perform your operations through list's item index instead of name

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

    Thanks Mike,
    However, I did try to retrieve the final data from (mostly likely from ...newListItems) for further processing but failed. It seems it is something out of my capacity to get the data from a Widget List like this "newListItems". The log data from my console is Instance of 'DragAndDropItem". Do you have any solution for this issue? Thank you very much!

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

      Thank you, Mike Lo! 🙂. Try to paste the error message with your question whenever you face any issue or error.

  • @duongngo9924
    @duongngo9924 6 місяців тому

    how to make lists arranged vertically can you guide me, please

    • @HeyFlutter
      @HeyFlutter  6 місяців тому +1

      Thank You @duongngo9924! Follow this link: stackoverflow.com/questions/54512171/horizontal-listview-inside-a-vertical-scrollview-in-flutter
      I hope you will get your answer 🙂

    • @duongngo9924
      @duongngo9924 6 місяців тому

      @@HeyFlutter maybe i didn't ask correctly, the lists in the video are arranged vertically, i want to display the listview(best fruits, good fruits and disliked fruits) from left to right horizontally, how can i do that, please help me.

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

    Thank for amazing tutorial!
    How can i put outer list view inside other list or move inner list item to outside?

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

      ​@@HeyFlutter Thanks for your reply,
      I have required a reorderable list view(folder/file) with features like we can move list view item to up-down and we can move an item(file) into another item(folder). So how can i achive this using this Drag & Drop plugin.

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

      Thank You Yogendrasinh Jadeja! Follow this link: stackoverflow.com/questions/45270900/how-to-implement-nested-listview-in-flutter
      I hope you will get your answer 🙂

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

    Really nice and explained perfectly. I'm wondering if there is an option not to move the item from one list to another but copy it?? I would like to create lists with a bunch of tiles stored in a master list. These tiles can be copied to the new list once or more to build, store and use it. I think after dragging the item from source to target the source has to build again with it's old state but the target should keep the new state.

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

      Thank You devsef! Follow this link: stackoverflow.com/questions/58389591/how-to-copy-list-values-to-another-list-in-flutter
      I hope you will get your answer 🙂

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

      @@HeyFlutter thanks for your answer. The project is on hold but if I ever come back to it I give it a try. These drag and drop for lists will be used for building forms and checklists with drag and drop. That’s why the entries of the master list need to be copied. Some questions might be asked repeatedly in one form/checklist.

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

    Great explanation. It is very helpful.
    Actually I am stuck now. How do I get the final reordered list (Not list of widgets). Since it is a list of widgets I am not sure how to get the final list of reordered items where I can store in DB.

    • @mohamed-om9fj
      @mohamed-om9fj 3 роки тому

      @@HeyFlutter could you send me an example because i can't understand this point ?

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

      Thanks, deepak n! 🙂 Good question! Simply build your list here 3:08 based on model objects such as List. At 6:26 you would then modify also the model list instead of the widget list. Within the build method you need to convert the model list again to a widget list.

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

      @@HeyFlutter Sorry, how to modify the model list instead of the widget list? Could you elaborate more so that I can figure out how to do so, thanks....

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

      @@mikelo9320 Hi, could you solve this problem? I am also interested in to know how to get final reordered list (not list of widgets). Thanks !!

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

    Thank you very much for this video Johannes, this is Just awsome,
    I Just have a question is it posible to edit or delete an ítem inside a list by clicking on it or maybe by clicking on an icon on the ítem?

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

      Thank You andrew gold! Follow this link: stackoverflow.com/questions/55142992/flutter-delete-item-from-listview
      I hope you will get your answer 🙂

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

    great video thx for sharing. It would be great to combine it with left and wright swipe to delete an item. Thx again.

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

      Thanks, also Stefaan Deconinck! 🙂 your idea is interesting why not you try it at your own by taking reference from this video : ua-cam.com/video/kN9Yfd4fu04/v-deo.html

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

    how to recover the items on the second list from the DragAndDropList?

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

      Thank You Cine!. Can you please explain your question a little bit? I didn't get it

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

      @@HeyFlutter The items values from the secon list, example i move a item from best fruits to goog fruits, i need to send the items from the second list to a server.

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

      @@HeyFlutter Thanks for answer.

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

    Can we create app for raspberry-pi with the help of flutter. If possible how can do this? If possible please make on this topic.

  • @Th_SnOw
    @Th_SnOw 7 місяців тому

    amazing, thank you so much❤❤

    • @HeyFlutter
      @HeyFlutter  7 місяців тому +1

      You are welcome, @Th_SnOw 😊

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

    Please make video of Grid View Drag and Drop

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

      Thank you 😊, WikkiOnIlluminati! Check out this video on Gridview drag and drop items: ua-cam.com/video/DozNBmc79L4/v-deo.html

  • @이진우-i7s
    @이진우-i7s 3 роки тому

    Thanks for the great video !!!! >ㅁ< Is there any way for user to add item in the list !?!?

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

      Thank You 이진우! Follow this link: stackoverflow.com/questions/55400529/flutter-add-item-to-list
      I hope you will get your answer 🙂

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

    And how I can save the new index in my sqflite? 🤔

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

      @@HeyFlutter I mean the reoder the listview. The new index.

  • @이진우-i7s
    @이진우-i7s 3 роки тому

    Hello! Thanks for the amazing video! I have a question and I really want to have personal talk with you!! How much it will take to have personal lesson with you online? :>

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

    Is there a way to do this but using firebase database and without modifying said database? that is, each user can modify the position of the list without affecting the other users. That could be a good challenge! Excellent video!

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

      Thanks, Alexis Mejía! 🙂
      Yes, nothing is impossible. You just need to fetch data from firebase database and store it in local list. Perform all the operations on the local list only.

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

      @@HeyFlutter now i know it! After 1 year of experience :) thanks for your videos. There are still be very helpful for me!

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

      @@HeyFlutter now i know it! After 1 year of experience :) thanks for your videos. There are still be very helpful for me!

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

    Liked & subscribed
    Thanks

  • @Raviraj-ww5uo
    @Raviraj-ww5uo 3 роки тому

    How to drag and drop only drag handle..? Just like youtube playlist drag and drop.Please make tutorial as soon as possible.

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

    Very god job, thank for your videos!

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

    Thumbs down because you linked to it from medium and it was at 100% volume, where my normal youtube is at 10% volume so it destroyed my ears now I have a hearing damage.
    Don't embed this into blog please.

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

      Thanks for your feedback, d7ffab97! 🙂