Skip to content

Commit 0098988

Browse files
Merge branch '14-ffigen-update'
2 parents 9837b94 + 42c12d9 commit 0098988

File tree

15 files changed

+2543
-5564
lines changed

15 files changed

+2543
-5564
lines changed

.github/workflows/dart.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ jobs:
4747
- 2.17.0
4848
- 2.16.2
4949
- 2.15.1
50-
- 2.14.4
51-
- 2.12.0 # currently the lowest fully supported version (i.e. generator + lib)
50+
- 2.14.0 # currently the lowest fully supported version (i.e. generator + lib)
5251
runs-on: ${{ matrix.os }}
5352
steps:
5453
- uses: dart-lang/setup-dart@v1
@@ -95,13 +94,11 @@ jobs:
9594
- ubuntu-20.04
9695
flutter-version:
9796
- 3.0.0
98-
- 2.2.0
99-
# 2.0.0 technically lowest supported, but need 2.2.0 to correctly resolve null safety dependencies.
100-
# https://github.com/flutter/flutter/issues/77282
97+
- 2.5.0 # currently the lowest fully supported version (i.e. generator + lib)
10198
include:
10299
- flutter-version: 3.0.0 # Flutter 2.9 and newer need Visual Studio 2022 to build desktop.
103100
os: windows-2022
104-
- flutter-version: 2.2.0 # Flutter 2.8.1 and older need Visual Studio 2019 to build desktop.
101+
- flutter-version: 2.5.0 # Flutter 2.8.1 and older need Visual Studio 2019 to build desktop.
105102
os: windows-2019
106103
runs-on: ${{ matrix.os }}
107104
steps:

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ test-lib:linux:x64:
6868
# Note: use specific tags as docker images may not always be pulled due to "if-not-present" pull policy.
6969
# Thus, do not use tags like latest/beta, but check https://hub.docker.com/_/dart?tab=tags for latest.
7070
# Always include lowest supported version (see sdk key in objectbox and generator pubspec.yaml).
71-
- DART_VERSION: [ '2.12', '2.14.4', '2.15.1', '2.16.1', '2.16.2', '2.17.0' ]
71+
- DART_VERSION: [ '2.14', '2.15.1', '2.16.1', '2.16.2', '2.17.0' ]

benchmark/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Simple ObjectBox-Dart performance benchmark
33
publish_to: none
44

55
environment:
6-
sdk: ">=2.12.0 <3.0.0"
6+
sdk: ">=2.14.0 <3.0.0"
77

88
dependencies:
99
objectbox: any

flutter_libs/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ homepage: https://objectbox.io
55
version: 1.5.0
66

77
environment:
8-
sdk: ">=2.12.0 <3.0.0"
8+
sdk: ">=2.14.0 <3.0.0"
99
flutter: ">=2.0.0"
1010

1111
dependencies:

generator/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ homepage: https://objectbox.io
55
version: 1.5.0
66

77
environment:
8-
sdk: '>=2.12.0 <3.0.0'
8+
sdk: '>=2.14.0 <3.0.0'
99

1010
dependencies:
1111
objectbox: 1.5.0

objectbox/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
## latest
22

3+
* Require at least Dart SDK 2.14 (shipped with Flutter 2.5.0).
4+
35
## 1.5.0 (2022-05-11)
6+
47
* Add `Store.runInTransactionAsync` to run database operations asynchronously in the background
58
(requires Flutter 2.8.0/Dart 2.15.0 or newer). #415
69
* Rename `Store.runIsolated` to `runAsync`, drop unused `mode` parameter, propagate errors and

objectbox/example/flutter/objectbox_demo/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ publish_to: 'none'
44
version: 1.0.0+1
55

66
environment:
7-
sdk: ">=2.13.0 <3.0.0"
7+
sdk: ">=2.14.0 <3.0.0"
88

99
dependencies:
1010
flutter:

objectbox/example/flutter/objectbox_demo_relations/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ publish_to: 'none'
44
version: 1.0.0+1
55

66
environment:
7-
sdk: ">=2.13.0 <3.0.0"
7+
sdk: ">=2.14.0 <3.0.0"
88

99
dependencies:
1010
flutter:

objectbox/example/flutter/objectbox_demo_sync/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ publish_to: 'none'
44
version: 1.0.0+1
55

66
environment:
7-
sdk: ">=2.13.0 <3.0.0"
7+
sdk: ">=2.14.0 <3.0.0"
88

99
dependencies:
1010
flutter:

objectbox/lib/src/native/bindings/data_visitor.dart

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ bool Function(Pointer<Uint8> data, int size) _callback = _callback;
2222
int _forwarder(Pointer<Void> _, Pointer<Void> dataPtr, int size) =>
2323
_callback(dataPtr.cast<Uint8>(), size) ? 1 : 0;
2424

25-
final Pointer<NativeFunction<obx_data_visitor>> _nativeVisitor =
25+
final Pointer<obx_data_visitor> _nativeVisitor =
2626
Pointer.fromFunction(_forwarder, 0);
2727

2828
/// The callback for reading data one-by-one.
@@ -31,18 +31,15 @@ final Pointer<NativeFunction<obx_data_visitor>> _nativeVisitor =
3131
/// - [size] specifies the length of the read data.
3232
/// - Return true to keep going, false to cancel.
3333
@pragma('vm:prefer-inline')
34-
Pointer<NativeFunction<obx_data_visitor>> dataVisitor(
34+
Pointer<obx_data_visitor> dataVisitor(
3535
bool Function(Pointer<Uint8> data, int size) callback) {
3636
_callback = callback;
3737
return _nativeVisitor;
3838
}
3939

4040
@pragma('vm:prefer-inline')
41-
Pointer<NativeFunction<obx_data_visitor>> objectCollector<T>(
42-
List<T> list,
43-
Store store,
44-
EntityDefinition<T> entity,
45-
ObjectCollectorError outError) =>
41+
Pointer<obx_data_visitor> objectCollector<T>(List<T> list, Store store,
42+
EntityDefinition<T> entity, ObjectCollectorError outError) =>
4643
dataVisitor((Pointer<Uint8> data, int size) {
4744
try {
4845
list.add(entity.objectFromFB(

0 commit comments

Comments
 (0)