getListOfRegions function

Future<List<OfflineRegion>> getListOfRegions()

Implementation

Future<List<OfflineRegion>> getListOfRegions() async {
  final String regionsJson = await _globalChannel.invokeMethod(
    'getListOfRegions',
    <String, dynamic>{},
  );
  final Iterable regions = json.decode(regionsJson);
  return regions.map((region) => OfflineRegion.fromMap(region)).toList();
}