-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Labels
status: confirmedIssue has been reproduced and confirmed as a bug.Issue has been reproduced and confirmed as a bug.type: bugSomething isn't working.Something isn't working.
Description
Please thumbs up this issue if you have also experienced it. You may also add more information if there is something relevant that was not mentioned. However, please refrain from comments that are not constructive, like "I have this problem too", etc.
Expected behavior (required)
When some elements are rendered are dynamically using the Wrapper widget, if an element is conditionally hidden, the spacing for that element should not be rendered.
Current behavior (required)
Let's say I am rendering 5 elements with spacing between each of them set to 10. Out of 5 elements 2nd and 3rd are not rendered because of the conditional visibility setting. In this case the spacing between 1st and 4th element will be 30 instead of 10.
To Reproduce (required)
- Create a new page
- Add Wrapper widget
- Add an element with a small width. Let's say an image or a button 30px wide
- Render 6-7 elements with noticeable spacing, let's say 25px
- Hide an element or multiple elements using conditional visibility. Just set "false" value to condition
- Observe the empty spacing left for the element even though they are hidden.
Bug Report Code (required, generate from Widget Tree)
Expanded(
child: Wrap(
spacing: 25,
runSpacing: 25,
alignment: WrapAlignment.start,
crossAxisAlignment: WrapCrossAlignment.start,
direction: Axis.horizontal,
runAlignment: WrapAlignment.start,
verticalDirection: VerticalDirection.down,
clipBehavior: Clip.none,
children: [
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Visibility(
visible: false,
child: Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
),
Visibility(
visible: false,
child: Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
Image.network(
'https://picsum.photos/seed/246/600',
width: 50,
height: 50,
fit: BoxFit.cover,
),
],
),
)
Context (required)
Your environment
- Version of FlutterFlow used:
- Platform (e.g. Web, MacOS Desktop):
- Browser name and version:
- Operating system and version (desktop or mobile):
Metadata
Metadata
Labels
status: confirmedIssue has been reproduced and confirmed as a bug.Issue has been reproduced and confirmed as a bug.type: bugSomething isn't working.Something isn't working.