isEmpty method

Future<bool> isEmpty()

Returns true if there are no objects that match this query.

This operation is faster than using count() == 0.

Implementation

Future<bool> isEmpty() =>
    aggregate<int>(AggregationOp.isEmpty).then((value) => value == 1);