This is the final chapter in my series of Flutter Basics. In this chapter, we will have a look at how to implement listviews in Flutter.
PS: This is the final chapter in my series of Flutter Basics. If you feel like checking out the remaining parts, the links are at the end of the article.
In this chapter, we will have a look at how to implement listviews in Flutter.
ListView is the most commonly used widget when we have to display a list of items. Think contact apps, posts on Twitter/FB/Instagram. All of them implement ListViews in one way or the other. In Android we would implement this using Recycler Views. In iOS we would implement this using UITableView. The Flutter Team has given us ListViews to implement the same. Let’s have a look at how ListViews work.
To begin with, ListView is a simplified version of CustomScrollView holding a single SliverList. The difference in this is that a lot of the heavy work has been done by the Flutter team and what we have is a simpler way to display a list of items. We will not be covering SliverLists in this article. If you would like to know more about SliverLists, let me know in the comments.
If you look at the example below, we have a basic implementation of a ListView. The ListView has a children parameter which takes a List of type Widget. If you are remember, we had seen a similar thing in Row and Column widgets in the previous article. The difference here is that this one can take more items than what fit on the screen and has scrolling capabilities.
By default, ListView automatically pads the scrollable extremes. This is done in order to avoid partial obstruction on the ends. You can override this by setting the padding to zero.
Google has announced new flutter 1.20 stable with many improvements, and features, enabling flutter for Desktop and Web
Learn the difference between Android and iOS both of which are very famous operating systems. Learn which is better for app development?
Android projects with source code - Work on real-time android projects. We’ll start project ideas from beginners level and later move to advance projects.
Flutter is an open-source UI toolkit for mobile developers, so they can use it to build native-looking Android and iOS applications from the same code base for both platforms. Flutter is also working to make Flutter apps for Web, PWA (progressive Web-App) and Desktop platform (Windows,macOS,Linux).
Now a days almost all application have to have some kind of data storage. Application without collaboration with other users will make use of local storage db – SQLite. In this tutorial, we are going to cover all CRUD operations in Flutter with SQLite.