supabase/postgres-meta

generate dart types (classes)

NeatFastro opened this issue · 2 comments

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.

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

Just an FYI we have an GitHub issue to discuss this here: supabase/supabase-flutter#139