Тёмный

Flutter :: Infinite loading and pull-to-refresh - the right way! 

David “oodavid” King
Подписаться 785
Просмотров 29 тыс.
50% 1

Опубликовано:

 

25 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 37   
@yashchandraverma3131
@yashchandraverma3131 4 года назад
After 2 days of searching, I find what I was looking for. Great Tutorial.
@xtreem057
@xtreem057 4 года назад
Did you use it with API instead of generating data from package? if yes then please share the code
@yashchandraverma3131
@yashchandraverma3131 4 года назад
@@xtreem057 That code belong to company if you urgently need, mail me ycverma005@gmail.com
@MaxProgramming
@MaxProgramming 3 года назад
That's great! I am learning Flutter as a JS dev and your channel needs more attention. Keep going ✌
@mi_zot
@mi_zot Год назад
David, are you going to make more videos? Your tutorials are excellent!
@khalidtech67
@khalidtech67 3 года назад
First well explained video i have seen on pagination but after page two reloaded 3 times
@gilosmilo
@gilosmilo 4 года назад
This is a great video, the whole process is very well explained and makes streams, something that I'm struggling with, super straightforward. It's exactly what I was looking for. Keep up the videos!
@yousour5112
@yousour5112 2 года назад
this is a great example, thank you 💯
@syedumair3172
@syedumair3172 2 года назад
Awesome! thank you so much for clean solution
@mars3142
@mars3142 4 года назад
Every infinite loading tutorials has the same issue. It checks if the maxScrollExtent is reached. But if you don't scroll to the last pixel, it won't load anything new. My idea is to load more data, if I create the CircularProgressIndicator in the last cell. This would be the much more elegant solution, in my opinion.
@davidking2846
@davidking2846 4 года назад
That's a great observation - I might make a new tutorial with that approach
@r00t67
@r00t67 3 года назад
Peter, i'm not sure, right deсision or not, but in my case i check itemIndex in listview builder, and if itemIndex > data.length - 5, i upload new batch of data
@nosmirck
@nosmirck 5 лет назад
Great video! keep it up! You got a new subscriber here!
@davidking2846
@davidking2846 5 лет назад
Thanks Luis!! Do you have any requests?
@timothyyirenkyi736
@timothyyirenkyi736 4 года назад
Great help👍🏾
@vzhen
@vzhen 4 года назад
Wow. U did a great tutorial !!! You r right. Most of the tutorial out there put all the things together. Your tutorial is what want. Thank you very much
@jacobladder638
@jacobladder638 4 года назад
Hi David, I'm dealing with a similar issue but I can't manage to get the desired result without a lil hack. So in this tutorial, you're controlling the flow of the stream. The stream isn't changing, you're manually loading data into the stream. I've attached my streambuilder to a firestore document. And when you reach the bottom of the list it changes the variable of the stream. (limit 20 => 40 for examples). And this naturally wipes all data and attaches to a new listener. Which causes it go to top of the list, which i then have to control using a scroll controller after loading to bring back to position. It works. But I want to know if you can suggest an improvement?
@gihantrash6459
@gihantrash6459 5 лет назад
Great video, Please can you share me how to get json data from a URL instead of mock data inside _getExampleServerData function
@davidking2846
@davidking2846 4 года назад
Hi Gihan - all you need to do is to have a function that returns Future Read through this article, specifically on section 3 which walks through changing the response structure: flutter.dev/docs/cookbook/networking/fetch-data
@vzhen
@vzhen 4 года назад
Could you explain and make a tutorial about flutter scoped_model?
@bio10tv83
@bio10tv83 4 года назад
This is really great. I have one question: Does the stream builder fetch all the data from a server? Let's say I have an API endpoint that returns 1000 posts, How StreamBuilder will do it such a way that the application will only fetch 30, then 60, ......?
@davidking2846
@davidking2846 4 года назад
The listview.builder will only render what's visible (plus a couple off screen for speed). If your API is paginated then you can make a new request as you scroll.
@noname-in7ll
@noname-in7ll 4 года назад
Firstly thank you very much for this nice tutorial. Im new in Flutter so i wanted to ask if this also suitable for data being fetched as Json?
@sanction0509
@sanction0509 4 года назад
Can you also make the same tutorial with firebase this time? It would be really helpful. I tried implementing the firebase in the _getExampleServerData but the firebase query returns Future
@robertluios3615
@robertluios3615 2 года назад
good video
@nikitakoboldin8670
@nikitakoboldin8670 3 года назад
Nice
@lennard4454
@lennard4454 3 года назад
Refresh on top also scrolls automatically "scrolls"?! In a chat or similiar history would be "the update". So in this scenario its not an update and we actually just want to "append" it. How is this possible?
@lennard4454
@lennard4454 3 года назад
One idea is to trick by setting an item count that has not been loaded yet ...
@xtreem057
@xtreem057 4 года назад
Sir, can u please share the code of this procedure with API. you replied to one comment but it is still confusing. because flutter documentation uses Model.fromJson but you are using Model.fromServerMap. It will be very helpful if you share the code.
@wibudesu205
@wibudesu205 4 года назад
i'm confusing how to doing this in bloc pattern
@vzhen
@vzhen 4 года назад
Need more explain on stream controller
@leonfang6839
@leonfang6839 4 года назад
how to deal with the stream error of http
@rammeharsharma2930
@rammeharsharma2930 4 года назад
Please do code for better understanding pre written code technique is not good. This is my personal opinion
@davidking2846
@davidking2846 4 года назад
Thanks for the feedback, I'll try a few "live coding" videos in the future
Далее
No Code App Development is a Trap
9:31
Просмотров 280 тыс.
Complex Animations in Flutter using Rive | Flare
15:44
Просмотров 225 тыс.
новое испытание
00:40
Просмотров 90 тыс.
РОК-СТРИМ без ФАНЕРЫ🤘
3:05:16
Просмотров 1,3 млн
Каха понты
00:40
Просмотров 356 тыс.
If __name__ == "__main__" for Python Developers
8:47
Просмотров 409 тыс.
Flutter Infinite Scroll Pagination with Rest API
26:02
Top 30 Flutter Tips and Tricks
6:50
Просмотров 564 тыс.
Pagination in Flutter using Firebase's Cloud Firestore
18:44
Top 10 Widgets every Flutter Developer should know!
17:17
новое испытание
00:40
Просмотров 90 тыс.