FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
129 stars 26 forks source link

Update Local State does not rebuild any page. #352

Closed irfan-ahmed-1982 closed 1 year ago

irfan-ahmed-1982 commented 1 year ago

Expected behavior (required)

I have an action attached to image to upload the image to supabase from custom API as FlutterFlow does not support Supabse authentication yet. It updates the local state with the Image URL (Public URL), but after uploading the current page has to be updated with URL in a text field instead it does not rebuild at all.

Current behavior (required)

The current page does not rebuild even after I select the rebuild all pages or rebuild current page. I have to navigate to previous page and come back to the current page again to see the updated URL in the text field.

Code can be included in this section if it is relevant to reproducing the bug. -->

Steps to reproduce the behavior:

  1. Add a button and attach an action to it.
  2. on clicked action upload media to API
  3. Use any API backend (Supabase preferred)
  4. Update Local state with any name and String variable select rebuild current page
  5. Add the Text field and set the initial value from local state variable.
  6. Hit Run and observe that the text field never change its value
  7. Use back button and navigate to previous page
  8. navigate again to that page where you have the text field with local state variable
  9. Notice the text field displays the correct values.

Bug Report Code (required, generate from Widget Tree)

IT8Cls/l5Yx2sdtJ14SJd8BvoDs5KWk7apZNm8JAEBAdGL6vPe0Xe+D8R1tBY7TidHw7JWKJnVgV+MrTufz1JcI4Bw6VbdV7wbpMUwGVIWe5UJO3PYeROUdRO9tYBX6X3J6Zux1THLd2V1Zmw2CHcq3qNleeY8aSfxBlZ7vfcPo=

Context (required)

I need it to update the listing with the uploaded image URL. Please Note the supabase image upload will not work for me to grab the uploaded image URL because I need the storage policies not to be public.

Screenshots / recordings

image

Your environment

bulgariamitko commented 1 year ago

Can you share your actions so we can see how you set up your actions?
Also try to use the rebuild all pages option.

irfan-ahmed-1982 commented 1 year ago

Please find as requested:

image

Text Field in the bottom called File name is updated from the local state please see below: image

image

image

bulgariamitko commented 1 year ago

I can't reproduce this issue, but I will let the FF team try and reproduce it as well.

aemelyanovff commented 1 year ago

You can't update initial value of a text field once it's initialized at the moment.

I can't think of a workaround off the top of my head. I can only suggest asking advice on https://community.flutterflow.io/ or creating a feature request for updating text field initial value.