getLocations method

  1. @override
Future<List<Location>> getLocations({
  1. int? limit,
})
override

Implementation

@override
Future<List<Location>> getLocations({int? limit}) async {
  _methodCalls.add('getLocations');
  if (limit != null && limit < _storedLocations.length) {
    return _storedLocations.sublist(_storedLocations.length - limit);
  }
  return List.unmodifiable(_storedLocations);
}