fenecdb_flutter 0.1.10
fenecdb_flutter: ^0.1.10 copied to clipboard
fenecdb in a Flutter app on iOS, Android and macOS -- the fenecdb package with the native library bundled for each platform.
fenecdb for Flutter #
The fenecdb package in a Flutter app, with its native library bundled:
FenecFFI.framework, a dynamic framework, on iOS and macOS (the release's
a dynamic FenecFFI.xcframework), libfenec_ffi.so for arm64-v8a,
armeabi-v7a and x86_64 on Android.
import 'package:fenecdb_flutter/fenecdb_flutter.dart';
import 'package:path_provider/path_provider.dart';
final dir = await getApplicationDocumentsDirectory();
final db = await Fenec.open('${dir.path}/app.fenec');
StreamBuilder(
stream: db.live(db.from('todos').where('done', false)),
builder: (context, snap) => ListView(children: [
for (final t in snap.data ?? const []) Text(t['title'] as String),
]),
);
example/ is a todo list over a live query. In the repository,
prepare.sh copies the libraries in from the Swift and Kotlin builds
(integrations/swift/build-xcframework.sh, integrations/kotlin/build-aar.sh).