Closed HyggeBo7 closed 5 years ago
Currently, a component for this specific task does not exist. When itemsList is empty an empty ListView is shown when DialogComponentsConfiguration or DropdownComponentsConfiguration is used.
You can use the ListViewComponent to achieve the required effect.
Widget _listViewBuilder(ListViewComponentData data) {
if (data.itemCount == 0) {
return Center(
child: Text("There is nothing here."),
);
}
return ListView.builder(
itemBuilder: data.itemBuilder,
itemCount: data.itemCount,
padding: EdgeInsets.zero,
);
}
Complete example here.
Yes.
Widget itemBuilder(
BuildContext context, Rectangle rectangle, OnItemTapped onItemTapped) {
return Container(
height: rectangle.size,
//...
);
}
Complete example here.
Thank you
How do I set the component that is displayed when the itemsList is empty?
Can I add a adaptive height based on the itemsList data?