Implementing infinite scrolling listview (lazy loading/pagination) using ListView.builder on flutter app.

In this article, We are going to demonstrate infinite scrolling listview on flutter app. Lazy loading, endless scrolling, auto pagination are the other terms used to represent same feature. We will be using test API JSONPlaceholder to build simple photo app.

Let’s get started!

First add http package for network calls. More on network calls.

Then create Stateful widget with it’s state and fields required.

Here we are declaring required fields & initializing on initState. We will implement getBody and fetchPhotos method later.

Now we need model of Photo & method to fetch photos data from API. …

This article provides step by step guide to setup Flutter, setup Flutter web project & create simple Flutter web app.

Image for post
Image for post
Photo by Erwan Hesry on Unsplash

Flutter is Google’s portable UI toolkit for building beautiful, natively-compiled applications for mobile, web, and desktop from a single codebase.

We will install Flutter, install VS Code & required plugins, create a simple Flutter web app which will fetch random developer joke from Chuck Norris Jokes API.

Step 1: Install Flutter

Follow the official guide to install Flutter on your system.

Step 2: Install VS Code & Extensions

Set up an editor by installing VS Code along with Flutter & Dart plugins.

Step 3: Verify Installation

Verify Flutter installation & editor setup by running the command:

Image for post
Image for post
Photo by Maxim Dužij on Unsplash

This article provides step by step guide to the implemet app under maintenance feature on your android app along with building a control panel to manage maintenance status & maintenance message.

During downtime, if the user is using the application then the user might get a frequent error which creates the frustrating user experience. Here downtime refers to scenarios like some new changes are being deployed, servers are being upgraded, the configuration is being changed, the system is facing some unexpected issues and so on. …

Image for post
Image for post
Photo by Fabian Grohs on Unsplash

Basic example to make network requests in VueJS using Axios.

In this post we will use free API Random User Generator to demonstrate network request in VueJS using Axios.

First lets create a html file and put following code :

<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>Vue.js | Making API calls using Axios</title>
<body style="text-align: center">
<div style="display: inline-block;margin-top: 100px">
<img src="" alt="">
<h1 style="margin-bottom: 0">John Doe</h1>

As we can see its just plain html code with static image,name & email, now we will use Vue to set those info.

To do that, first lets include VueJS & Axios. Put following script at end of body. …

In Android app you can implement swipe to refresh by wrapping your ListView(or GridView) inside SwipeRefreshLayout, while in iOS UIRefreshControl is used for same.

For Flutter there is RefreshIndicator

A widget that supports the Material “swipe to refresh” idiom.

When child of RefreshIndicator is over scrolled , an animated circular progress indicator is displayed & onRefresh callback is called. Callback returns a future, after complete of which UI is updated & refresh indicator disappears.

In this example we will load random user profile using free API RandomUser, which provides random user on each refresh.

First things first , lets create a StatefulWidget & State for that widget. …

Implementation of Paging Library from Scratch with Kotlin & REST API

Image for post
Image for post
Paging Library Architecture (Google CodeLab)

One problem with (almost all) Android app we build is we request long data which we do not require a single time as a user only sees a small chunk of data at a time. One way to solve this problem is to listen to the scroll of RecyclerView & load more data when a user reaches the end of RecylerView. In this approach it was difficult to maintain efficiency, also UI logic & data logic get complicated which makes debugging & testing of the project difficult.

For the rescue here comes a library from Android Paging Library. …

Flutter is Google’s mobile app SDK for crafting high-quality native interfaces on iOS and Android in record time.

Recently as i was exploring resources to get started with Flutter, I found this awesome resource :

While scrolling through list, I thought “Learning flutter by creating an app that lists useful resources would be very helpful ”.

When I started project Awesome Flutter, Soon I came across a problem which is easy to handle in Android(for an Android Developer).

Different stages of Network Call : Progress, Error, Retry ….

I solved this problem using StatefulWidget & FutureBuilder.
Here i will show how i solved this project with an example app. …


Dhiraj Sharma

Developer Android, Flutter

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store