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
TD;LR Read the title, I just want to have a dynamic way to resolve messages (if they exists) during runtime.
Full story:
I have a backend that is going to send both info & error messages using message-keys, ex: "{'id':302, 'error': 'itemNotFound'}". I want to dynamically resolve those keys using generated code but, for now, I don't have a method that can be used in order to solve the error message.
It would be great to have a method in the S class that would allow me to get the translated message if it exists, and if it doesn't, I can manually generate a generic message:
TD;LR Read the title, I just want to have a dynamic way to resolve messages (if they exists) during runtime.
Full story:
I have a backend that is going to send both info & error messages using message-keys, ex: "
{'id':302, 'error': 'itemNotFound'}
". I want to dynamically resolve those keys using generated code but, for now, I don't have a method that can be used in order to solve the error message.It would be great to have a method in the
S
class that would allow me to get the translated message if it exists, and if it doesn't, I can manually generate a generic message:Having such method probably will require the generation of a
Map<String, String Function()>
static member that will look like something like this:I've done something similar in bdlukaa/fluent_ui@b53288b#diff-ab7c9e25f588ae440e0de59542af84db24d60f230b9c7143d42b1afa9bc45da4R47 (In that case the motivation to generate a map was also to be able to search for the "icons" by name)
The text was updated successfully, but these errors were encountered: