getCountryFlagImg static method

Img? getCountryFlagImg(
  1. String countryCode
)

Get the country flag image by ISO code as a Img.

Prefer Img when you need SDK-managed metadata (uid, recommended size/aspectRatio, scalability) or to request raw image bytes; use getCountryFlag when you only need raw image bytes.

Parameters

  • countryCode: (String) ISO 3166-1 alpha-3 code.

Returns

  • (Img?) The Img object representing the flag, or null if not available.

See also:

Implementation

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

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

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