You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure this is a bug, perhaps is me missing something about the way this widget works, but I thought I'd ask after several unsuccessful attempts at fixing it, I hope it's ok.
I'm using the carousel to display a gallery of images I fetch from the web via a backend service. I set the viewportFraction to 1.0, so the "slides" are expected to fill the available horizontal space, and that's what happens on iPhone, check the following screenshot (some parts are edited for privacy and NDA):
On the left you see a landscape gallery picture, on the right a portrait one. As you can see they both fit the whole screen horizontally, the latter simply expands the carousel area downwards to accomodate the different aspect ratio, which is perfect for me.
But here's what happens when I run the app on an iPad Pro (6gen):
As you can see, the landscape picture fits perfectly, while the portrait one gets those weird paddings (you can also see the spinner loading animation I put in an underneath container of the same stack because the gallery image doesn't cover it anymore).
Contact Details
[email protected]
What happened?
I'm not sure this is a bug, perhaps is me missing something about the way this widget works, but I thought I'd ask after several unsuccessful attempts at fixing it, I hope it's ok.
I'm using the carousel to display a gallery of images I fetch from the web via a backend service. I set the viewportFraction to 1.0, so the "slides" are expected to fill the available horizontal space, and that's what happens on iPhone, check the following screenshot (some parts are edited for privacy and NDA):
On the left you see a landscape gallery picture, on the right a portrait one. As you can see they both fit the whole screen horizontally, the latter simply expands the carousel area downwards to accomodate the different aspect ratio, which is perfect for me.
But here's what happens when I run the app on an iPad Pro (6gen):
As you can see, the landscape picture fits perfectly, while the portrait one gets those weird paddings (you can also see the spinner loading animation I put in an underneath container of the same stack because the gallery image doesn't cover it anymore).
Here is the code I use:
ExpandableCarousel(
options: CarouselOptions(
autoPlay: false,
viewportFraction: 1.0, //full width
),
items: imgGallery.map((i) {
return Builder(
builder: (BuildContext context) {
var noimg = AssetImage(//default placeholder
'assets/images/noimg.png');
var img;
if (i != '') {
img = NetworkImage(i);
}
return Image(
image: i != '' ? img : noimg,
);
},
);
}).toList(),
),
Any suggestions? Thanks in advance
Version
2.1.0
What devices are you seeing the problem on?
iPhone
OS
iOS 16.4
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: