allSupportedRegions method

Future<List<RegionInfo>> allSupportedRegions({
  1. String? locale,
})

Returns a List of RegionInfo of all supported regions. Optionally pass the locale identifier for translating the names.

Implementation

Future<List<RegionInfo>> allSupportedRegions({String? locale}) async {
  final result =
      await _channel.invokeListMethod<Map>('get_all_supported_regions', {
    'locale': locale,
  });

  return result
          ?.map((value) => RegionInfo.fromJson(value.cast()))
          .toList(growable: false) ??
      [];
}