last method

Future<T> last([
  1. Map query = const {}
])

get last document that matches query

Implementation

Future<T> last([Map<dynamic, dynamic> query = const {}]) {
  try {
    return _executionQueue.add<T>(() async =>
        createItem(await (await _storage.find(query, Filter.last)).first));
  } catch (e) {
    rethrow;
  }
}