sim_card_code 0.0.3 copy "sim_card_code: ^0.0.3" to clipboard
sim_card_code: ^0.0.3 copied to clipboard

A Flutter plugin for accessing SIM card and getting Phone number Country Code.

Sim Card Code #

StandWithPalestine Pub Version License: MIT

A lightweight Flutter plugin that provides access to SIM card country code information across iOS and Android platforms.

πŸ“‹ Features #

  • Retrieve SIM card country code in ISO format (e.g., "US", "UK", "IN")
  • Simple, straightforward API
  • Support for multiple platforms

πŸ”§ Installation #

Add sim_card_code to your pubspec.yaml:

dependencies:
  sim_card_code: ^latest_version

Then run:

flutter pub get

πŸ“± Platform Support #

Platform Support
Android βœ…
iOS (9.0+) βœ…
Web ❌
macOS ❌
Windows ❌
Linux ❌

iOS #

No additional setup required for iOS 9.0 - 13.x.

πŸš€ Usage #

Import the package:

import 'package:sim_card_code/sim_card_code.dart';

Retrieve the SIM country code:

try {
  final countryCode = await SimCardInfo.simCountryCode;
  print('SIM Country Code: $countryCode'); // Output: "US", "GB", etc.
} catch (e) {
  print('Could not retrieve SIM country code: $e');
}

⚠️ Handling Errors #

The plugin returns null in the following cases:

  • No SIM card is detected
  • The device doesn't support this functionality
  • Required permissions are not granted
  • Any other error occurs during execution

πŸ’– Support #

If you find this plugin helpful, consider supporting the development:

Buy Me A Coffee

🀝 Contributing #

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“ž Contact #

For bugs or feature requests, please create an issue on the GitHub repository.

7
likes
0
points
881
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for accessing SIM card and getting Phone number Country Code.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on sim_card_code

Packages that implement sim_card_code