Zfinix / carrier_info

📱 Carrier Info gets networkType, networkGeneration, mobileCountryCode, mobileCountryCode, e.t.c from both android and iOS devices.
MIT License
34 stars 48 forks source link

Crash when call isoCountryCode #19

Open kodol73 opened 2 years ago

kodol73 commented 2 years ago

Hi,

isoCountryCode usually works ok, however it sometimes crashes as followes

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(no_iso_country_code, No iso country code, , null)
-- | -- | -- | -- | -- | -- | -- | -- | --
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:177:18)
#2      CarrierInfo.isoCountryCode (package:carrier_info/src/carrier_info.dart:23:12)

when I call it in my code

String? isoCountryCode = await CarrierInfo.isoCountryCode;

Please help to solve this issue

The version of carrier_info is 2.0.4 phone call of the device works ok even when this issue occurs