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.

4
likes
150
points
272
downloads

Publisher

unverified uploader

Weekly Downloads

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on sim_card_code