Listviews in Flutter

Listviews in Flutter

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.

android flutter-widget ios flutter mobileappdevelopmentindia

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Google's Flutter 1.20 stable announced with new features - Navoki

Google has announced new flutter 1.20 stable with many improvements, and features, enabling flutter for Desktop and Web

Android Vs iOS - Which is Better for App Development?

Learn the difference between Android and iOS both of which are very famous operating systems. Learn which is better for app development?

Top Android Projects with Source Code

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.

What is Flutter and why you should learn it?

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).

Complete SQLite CRUD Operations in Flutter

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.