Can't trigger an action inside a component when a change outside occurs

Hi,

It seems I'm facing an issue that the "On Data Change" action trigger might have solved, but I'm not using Firebase.

Context: I have 2 nested pageView widgets that allow for vertical and horizontal swiping. Their children pages are generated dynamically so I was forced to convert the inner pageView into a component.

This is where the problems started: even if I have an app state that stores what the inner pageView index should be, I can't trigger a change in the inner pageView page index. I can do it at component init but not afterwards, because I don't have any trigger to do it.

In terms of UX, this results in the inner pageView indices being out of sync.

So that's where I'm blocked:

  • the action itself of setting the page index is only available inside the component

  • the action trigger (which in my case in the vertical swipe on the outer pageView) is only available outside the component

I've done some research and the classic flutter solution involves implementing a listener inside the component but I wonder if there's a native FlutterFlow solution to my problem?

Thanks!

1
9 replies