Skip to content

Commit 9f8f456

Browse files
Fix function return types in Box class
1 parent 10a3b70 commit 9f8f456

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

objectbox/lib/src/box.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ class Box<T> {
201201
}
202202

203203
// expects pointer to OBX_bytes_array and manually resolves its contents (see objectbox.h)
204-
_unmarshalArray(Pointer<Uint64> bytesArray) {
205-
return _ByteBufferArray.fromOBXBytesArray(bytesArray).buffers.map(_unmarshal).toList();
204+
List<T> _unmarshalArray(Pointer<Uint64> bytesArray) {
205+
return _ByteBufferArray.fromOBXBytesArray(bytesArray).buffers.map<T>((b) => _unmarshal(b)).toList();
206206
}
207207

208208
_getOBXPutMode(PutMode mode) {
@@ -315,7 +315,7 @@ class Box<T> {
315315
return ret;
316316
}
317317

318-
getAll() {
318+
List<T> getAll() {
319319
// return value actually points to a OBX_bytes_array struct, which has two Uint64 members (data and size)
320320
Pointer<Uint64> bytesArray = _inReadTransaction(
321321
() => checkObxPtr(bindings.obx_box_get_all(_objectboxBox),

0 commit comments

Comments
 (0)