registerOnMobileCountryCodeChanged static method

void registerOnMobileCountryCodeChanged(
  1. void callback(
    1. int mobileCountryCode
    )
)

Register a callback to be invoked when the mobile country code changes.

Only Android supports this feature.

Parameters

  • IN mobileCountryCode The mobile country code.

Throws

Implementation

static void registerOnMobileCountryCodeChanged(
  void Function(int mobileCountryCode) callback,
) {
  if (!Platform.isAndroid) {
    throw PlatformException(
      code: 'PlatformNotSupported',
      message: 'The platform is not Android.',
    );
  }

  _onMobileCountryCodeChanged = callback;
}