limitToLast method
Keeps the last limit children in the order; limit must be above 0 and no limit may be set yet.
Implementation
Query limitToLast(int limit) {
if (limit <= 0) {
throw ArgumentError.value(
limit,
'limit',
'limitToLast: First argument must be a positive integer.',
);
}
if (spec.params.hasLimit) {
throw StateError(
'limitToLast: Limit was already set (by another call to limitToFirst '
'or limitToLast).',
);
}
return _with(spec.params.limitToLast(limit));
}