Cindel’s runtime and code generator are distributed as standard pub packages. Flutter apps need two runtime packages (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/mainser/cindel/llms.txt
Use this file to discover all available pages before exploring further.
cindel and cindel_flutter_libs) plus the generator as a dev dependency. Pure Dart tools need only cindel and a path to the native library at runtime. This page covers every installation scenario, from a fresh Flutter project to a Freezed model setup and platform-specific native library requirements.
Flutter Apps
Flutter apps are the primary use case for Cindel. Addcindel and cindel_flutter_libs as runtime dependencies, then add build_runner and cindel_generator as dev dependencies.
cindel_flutter_libs bundles the prebuilt native libraries for Android, iOS, macOS, Windows, and Linux, and the Worker/Wasm runtime assets for Flutter Web. You do not need to import anything from it in Dart — its presence in pubspec.yaml is enough for Flutter’s platform build to locate and embed the correct runtime files.
Your application code imports only the runtime package:
Pure Dart Tools
Pure Dart command-line tools and server-side programs can depend oncindel directly without cindel_flutter_libs. The cindel package loads the native library from the path stored in the CINDEL_NATIVE_LIBRARY environment variable when Flutter’s asset bundling is not available.
dart tests or tools:
Build Runner
Thecindel_generator package is a build_runner builder. It reads @Collection, @Index, @Embedded, and related annotations from your model files and emits *.g.dart part files that the cindel runtime consumes.
Run a one-off build after adding or modifying model files:
watch mode to regenerate automatically whenever a source file changes:
--delete-conflicting-outputs flag lets build_runner overwrite previously generated files when you rename or refactor a model. Commit the generated *.g.dart files to version control alongside your model sources.
Freezed Support
Cindel supports Freezed classic classes and single primary-factory models. If your project uses Freezed, addfreezed_annotation as a runtime dependency and freezed as a dev dependency alongside the Cindel packages:
part directives — one for Freezed’s output and one for Cindel’s output:
@Index, @Enumerated, and @ignore can be placed on factory parameters in primary-factory models. Freezed union and sealed multi-constructor models are not supported.
Platform Support
cindel_flutter_libs provides prebuilt runtime assets for every platform that Cindel currently supports. No manual native toolchain setup is required for Flutter apps that depend on the package.
| Platform | Runtime asset | Notes |
|---|---|---|
Android arm64-v8a | libcindel_native.so | Bundled in jniLibs by cindel_flutter_libs |
Android armeabi-v7a | libcindel_native.so | Bundled in jniLibs by cindel_flutter_libs |
Android x86_64 | libcindel_native.so | Bundled in jniLibs by cindel_flutter_libs |
| iOS | cindel.xcframework | Vendored xcframework; requires Xcode build on macOS |
| macOS | libcindel_native.dylib | Vendored dylib; requires Xcode build on macOS |
| Windows | cindel_native.dll | Prebuilt; bundled by cindel_flutter_libs |
| Linux | libcindel_native.so | Prebuilt; bundled by cindel_flutter_libs |
| Web | cindel_worker.js, cindel_native.js, cindel_native_bg.wasm | SQLite/OPFS Worker+Wasm; bundled by cindel_flutter_libs |
cindel and cindel_flutter_libs on exactly the same version in pubspec.yaml. The Dart runtime expects a native ABI that matches the version of cindel installed, and mismatched versions will fail at startup.