findCountryByCode method

  1. @override
Future<CityResult?> findCountryByCode(
  1. String code
)
override

Find a country by its ISO2 code

Implementation

@override
Future<CityResult?> findCountryByCode(String code) async {
  final result = await methodChannel.invokeMethod<Map>('findCountryByCode', {
    'code': code,
  });
  return result != null
      ? CityResult.fromMap(Map<String, dynamic>.from(result))
      : null;
}