A Flutter plugin to use Realm Database.
Note: This plugin is still under development, and some APIs might not be available yet. Feedback and Pull Requests are most welcome!
Getting Started #
example directory for a complete sample app using Realm Database.
- Add flutter_realm as a dependency in your pubspec.yaml file.
- Add Realm 5.13.0 to your Android host app
- Add models files in native Java and ObjC host apps.
- [x] Persistent and In-memory Realm
- [x] deleteAllObjects
- [x] Get allObjects by classname
- [x] Create object
- [x] Delete object
- [x] Update object
- [x] Query with
containsoperators on fields
- [x] Subscribe on queries and allObjects
- [x] Fields with array of String and int
- [x] Realm Sync
- [x] JWT and Username&Password authorization
- Fix currentUser null mapping.
- Fix dependency on meta.
- Breaking changes: replace Realm.initialize with Realm.open.
- Breaking changes: remove Realm prefix in class names.
- Add support multiple Realms.
- Add support the Realm Sync.
- Add Username&Password and JWT authorization.
- Introduce SyncUser.
- Breaking changes: update dependencies to uuid 2.0.1
- Add subscriptions.
containoperator in queries.
- Initial release.
- Run integration tests for database with
flutter driver --target=test_driver/realm_database.dart.
- Run integration tests for Realm Sync with
INSTANCE_LINK=<your_instance_host> flutter driver --target=test_driver/realm_sync.dart.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: flutter_realm: ^0.2.2
2. Install it
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Jan 16, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.0
- pana: 0.13.4
- Flutter: 1.12.13+hotfix.5
Health issues and suggestions
Document public APIs. (-0.48 points)
56 out of 57 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.
Maintenance issues and suggestions
Support latest dependencies. (-10 points)
The version constraint in
pubspec.yaml does not support the latest published versions for 1 dependency (
|Dart SDK||>=2.1.0 <3.0.0|