Expanded(
child: FutureBuilder(
future: getCountriesData(),
builder: (BuildContext context, AsyncSnapshot snap) {
if (snap.hasData) {
Response res = snap.data;
return ListView.builder(
itemCount: res.data.length,
itemBuilder: (context, index) {
Map<String, dynamic> data = res.data[index];
return ListTile(
title: Row(
children: [
Expanded(
child: Text()),
Text(),
],
),
);
},
);
} else {
return Center(
child: CircularProgressIndicator(),
);
}
},
),
),