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
It would be a cool addition, but I think the implementation needs to be thought through. Handling the default value on the Dart side is probably best, but it may only be possible to do primitive types (other serializable objects would be tricky). Also, what should the syntax look like. Needs to feel clean and be backwards compatible.
I think it would be best to provide the serialized version of the data in the yaml file. This could be used to set the default in the database, and a dart default could be constructed, too, by using the SerializationManager.
I'm currently working on a package that helps specify and parse yaml based configuration files. I think it'd be the perfect fit for specifying the class definitions. (Had this as a usecase in mind)
Activity
fischerscode commentedon Sep 27, 2022
@vlidholt do you envision any special way how this should be implemented? Sounds like a nice PR...
ramyak-mehra commentedon Feb 12, 2023
we can handle the default value on the sql side or dart side
vlidholt commentedon Feb 13, 2023
It would be a cool addition, but I think the implementation needs to be thought through. Handling the default value on the Dart side is probably best, but it may only be possible to do primitive types (other serializable objects would be tricky). Also, what should the syntax look like. Needs to feel clean and be backwards compatible.
fischerscode commentedon Feb 13, 2023
I think it would be best to provide the serialized version of the data in the yaml file. This could be used to set the default in the database, and a dart default could be constructed, too, by using the
SerializationManager.I'm currently working on a package that helps specify and parse yaml based configuration files. I think it'd be the perfect fit for specifying the class definitions. (Had this as a usecase in mind)
SandPod commentedon Aug 14, 2024
Closing this as duplicate for the more specified issue here #1140.
PS. This is being implemend right now 🙌