getCountryFlagImgByIndex static method
- 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:
- getCountryFlagByIndex - Retrieve flag image bytes directly.
- getCountryFlagImg - Retrieve an Img wrapper by ISO code.
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']);
}