registerOnMobileCountryCodeChanged static method
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
- PlatformException if the platform is not Android.
Implementation
static void registerOnMobileCountryCodeChanged(
void Function(int mobileCountryCode) callback,
) {
if (!Platform.isAndroid) {
throw PlatformException(
code: 'PlatformNotSupported',
message: 'The platform is not Android.',
);
}
_onMobileCountryCodeChanged = callback;
}