getFutureBuilder function
dynamic
getFutureBuilder(
- dynamic uiProps,
- dynamic getItems,
- dynamic isDailog
Implementation
getFutureBuilder(uiProps, getItems, isDailog) {
return FutureBuilder(
future: getItems(),
builder: (c, snapshot) {
if (snapshot.hasData) {
try {
List items = snapshot.data as List;
return ItemsListView(
data: items, maxRows: 10, isDialog: isDailog, uiProps: uiProps);
} catch (e) {
return Center(
child: Text(
"error",
style: TextStyle(color: Colors.red),
));
}
} else {
return Column(
children: [
getContainer(),
getContainer(),
getContainer(),
],
);
}
},
);
}