Skip to content

Commit 61ac1a4

Browse files
committed
configure flutter_libs as a separate package, an additional flutter-only dependency
1 parent 98ee2f2 commit 61ac1a4

File tree

5 files changed

+21
-3
lines changed

5 files changed

+21
-3
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ ObjectBox for Dart is a standalone database storing Dart objects locally, with s
44

55
Flutter/Dart compatibility
66
--------------------------
7+
Starting with Flutter 1.20, additional changes were required, starting from objectbox-dart v0.7.0.
8+
To make sure your Flutter application works after update to Flutter 1.20, add `objectbox_flutter_libs: ^0.7.0`
9+
as an additional dependency, in addition to `objectbox`.
10+
711
This library depends on a new Dart feature, FFI, introduced in Dart 2.5 (Flutter 1.9) as a feature preview.
812
However, it has changed significantly in Dart 2.6/Flutter 1.12, i.e. introduced breaking changes we had to reflect.
9-
Versions starting with ObjectBox 0.5 support Dart 2.6+ as well as Flutter 1.12+.
13+
Versions between ObjectBox v0.5 up to v0.6.x support Dart 2.6+ as well as Flutter 1.12+ and Flutter 1.17+.
1014

1115
The last supported version for Flutter 1.9/Dart 2.5 is ObjectBox 0.4.*, so if you can't upgrade yet, please use the
1216
latest 0.4.x version instead.
@@ -25,6 +29,12 @@ dev_dependencies:
2529
2630
Proceed based on whether you're developing a Flutter app or a standalone dart program:
2731
1. **Flutter** only steps:
32+
* Add additional dependency to include native libraries (required in Flutter):
33+
```yaml
34+
dependencies:
35+
objectbox: ^0.6.4
36+
objectbox_flutter_libs: ^0.6.4
37+
```
2838
* Install the packages `flutter pub get`
2939
* XCode/iOS: under Architectures replace `${ARCHS_STANDARD)` with `arm64` (or `$ARCHS_STANDARD_64_BIT`).
3040
See [FAQ](#faq) for details.

example/flutter/objectbox_demo/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ dependencies:
1212
path_provider: any
1313
intl: any
1414
objectbox: ^0.6.4
15+
objectbox_flutter_libs: ^0.6.4
1516

1617
dev_dependencies:
1718
flutter_test:

flutter_libs/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
ObjectBox libraries Flutter
22
==========================
33
This package provides native ObjectBox library as a flutter plugin for supported platforms.
4-
Should be used as part of the https://pub.dev/packages/objectbox package, not separately.
4+
You should add this package as a dependency when using https://pub.dev/packages/objectbox with Flutter.
5+
6+
See https://pub.dev/packages/objectbox for more details and information how to use ObjectBox.
57

flutter_libs/pubspec.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ description: ObjectBox is a super-fast NoSQL ACID compliant object database. Thi
66

77
environment:
88
sdk: ">=2.6.0 <3.0.0"
9+
flutter: ">=1.12.0 <2.0.0"
10+
11+
dependencies:
12+
# This is here just to ensure compatibility between objectbox-dart code and the libraries used
13+
# You should still depend on objectbox directly in your Flutter application.
14+
objectbox: 0.6.4
915

1016
flutter:
1117
plugin:

pubspec.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ dependencies:
1111
# take care updating flatbuffers - keep aligned with other bindings
1212
flat_buffers: 1.12.0
1313
ffi: ^0.1.3
14-
objectbox_flutter_libs: 0.6.4
1514

1615
dev_dependencies:
1716
build_runner: ^1.0.0

0 commit comments

Comments
 (0)