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
Something that serverpod.dev does that is pretty nifty is to generate model serialization code, and put the classes in a separate dart client package. It makes it really easy for a developer to pull the client package into a flutter app (or any client app). Until you use it, it's hard to appreciate what a game changer it is. It makes development much faster.
One thought might be to use something like Freezed to define the "model" class, with the proper annotations. Freezed gives you serialization, and a bunch of other nice features.
There are going to be properties of a freezed model that you don't want sent to the database. I think you could handle those using some kind of @ignore annotation (or re-use JsonKey?).
Food for thought..
The text was updated successfully, but these errors were encountered:
Something that serverpod.dev does that is pretty nifty is to generate model serialization code, and put the classes in a separate dart client package. It makes it really easy for a developer to pull the client package into a flutter app (or any client app). Until you use it, it's hard to appreciate what a game changer it is. It makes development much faster.
One thought might be to use something like Freezed to define the "model" class, with the proper annotations. Freezed gives you serialization, and a bunch of other nice features.
There are going to be properties of a freezed model that you don't want sent to the database. I think you could handle those using some kind of
@ignore
annotation (or re-use JsonKey?).Food for thought..
The text was updated successfully, but these errors were encountered: