Closed JanikHalder closed 5 days ago
Hey @JanikHalder thanks for your report. I can confirm that the value of an Enum inside a DataType that is stored on Page State or App State is not being read by the UI. I will send this ticket to our Technical team so they can take a look. They will keep you updated on this thread. Have a great day!
@JanikHalder I checked with the Technical team, and we were able to make it work and use the Enum value from inside the DataType on the AppState. Could you please share with me the blank project with the Steps to reproduce and the bug occurring?
https://app.flutterflow.io/project/enum-project-i9gp6f?tab=pageSelector&page=HomePage
Here is the Link to the Blank Project.
I did the same things as mentioned before. 1.) Create ENUM 2.) Create Data Type which contains the ENUM 3.) Use the ENUM of the Data Type in any widget But i guess i know the one thing which is missing. I set the ENUM as the default values of the State Variable. Could this be the issue?
@JanikHalder I can confirm that the Enum inside the DataType is not being read, and adding only the Enum in the App State is being read correctly. I will send this to our engineering team and they will keep you updated on this thread. Thanks for the help, have a great day!
Has your issue been reported?
Current Behavior
I created a ENUM in my project and use it in a Data Type, which then I use to create an App State. The problem which i am facing is, that if i want to display the enum in my App it just shows the default variable of the Data Type or if i didn't set a Value in the Data Type it shows the Text Default Variable Value.
Also if i use the ENUM of the Data Type in other things like components, i get an Null check operator used on a null value Error (if I didn't select a default value in the Data Type).
As you use just an ENUM as an App State Variable everything works as expected. But even if you use a Data Type which just contains an ENUM it is not working anymore.
Expected Behavior
App State Data Type should contain the right ENUM Value.
Steps to Reproduce
Reproducible from Blank
Bug Report Code (Required)
ITFXhc/634hPxOZE0M7qKO5F9GQwFjsaU40V0tcbd0oaF4jqPZYuf+r+VxdoZ7yWTQk3fVCbgkAz08mLj4XqUsJcNU+aUoNoyZFQdAzdTn6mVJfQCJGwSGhPFppUGUCd0KungxFAGMtuSCEnw1r/cq3qNleeY8aSfxBlZ7vfcPo=
Context
I want to create a default state for a custom dropdown and also use the my Data Type across my app to have a custom UI depending on which category the user have selected.
Visual documentation
Test should be the ENUM (here i set a default value in the text widget) and also Montag should be the ENUM value (here i set a default state in the Data Type)
Additional Info
No response
Environment
General
Relative to the time the changes were made, data was lost within
When following my steps to reproduce, data loss happens