getCountryFlagImgByIndex static method

Img? getCountryFlagImgByIndex(
  1. int index
)

Get the country flag image by index as a Img.

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

Parameters

  • index: (int) Country index.

Returns

  • (Img?) An Img object when available, otherwise null.

Also see:

Implementation

static Img? getCountryFlagImgByIndex(final int index) {
  final OperationResult resultString = staticMethod(
    'MapDetails',
    'getCountryFlagImgByIndex',
    args: index,
  );

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

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