getLocations static method
- int? limit,
Gets stored locations.
Implementation
static Future<List<Location>> getLocations({int? limit}) async {
final result = await LocusChannels.methods.invokeMethod(
'getLocations',
limit == null ? null : {'limit': limit},
);
if (result is List) {
return result
.map((item) =>
Location.fromMap(Map<String, dynamic>.from(item as Map)))
.toList();
}
return [];
}