firestore_odm_builder 5.1.0 copy "firestore_odm_builder: ^5.1.0" to clipboard
firestore_odm_builder: ^5.1.0 copied to clipboard

Code generator for firestore_odm, the type-safe Firestore ODM for Flutter and Dart. Generates typed queries, patches, aggregates and converters with build_runner.

example/example.md

Example #

Annotate models and a schema (see firestore_odm/example), then generate:

dart run build_runner build --delete-conflicting-outputs

The generated part gives each collection typed queries and updates:

final db = FirestoreODM(appSchema);
final adults = await db.users
    .where(($) => $.age(isGreaterThanOrEqualTo: 18))
    .orderBy(($) => ($.name(),))
    .get();
await db.users('kim').patch(($) => [$.age.increment(1)]);

To migrate a cloud_firestore_odm project:

dart pub global run firestore_odm_builder:migrate --apply
0
likes
160
points
210
downloads

Documentation

Documentation
API reference

Publisher

verified publishersylphx.com

Weekly Downloads

Code generator for firestore_odm, the type-safe Firestore ODM for Flutter and Dart. Generates typed queries, patches, aggregates and converters with build_runner.

Repository (GitHub)
View/report issues

Topics

#firestore #odm #code-generation #build-runner #flutter

License

MIT (license)

Dependencies

analyzer, build, code_builder, firestore_odm_annotation, json_annotation, source_gen

More

Packages that depend on firestore_odm_builder