getCountryFlag static method
- required String countryCode,
- Size? size,
- ImageFileFormat? format,
Returns raw image bytes for the country flag by ISO 3166-1 alpha-3 code.
If the provided countryCode is invalid a default question-mark image
may be returned by the platform implementation.
Parameters
countryCode: (String) ISO 3166-1 alpha-3 code of the country.size: (Size?) Optional desired image size.format: (ImageFileFormat?) Optional image format.
Returns
- (
Uint8List?) Raw image bytes for the flag, or null if unavailable.
Also see:
- getCountryFlagImg - Retrieve an Img wrapper for the flag.
- getCountryFlagByIndex - Retrieve flag image bytes by index.
Implementation
static Uint8List? getCountryFlag({
required final String countryCode,
final Size? size,
final ImageFileFormat? format,
}) {
return GemKitPlatform.instance.callGetImage(
0,
'MapDetailsgetCountryFlag',
size?.width.toInt() ?? -1,
size?.height.toInt() ?? -1,
format?.id ?? -1,
arg: countryCode,
);
}