dev library
Static model generation without a build runner or runtime reflection.
Classes
- GeneratedSources
- Complete deterministic Dart outputs. The snapshot imports no application models.
Functions
-
draftMigration(
{SchemaSnapshot? before, required SchemaSnapshot after, required int version, required String name, required String outputPath}) → Future< void> - Saves a conservative schema change as a standalone Dart migration draft.
-
generateSchema(
{required String schemaPath, required String outputPath, String databaseName = 'AppDatabase', required Engine engine}) → Future< GeneratedSources> - Resolves one annotated Dart library and emits its typed client and frozen schema.
-
readSnapshot(
String sourcePath) → Future< SchemaSnapshot> - Reads a constant frozen schema without executing the Dart input file.
-
snapshotPath(
String databasePath) → String - The independent frozen Dart file associated with a generated client.
-
writeGeneratedSources(
{required GeneratedSources sources, required String outputPath, bool check = false}) → Future< bool> - Writes both outputs, or checks exact source equality without writing.