Open thanhle1547 opened 2 years ago
Thank you for the PR. Exactly what I was looking for. However will be cool if it is possible to calculate the height and width without specifying the maxRun
Now you don't need to specify the maxRun
@Mayb3Nots
Now you don't need to specify the
maxRun
@Mayb3Nots
Wow it seems like the RenderBox already does the calculation and the maxRun
wasn't required in the first place? Ive tried to understand how it works under the hood but its very complicated with tons of math 😂. I wonder how did you come to learn to implement so low-level widgets? I also have a question about performance, since from what I can tell we do calculations on intrinsic height and width so will it be costly in terms of performance if the children's are complicated and in huge amounts of numbers? Thanks again you inspire me to learn more about flutter low level framework.
it seems like the RenderBox already does the calculation and the
maxRun
wasn't required in the first place?
The maxRun
is used to check whether to continue layout other children.
how did you come to learn to implement so low-level widgets?
I start coding! 😁 (Besides taking time to study Flutter source code & read API docs).
do calculations on intrinsic height and width so will it be costly in terms of performance if the children's are complicated and in huge amounts of numbers?
This video gives some explanations which specifically help with your question.
Keep going 🚀
Hi @thanhle1547, thanks again for your hard work. However while using your PR when there is 15 item in the children's I'm getting an error RangeError (index): Invalid value: Valid value range is empty: -1
in line 905. Any advice?
Hey @letsar, I implemented the #2 enhancement request (Wrapped items). The example is also updated.
The picture below is an example that demonstrates how to control maximum number of rows/columns via parameters
maxRun
andmaxItemPerRun
.