Replies: 1 comment 2 replies
-
Classes reconstructed from exported schemas will always be very minimal and only reflect the actual database schema, not the Dart representation associated with it. So there's not really a better way to write this that gives you the constant as a static field somewhere. You might be able to use schema introspection to extract the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to do something like this:
That lets me refer to default values in places like when instantiating Data classes with the variable, instead of hard-coded values, so a change can easily be reflected throughout my code. This falls apart with generated classes, like frozen schemas and schema steps; the consts aren't included or referenced, so the generated code has errors.
Is there a better way for me to code this?
Beta Was this translation helpful? Give feedback.
All reactions