supadart
2.1.0, released 7 weeks ago by an unverified publisher
CLI tool that generates type-safe Dart and Flutter classes from your Supabase database schema.
What it does
Supadart connects to your Supabase schema via a CLI command and generates immutable Dart classes, JSON serialisation, converters, enums, and insertion/update helpers tailored to your database tables and columns.
AI-written summary of version 2.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want type-safe queries and inserts with Supabase in a Dart or Flutter project
- You want to eliminate manual model writing for your Supabase tables
Skip it when
- You prefer writing your database models and JSON serializers manually
- You are not using Supabase as your backend
Strengths
- Eliminates boilerplate when mapping database schemas to Dart models
- Generates type-safe insert and update helper methods
- Supports multiple schemas and custom database enums
Weaknesses
- Requires running a CLI command whenever your database schema changes
- Requires using a secret/service role key to fetch the schema from hosted Supabase projects
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
Activate via 'dart pub global activate supadart' and run supadart or configure a supadart.yaml file with your Supabase URL and key.
final allBooks = await supabase
.books
.select("*")
.withConverter(Books.converter);Alternatives
Packages that do the same job and could replace supadart.
- country
Provides generated Dart classes with comprehensive country data and utilities.
64Compare - openapi_generator
Generator for OpenAPI client SDKs in Dart and Flutter projects.
67Compare - icon_font_generator
Converts SVG icons to OpenType fonts and generates Flutter-compatible icon classes.
60Compare - hive_generator
Generates Hive TypeAdapter code for Dart classes automatically.
50Compare
Works with
Packages commonly used together with supadart: ones it builds on, ones built on it, and its own family.
- yamlsupadart depends on itA Dart library for parsing YAML documents into Dart data structures.
- argssupadart depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.
- dotenvsupadart depends on itLoad environment variables at runtime from a .env file.