objectbox
5.3.2, released 6 months ago by objectbox.io
Fast on‑device NoSQL object database for Flutter and Dart native apps.
What it does
ObjectBox stores Dart objects directly without tables, offering ACID‑compliant CRUD, queries, relations and vector search. It also provides optional Sync for cross‑device data consistency.
AI-written summary of version 5.3.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need high‑performance local persistence with millions of objects
- You want built‑in relations and query API without writing SQL
- You plan to use on‑device vector search for AI features
Skip it when
- You prefer a pure‑Dart solution without native binaries
- You need a lightweight key‑value store only
- You cannot add native build steps or code‑generation to your CI
Strengths
- 10× faster than SQLite in benchmarks
- ACID compliance and built‑in migrations
- Cross‑platform native binaries (Android, iOS, macOS, Linux, Windows)
- Vector search for on‑device AI
Weaknesses
- Requires native libraries and code‑gen step
- Larger app size due to native binaries
- Not pure Dart – limited to supported platforms
Setup
- Kind
- FFI (native library)
- Effort
- Medium
- Code generation
- Yes (build_runner)
- Direct dependencies
- 5
Add objectbox and objectbox_flutter_libs (or sync variant) to pubspec, run build_runner for generated code, install native libs via provided script, and set platform deployment targets (iOS 15+, macOS 11+).
import 'package:objectbox/objectbox.dart';
@Entity()
class Person {
@Id()
int id = 0;
String firstName;
String lastName;
Person({required this.firstName, required this.lastName});
}
Future<void> main() async {
final store = await openStore();
final box = store.box<Person>();
final person = Person(firstName: 'Joe', lastName: 'Green');
final id = box.put(person);
print('Saved person with id $id');
}Alternatives
Packages that do the same job and could replace objectbox.
Works with
Packages commonly used together with objectbox: ones it builds on, ones built on it, and its own family.
- ffiobjectbox depends on itUtilities for working with Foreign Function Interface (FFI) code in Dart.
- flat_buffersobjectbox depends on itFlatBuffers library for Dart to read and write binary data using generated code.
- objectbox_flutter_libsBuilt on objectboxFlutter plugin providing native ObjectBox NoSQL database libraries
- objectbox_generatorBuilt on objectboxGenerates ObjectBox binding code for annotated Dart entities.
- flutter_map_tile_cachingBuilt on objectboxAdvanced caching and offline map region downloading for flutter_map.
- objectbox_sync_flutter_libsBuilt on objectboxFlutter plugin providing the native ObjectBox NoSQL database with built‑in Sync support.