Closed untersalmberger closed 9 months ago
Hi @untersalmberger - I looked at your project. Below variable mapping is the issue. It should be the variable from the generated from image list. Please close the issue once you are able to see it is working.
Has your issue been reported?
Current Behavior
Using the
Swipable Stack Current Element
value on anImage
widget'sPath
property, when theImage
widgets are generated as children within theSwipeableStack
widget, causes the build to fail.Expected Behavior
Using the
Swipable Stack Current Element
value on anImage
widget'sPath
property, when theImage
widgets are generated as children within theSwipeableStack
widget, should show the images with their respective paths in the swipeable stack.Steps to Reproduce
ImagePath
and call ittheImagePaths
, make it a list, add a few itemsSwipeableStack
widget on the pageSwipeableStack
widget, go toGenerating Children From Variable
, give the variable a name (likeimagePaths
) and set the value of the variable to the before created constanttheImagePaths
, save the variableSwipeableStack
pages except the firstSwipeableStack
page select theImage
widget, set thePath
property toSwipable Stack Current Element
Reproducible from Blank
Bug Report Code (Required)
IT8ghc+A5Yh1ocdD7q6JY8dFijoUCDs/a7gvjupqEAgafJSvBI13duP8XExDXbGBam1cJWaGmm0zwMmLhdrAU+0nCByJbLpZ/5N+TjvNTni5V7a2CJaOZUB6TOlMC0vDzpuZrRZAAO12LlVm3WGMG+eiVgPDQrmxDEYZBPykB9/XnVapHADgG30Jg1ZSfCvr
Context
I am currently blocked to build a more complex swipeable stack where access to the current element (in my case a struct with arrays included) is required to build the elements within the swipable stack. Usually there is a workaround to address the current element by indexing the list with the index of the current element, but when the list elements contain another list there seems to be a limitation that I cannot select the nested list.
Visual documentation
Additional Info
The issue is that the
Image
builder usesindex
instead ofimagePathsIndex
(or in fact it should use the just defined variableimagePathsItem
, which currently remains unused).index
is available in the event handlers, but not in the itemBuilder:The project with the issue can be found here: https://app.flutterflow.io/project/swipable-stack-index-issue-r66g9n?tab=uiBuilder&page=HomePage
Environment