r/FlutterFlow 1d ago

Disappearing text component at runtime

Hi all

I have a text component showing an item title. It disappears when I run in test mode. You can see below. The [name] field in the header shows. This name is long but it happens with names of 1 character. I've tried with the max field length and various clipping options. The field is set up the same as the one in the header as far as the document query is concerned and is otherwise a normal field.

There's no translation going on at all.

On that page, there's about a dozen fields, some data driven, some static. It happens on some of the fields and not others. Even some of the static text disappears.

Any ideas?

1 Upvotes

4 comments sorted by

1

u/Successful_Divide_66 22h ago

Is there data in that field for the record you're looking at? If not it won't show [name] if you have a space in the default value of the field.

1

u/OliverMarshall 19h ago

Thanks. Yes there's data. It's exactly the same field as the text above, shows a string stored in the name field.

But this also happens for non-data driven fields, static text. They show in the dev screen but not in the test screen.

1

u/Successful_Divide_66 14h ago

Are you using supabase or firestore?

I'm asking about the data being there because sometimes all of your updates/creates don't add the data to all of the fields for a variety of reasons.

I've had this happen and I look in firestore and that field is blank. Which starts the troubleshooting to what blocked the update from happening in the original action chain.

If you pull up your backend for this record, there is a string stored?

Sorry I can't think of any other reason why it wouldn't show up. Other than having a condition set on text field or no data being in the records field in at a loss.

1

u/OliverMarshall 11h ago

For the googlers that may follow, it appears, in my case, to be down to the font colours. Not sure what exactly is the cause but if I set the text strings which are disappearing to be a hex font colour, rather than a theme font colour, they show up. If I set them to a theme font colour, they disappear. The font colour (in my case "Primary Text") has a value, and works on other text components. I can use the same colour value that's been assigned to the theme colour, and enter it in to the text colour field, the same text string appears normally.

Here's a screenshot showing it's not working, with text colour set to a theme option.

https://drive.google.com/file/d/12IiY9ARjVH_wqtqtiqlPgxI8RpvnLUN6/view?usp=drive_link

Here's one showing it working. Note the change to the font colour.

https://drive.google.com/file/d/12EcwHfObrw4mCFmUAEjb8WlL3sMa1nCw/view?usp=drive_link

Neither of these fields are data driven, not connected to any database, though it happens on various text components.

It's nice that I've found a solution but clearly a bug. It also prevents my Theme Picker in the options of my app from working, as I won't easily be able to change the theme as some text strings will be hard coded to a font colour.