cbl_flutter 1.0.0-beta.2 copy "cbl_flutter: ^1.0.0-beta.2" to clipboard
cbl_flutter: ^1.0.0-beta.2 copied to clipboard

outdated

Couchbase Lite for Flutter. Couchbase Lite is A NoSQL database with change notification, full text search and replication.

Version License CI

cbl_flutter #

This package enables using Couchbase Lite (cbl) in Flutter apps.

Supported Platforms #

Platform Minimum version
iOS 11
macOS 10.15
Android 22

Getting started #

You need to add cbl and cbl_flutter as dependencies. cbl_flutter currently supports iOS, macOS and Android.

dependencies:
    cbl: ...
    cbl_flutter: ...

Make sure you have set the required minimum target version in the build systems of the platforms you support.

Couchbase Lite needs to be initialized, before it can be used:

import 'package:cbl_flutter/cbl_flutter.dart';

Future<void> initCouchbaseLite() async {
  await CouchbaseLiteFlutter.init();
}

Now you can use Database.open to open a database:

import 'package:cbl/cbl.dart';

Future<void> useCouchbaseLite() async {
  final db = await Database.openAsync('chat-messages');

  final doc = MutableDocument({
    'type': 'message',
    'body': 'Heyo',
    'from': 'Alice',
  });

  await db.saveDocument(doc);

  await db.close();
}
40
likes
0
pub points
88%
popularity

Publisher

verified publishercbl-dart.dev

Couchbase Lite for Flutter. Couchbase Lite is A NoSQL database with change notification, full text search and replication.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

cbl, cbl_ffi, cbl_native, flutter, path_provider

More

Packages that depend on cbl_flutter