How can I refresh the component or page when the custom action calls the callback function?

Actions & Logic

In my flutterflow app, I have an upload media feature that works like that:

Page -> Bottom sheet calling uploadCcomponent -> calling uploadActionBlock -> calling uploadCustomAction

The custom action updates an App state variable with the progress percentage.

The problem is the uploadComponent does not refresh the UI on the app state changes so the user cannot see the progress.

The uploadCustomAction calls a callback function with the progress percent.

I tried to pass an action that updates app state and rebuilds current page but it caused flutterflow compilation error (unknown setState() in the passed action)

I tried to pass an action from the component to the action block, however there is no way to pass an action to an action block.

How can I refresh the component or page when the custom action calls the callback function?

What have you tried so far?

create a custom action to refresh the current page - errored in compilation, unknown setState()

Did you check FlutterFlow's Documentation for this topic?
No
3
1 reply