Skip to content

Commit b2c9743

Browse files
committed
Query findIds - use List.generate()
1 parent 461a948 commit b2c9743

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

objectbox/lib/src/native/query/query.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -780,9 +780,8 @@ class Query<T> {
780780
reachabilityFence(this);
781781
try {
782782
final idArray = idArrayPtr.ref;
783-
return idArray.count == 0
784-
? List<int>.filled(0, 0)
785-
: idArray.ids.asTypedList(idArray.count).toList(growable: false);
783+
final ids = idArray.ids;
784+
return List.generate(idArray.count, (i) => ids[i], growable: false);
786785
} finally {
787786
C.id_array_free(idArrayPtr);
788787
}

0 commit comments

Comments
 (0)