List Method .sort() in Dart and Flutter
ฝัง
- เผยแพร่เมื่อ 22 ก.ค. 2024
- In this series, we will learn more about different list methods in #Dart and see how we can use them in #Flutter. In this episode, we have a closer look at the #sort method in different list types and see how we can use this method to order our table according to one column in a flutter application.
00:00 - Introduction
00:25 - Example one: sort method explanation on a list of integer
02:37 - Example two: sort method on the list of String
04:19 - Example three: sort and forEach method on a list of object
05:35 - Overview over the boilerplate code
06:12 - sort method in a DataTable
08:54 - Outro
Tools we use to grow our TH-cam channel
TubeBuddy Review - Manage Your TH-cam Channel Easily
www.tubebuddy.com/flutterexpl...
Our current TH-cam gear
🎙 Samson Mic: amzn.to/324Gpof
📟 Satechi USB-C Adapter: amzn.to/3kUdQ5M
💻 MacBook Pro: amzn.to/3iQ9MBx
📹 Lumix FZ1000: amzn.to/3g7tW8D
⭐️⭐️Helpful Ressources ⭐️⭐️
DartPad: dartpad.dev/566951631a731bfa1...
GitHub Repository: github.com/mt-tadayon/sort_tu...
⭐️⭐️Follow us ⭐️⭐️
Twitter Mahtab - / mahtab_dev
GitHub Mahtab - github.com/mt-tadayon
Twitter Max - / flutter_exp
Github Max - github.com/md-weber
Homepage - myracledesign.de/blog
⭐️⭐️ Support ⭐️⭐️
If you read this so far, thank you once more. If you like to support us, here are some links that could help us a lot.
Donation via Streamlabs - You are free to donate us a small amount, so we can keep up our work.
flutterexplained.live/
Amazon Affiliate Link - You buy for the same price and I get a small amount of it. This leads to an amazing Flutter book that I can recommend to every beginner of flutter amzn.to/2uOJXON
I look forward to the continuation of your lessons. I wish you and your loved ones health and happiness.
Thank you, we wish you the same for you.
Simple and easy explanation. Kudos!
You saved my life! Thank you very much.
I did not fully understand compareTo, now I do. Nice, thanks!
You are welcome!
excellent tutorial
Thank you! very nicely explained.
Glad it was helpful!
This is so good, awesome and unique tutorials. ❤️
Thank you so much! We always love to hear that.
Really helpfull!
Awesome if you think it was helpful :)
nice explanation, thanks for share the videos :)
Glad you liked it!
Do you know if flutter/dart has a built in class for sorting linked lists? Or could this be used? Struggling to find info on this.
AFAIK there is no built in function: api.flutter.dev/flutter/dart-collection/LinkedList-class.html
How do I sort `myFriends` alphabetically?
You will need to execute the sort function on myFriends and then implement the sort function
No wonder, why anybody didn't dislike the video.