Search is not available for this dataset
url
stringlengths
28
28
title
stringlengths
17
100
published
stringlengths
20
20
id
stringlengths
16
31
videoId
stringlengths
11
11
text
stringlengths
2
370
start
float64
0
2.36k
end
float64
2.22
2.37k
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t841.0
nIiHM41PPbQ
If the item modulus 15 equals zero, 31 request, but also that can be true if the index is zero itself.
841
854
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t854.0
nIiHM41PPbQ
So if it's not zero, then we will do that.
854
863
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t863.0
nIiHM41PPbQ
And then what we'll do is call model request more data.
863
872
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t872.0
nIiHM41PPbQ
And now we can go ahead and create this method.
872
876
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t876.0
nIiHM41PPbQ
This will always be a future since you're requesting more data.
876
879
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t879.0
nIiHM41PPbQ
You can make it a sync. And the way I like to show the present indicator is by adding in a new index, adding in a new item and then just displaying a present loaded inside of the item.
879
896
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t896.0
nIiHM41PPbQ
To test it out, let's first bold the UI so that we are not in the dock to know what we're looking for when we do add it.
896
905
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t905.0
nIiHM41PPbQ
So I'm going to insert at zero of insert the carrot.
905
913
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t913.0
nIiHM41PPbQ
That's what I'll use as unique identifier to indicate that it's a busy, it's a busy item.
913
919
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t919.0
nIiHM41PPbQ
And you can do the same thing.
919
921
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t921.0
nIiHM41PPbQ
You don't have to.
921
922
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t922.0
nIiHM41PPbQ
You don't have to use that.
922
923
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t923.0
nIiHM41PPbQ
You can use your hash for your class that you're using or whatever value you can make sure that it is a busy item.
923
931
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t931.0
nIiHM41PPbQ
Usually if I have a complex class or data object, I'll just put the Boolean value in it.
931
937
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t937.0
nIiHM41PPbQ
And I'll either set that to true or false.
937
940
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t940.0
nIiHM41PPbQ
It'll be false by default.
940
941
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t941.0
nIiHM41PPbQ
And when I create a busy item, I'll set that to true.
941
945
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t945.0
nIiHM41PPbQ
And so we'll insert that at zero, which is refresh.
945
949
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t949.0
nIiHM41PPbQ
So there should be that over there.
949
952
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t952.0
nIiHM41PPbQ
And then now in the home view, I can check over here.
952
958
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t958.0
nIiHM41PPbQ
Just to keep things simple, this will be a lot different.
958
963
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t963.0
nIiHM41PPbQ
If this equals equals the carrot, I want to show circular progress indicator.
963
980
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t980.0
nIiHM41PPbQ
So there we go.
980
982
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t982.0
nIiHM41PPbQ
So whenever we add a new item with this value, it'll show the circular progress indicator.
982
988
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t988.0
nIiHM41PPbQ
Something I like to do is not have those kind of values floating around.
988
996
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t996.0
nIiHM41PPbQ
So I'll create a constant string called loading indicator value.
996
1,003
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1003.0
nIiHM41PPbQ
Sit up to that, and I'll set that to this.
1,003
1,013
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1013.0
nIiHM41PPbQ
And in the home view, I will do that.
1,013
1,018
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1018.0
nIiHM41PPbQ
And then, yeah, so when we request, we want to show the loading indicator at the bottom so we can just add it into the view.
1,018
1,026
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1026.0
nIiHM41PPbQ
List item, show loading item.
1,026
1,032
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1032.0
nIiHM41PPbQ
And what that will do is insert an item at the bottom with a value loading indicator value.
1,032
1,045
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1045.0
nIiHM41PPbQ
And once that is there, we want to call notify listeners.
1,045
1,050
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1050.0
nIiHM41PPbQ
And then we also want to hide instead of hide remove loading item.
1,050
1,063
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1063.0
nIiHM41PPbQ
We can either remove the value itself, loading indicator value.
1,063
1,071
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1071.0
nIiHM41PPbQ
And then we can call notify listeners.
1,071
1,075
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1075.0
nIiHM41PPbQ
Or we can remove the last item by using a remove last.
1,075
1,080
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1080.0
nIiHM41PPbQ
But then you have to make sure that you remove before you add the new data.
1,080
1,084
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1084.0
nIiHM41PPbQ
And for now, let's do it this way.
1,084
1,086
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1086.0
nIiHM41PPbQ
And I will do it another way.
1,086
1,090
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1090.0
nIiHM41PPbQ
If there's any problems, we'll do it a different way.
1,090
1,093
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1093.0
nIiHM41PPbQ
So the first thing I want to do when we request more data is obviously log that we are requesting more data.
1,093
1,100
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1100.0
nIiHM41PPbQ
So we can see how many times we do that.
1,100
1,105
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1105.0
nIiHM41PPbQ
And then my favorite thing is to delay a call.
1,105
1,111
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1111.0
nIiHM41PPbQ
It gives you some kind of indication of how things will work.
1,111
1,115
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1115.0
nIiHM41PPbQ
And then we're going to go and say remove the loading item.
1,115
1,120
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1120.0
nIiHM41PPbQ
Go to the home view.
1,120
1,122
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1122.0
nIiHM41PPbQ
In the home view, if we reach the request limit threshold, which is 15,
1,122
1,128
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1128.0
nIiHM41PPbQ
and the index is zero, we'll request more data.
1,128
1,132
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1132.0
nIiHM41PPbQ
So let's just restart this guy.
1,132
1,136
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1136.0
nIiHM41PPbQ
Make sure we remove this from the view constructor.
1,136
1,141
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1141.0
nIiHM41PPbQ
Restart, it should start off at zero.
1,141
1,145
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1145.0
nIiHM41PPbQ
And when we get to 11-ish, you should see an exception.
1,145
1,151
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1151.0
nIiHM41PPbQ
And I actually struggled with this exception a bit.
1,151
1,155
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1155.0
nIiHM41PPbQ
And it's because it's calling notify listeners while these items are still being built.
1,155
1,161
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1161.0
nIiHM41PPbQ
I don't know why it's causing it in this build, but in a previous set of code that I built, nothing like this happened.
1,161
1,169
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1169.0
nIiHM41PPbQ
It just rebuilt the model and then it re-rendered it, like all of it.
1,169
1,174
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1174.0
nIiHM41PPbQ
But one way you can get past this is by calling schedule binding.instance.add postframe callback.
1,174
1,189
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1189.0
nIiHM41PPbQ
Let's all call this function once after the view render has been completed.
1,189
1,194
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1194.0
nIiHM41PPbQ
If we rebuild the code and we scroll up, we'll see request more data.
1,194
1,201
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1201.0
nIiHM41PPbQ
It'll show the loading indicator and then it should be removed after five seconds, which is perfect.
1,201
1,209
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1209.0
nIiHM41PPbQ
And now it does it again and that we're gonna have to fix.
1,209
1,213
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1213.0
nIiHM41PPbQ
But we can only do that once we've added more data.
1,213
1,216
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1216.0
nIiHM41PPbQ
So let's fake out all of that information.
1,216
1,220
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1220.0
nIiHM41PPbQ
So when we do this, all we want to do at this point is say items will generate some new information.
1,220
1,229
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1229.0
nIiHM41PPbQ
New list items equals list of string generate 15 more.
1,229
1,238
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1238.0
nIiHM41PPbQ
Gonna get to the index and then we're gonna add in title.
1,238
1,244
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1244.0
nIiHM41PPbQ
And because we don't have a page number, which we'll add in soon, I'm just gonna say what was that now?
1,244
1,253
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1253.0
nIiHM41PPbQ
I'm just gonna rent out the title, Neil, we'll remove the loading item.
1,253
1,260
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1260.0
nIiHM41PPbQ
We'll add the items, items.add all new list items and then we remove the loading item.
1,260
1,270
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1270.0
nIiHM41PPbQ
So we'll set over here for five seconds and then it'll add all the new values.
1,270
1,276
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1276.0
nIiHM41PPbQ
And then we'll set over here again for five seconds and it will add all the new values.
1,276
1,281
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1281.0
nIiHM41PPbQ
And yeah, you'll keep doing that infinitely continuously.
1,281
1,287
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1287.0
nIiHM41PPbQ
And it's a pretty simple solution, I think, to the actual problem, which is requesting more information.
1,287
1,297
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1297.0
nIiHM41PPbQ
Some people use the scroll controller, which you will then have to indicate an arbitrary number of pixels,
1,297
1,305
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1305.0
nIiHM41PPbQ
which is different per device.
1,305
1,307
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1307.0
nIiHM41PPbQ
So you're gonna have to use percentages and then paste on certain things like the safe padding for the notches.
1,307
1,317
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1317.0
nIiHM41PPbQ
Those will differ as I've seen before.
1,317
1,320
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1320.0
nIiHM41PPbQ
So this is more reliable because you can choose which index you want to start requesting your information from.
1,320
1,327
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1327.0
nIiHM41PPbQ
And yeah, so the first problem we have is if you see down here, as you scrolling,
1,327
1,335
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1335.0
nIiHM41PPbQ
it keeps on requesting more data, even though you don't get back to the bottom.
1,335
1,340
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1340.0
nIiHM41PPbQ
So one way to fix that, or the way I think I want to fix that is by having a page number.
1,340
1,348
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1348.0
nIiHM41PPbQ
We'll have integer, page, we'll call it current page and we'll set that to zero.
1,348
1,358
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1358.0
nIiHM41PPbQ
When we request more information, we will update the current page.
1,358
1,366
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1366.0
nIiHM41PPbQ
And the way we'll calculate the page value is when we request the information, we will pass in the page number.
1,366
1,378
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1378.0
nIiHM41PPbQ
And that will depend on the index.
1,378
1,380
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1380.0
nIiHM41PPbQ
And I don't know if you know where I'm going with this, the index.
1,380
1,385
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1385.0
nIiHM41PPbQ
The index on the outside has a cool property to whenever it gets to a certain point, if you divide it by the limit threshold,
1,385
1,395
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1395.0
nIiHM41PPbQ
you'll get the page number for the next page.
1,395
1,398
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1398.0
nIiHM41PPbQ
So if this gets to 15, so if index plus one gets to 15, if we divide that by the limit request threshold,
1,398
1,408
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1408.0
nIiHM41PPbQ
this is to var item number equals index plus one.
1,408
1,418
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1418.0
nIiHM41PPbQ
And so what we can do is simply take the item number divided by the threshold, can't we do approximate?
1,418
1,431
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1431.0
nIiHM41PPbQ
Why is that not working?
1,431
1,434
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1434.0
nIiHM41PPbQ
USB board approximately divided by this is like rounding.
1,434
1,441
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1441.0
nIiHM41PPbQ
This is like putting to an integer.
1,441
1,444
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1444.0
nIiHM41PPbQ
It's equivalent to this guy over here.
1,444
1,447
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1447.0
nIiHM41PPbQ
So if you do that, it truncates the Boolean, passes it through as an integer.
1,447
1,451
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1451.0
nIiHM41PPbQ
So now when we request more data, we'll say request more data for page and we'll print out page request.
1,451
1,462
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1462.0
nIiHM41PPbQ
So let's restart this guy.
1,462
1,466
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1466.0
nIiHM41PPbQ
And if you go through now, you'll see it requests for page one and it loads that.
1,466
1,473
https://youtu.be/nIiHM41PPbQ
Flutter Tutorial | Build a continuos scrolling list | My code refactor process
2019-09-20T17:34:59Z
nIiHM41PPbQ-t1473.0
nIiHM41PPbQ
And now we have the information with page one, it goes to page two and it loads that.
1,473
1,479