supabase / postgres-meta

A RESTful API for managing your Postgres. Fetch tables, add roles, and run queries
https://supabase.com
Apache License 2.0
939 stars 126 forks source link

generate dart types (classes) #807

Open NeatFastro opened 2 months ago

NeatFastro commented 2 months ago

I want to use supabase with dart (flutter) apps and it would be cool to generate dart classes just like we can generate types/interfaces for typescript

Describe the solution you'd like I want to run "supabase gen types dart --schema public" and it should print the dart classes with json serialization.

Describe alternatives you've considered Currently considering to use the freezed and json_serializable packages to manually create and update the classes/types.

sweatybridge commented 2 months ago

CLI uses postgres-meta for type generation. I've transferred your issue to that repo in case someone is happy to pick it up https://github.com/supabase/postgres-meta/tree/master/src/server/templates