Query<T> class Null safety

A repeatable Query returning the latest matching Objects.

Use find or related methods to fetch the latest results from the Box.

Use property to only return values or an aggregate of a single Property.

Available Extensions


entityId int
hashCode int
The hash code for this object. [...]
read-only, inherited
limit int
Configure a limit for this query. [...]
offset int
Configure an offset for this query. [...]
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


close() → void
Close the query and free resources.
count() int
Returns the number of matching Objects.
describe() String
Stream items by sending pointers from native code. Interestingly this is slower even though it transfers only pointers... Probably because of the slowness of asTypedList(), see native_pointers.dart benchmark For internal testing purposes.
describeParameters() String
For internal testing purposes.
find() List<T>
Finds Objects matching the query.
findFirst() → T?
Finds the first object matching the query. Returns null if there are no results. Note: offset and limit are respected, if set.
findIds() List<int>
Finds Objects matching the query and returns their IDs.
findUnique() → T?
Finds the only object matching the query. Returns null if there are no results or throws if there are multiple objects matching. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
property<DartType>(QueryProperty<T, DartType> prop) PropertyQuery<DartType>
Use the same query conditions but only return a single property (field). [...]
remove() int
Returns the number of removed Objects.
stream() Stream<T>
Finds Objects matching the query, streaming them while the query executes. [...]
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]