You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are there anyway to add the raw received value of ENUM types. Many time we have customers whoes mobiles apps running an older version. Though the newly introduced ENUM can break some existing codes, we have always seen that the enum usage while in action goes through switch or conditional cases and we fallback to a default case.
I wonder are there anyway to preserve the received ENUM values as a rawValue. this will help the app developers sometime to fallback to display the raw value as is instead of the "unknown"
Any thoughts on bringing this?
The text was updated successfully, but these errors were encountered:
👋 @ysaakpr
Thank you for raising an issue. I will investigate the issue and get back to you as soon as possible.
Please make sure you have provided enough context.
This library is created and maintained by me, @budde377. Please consider supporting my work and ensure our survival by donating here.
Interesting use-case, I don't think we can use enhanced enums to solve this because they require a const constructor. We could possibly save a enumValue$raw field on the parent class for every enumValue fields.
yeah... its about preserving the incoming value, and letting the client allowing to read the raw value as a string, can be still making sure we have the enum with unknown state and can still access the raw value that caused the unknown state, usfull for debugging or client app not so breaking for every change.
The app can show the raw value and say a warning, possibility u are using a old version of the app.
Are there anyway to add the raw received value of ENUM types. Many time we have customers whoes mobiles apps running an older version. Though the newly introduced ENUM can break some existing codes, we have always seen that the enum usage while in action goes through switch or conditional cases and we fallback to a default case.
I wonder are there anyway to preserve the received ENUM values as a rawValue. this will help the app developers sometime to fallback to display the raw value as is instead of the "unknown"
Any thoughts on bringing this?
The text was updated successfully, but these errors were encountered: