getCountryFlag static method

Uint8List? getCountryFlag({
  1. required String countryCode,
  2. Size? size,
  3. 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:

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,
  );
}