flutter_realm 0.2.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 81

Codemagic build status

flutter_realm #

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!

Important #

Current implementation requires definition of schema in native Java and ObjC host apps.

Getting Started #

See the example directory for a complete sample app using Realm Database.

Setup #

Features #

  • [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 >, >=, <, <=, =, != and contains operators 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

0.2.2 #

  • Fix currentUser null mapping.

0.2.1 #

  • Fix dependency on meta.

0.2.0 #

  • 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.

0.1.0 #

  • Breaking changes: update dependencies to uuid 2.0.1
  • Add subscriptions.
  • Add contain operator in queries.

0.0.1 #

  • Initial release.


Example #

  • 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:

  flutter_realm: ^0.2.2

2. Install it

You can install packages from the command line:

with Flutter:

$ 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:

import 'package:flutter_realm/flutter_realm.dart';
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]
Learn more about scoring.

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 (rxdart).


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
meta ^1.1.0 1.1.8
rxdart ^0.22.0 0.22.6 0.23.1
uuid ^2.0.1 2.0.4
Transitive dependencies
charcode 1.1.2
collection 1.14.11 1.14.12
convert 2.1.1
crypto 2.1.4
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies