getCountryFlagImg static method

Img? getCountryFlagImg(
  1. String countryCode
)

Get the country flag for the specified country.

Parameters

  • IN index The country ISO 3166-1 alpha-3 code

Returns

  • Country flag image if the code is valid, null othersise. The user is responsible to check if the image is valid

Throws

  • An exception if it fails.

Implementation

static Img? getCountryFlagImg(final String countryCode) {
  final OperationResult resultString = objectMethod(
    0,
    'MapDetails',
    'getCountryFlagImg',
    args: countryCode,
  );

  if (resultString['result'] == -1) {
    return null;
  }

  return Img.init(resultString['result']);
}