mobile_number
3.0.0, released 2 years ago by an unverified publisher
A Flutter plugin for fetching the device's mobile number or list sim cards data.
What it does
Allows fetching the device's mobile number and listing available SIM cards on Android. Provides methods to check and request phone permissions.
AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to retrieve the user's phone number on Android
- You need to list SIM card details for dual-SIM devices on Android
Skip it when
- You are developing for iOS (not supported)
- The phone number is critical and may not be pre-stored on the SIM card
Strengths
- Supports dual SIM cards
- Provides built-in phone permission helpers
Weaknesses
- Works for Android only; iOS is not supported
- Will not return a phone number if it is not pre-existing on the SIM card
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Requires Android phone permissions. May require additional configuration for older deprecated FlutterActivity implementations on MainActivity.java.
Future<String> getMobileNumber() async {
final String mobileNumber = await MobileNumber.mobileNumber;
return mobileNumber;
}Alternatives
Packages that do the same job and could replace mobile_number.
- flutter_nfc_kit
NFC functionality plugin for Android, iOS and Web, supporting NDEF records and APDU transceive.
89Compare - fast_contacts
A fast plugin for accessing and fetching the device's contacts list.
71Compare - flutter_contacts
Fast native contacts management for Android, iOS, and macOS.
84Compare - carp_mobile_sensing
Mobile sensing framework for collecting sensor and device data via configurable probes.
77Compare