Flutter: Data in Table Format — FutureBuilder, JSON, DataTable

Ayush Tripathi
3 min readApr 29, 2022

While working with APIs and JSON data in a flutter, sometimes we want to present the data coming from APIs in a tabular format.

Introduction
We are going to fetch data from APIs and then show it in a very clean way using tables in a flutter. We often get data that we have to show in a very organised way, and a table is one of the best ways to show large data. So, we are going to use DataTable, a widget provided by flutter.

So what is DataTable?

Data Table is a widget provided by flutter. It is used when we have lots of data which we have to process in rows and columns. It is one of the very useful widgets for presenting data in an organised way.

Let's begin -

So what we are going to do is show the data of an API in table format. The API we are going to use is Covid API and we only going to show three things Country name, Confirmed cases and Total death.

After creating a new project, the first thing is to get started with the HTTP package already installed in pubspec.yaml for calling API and then…

--

--

No responses yet