Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 184.108.40.206 release ready!
Owner and Founder. Opencart
In the last blog, we have learned how to create a widget and I think you guys must have understood it pretty well. In case you have missed the previous blog, then I suggest you read that first and then continue with this blog. The link to the Widget blog is here.
What are Widgets in Flutter?
Just as we use Recyclerview in Native Android to display the lists, In the flutter as we know everything is Widget. We can use the ListView widget to display the lists. It is a scrolling widget which displays its children one after another.
There are four options to create a ListView
Let us discuss the ListView.separated type to create a list view.
As we can see in the above code segment. We have created ListView.separated widget and also assigned a few of its attributes.
separatorBuilder creates a divider line between each item of the list.
scrollDirection will decide the direction of the list.
shrinkWrap will make the ListView only occupies the space it needs.
itemCount gives the count of the item.
itemBuilder draws each item in the list and takes item layout input which is _listLayout in this example.
this is just a widget which uses a few other widgets to create a layout which is used as the item layout.
That’s all for this blog. Thank you very much. This is Vedesh Kumar signing off.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.