I have a list of topics that is coming dynamically from the backend, and I'm using chip
s to display them, inside a Wrap
.
Now I want that, If these chips exceed say 3 lines, then we hide the other chips and show a See More
button.
I don't understand how this can be done since we have a Wrap
widget.
Here's the code:
Wrap(
children: [
for (var shop in _viewModel.shops.types)
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 4.0,
),
child: Chip(
label: Text(
shop.shopName,
),
labelStyle: Theme.of(context).textTheme.headline6!.copyWith(
color: AppColors.darkerGreyColor,
),
backgroundColor: AppColors.textLightColor,
shape: const StadiumBorder(
side: BorderSide(
color: Color(0xFFBDBDBD),
),
),
padding: const EdgeInsets.all(
AppSizes.p4,
),
),
),
],
);
Appreciate any help. Thanks !!