v3.0.0mobile_number
डिवाइस के मोबाइल नंबर या सिम कार्ड डेटा की सूची प्राप्त करने के लिए एक Flutter प्लगइन
मोबाइल नंबर प्राप्त करने के लिए फ्लटर प्लगइन
यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
This is a FLutter Plugin to get the device mobile number.
https://pub.dev/packages/mobile_number
if you still using depecated FlutterActivty on MainActivity.java which is import of
import io.flutter.app.FlutterActivity;not
import io.flutter.embedding.android.FlutterActivity;then you need to add the following to your MainActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MobileNumberPlugin.registerWith(registrarFor("com.amorenew.mobile_number.MobileNumberPlugin()"));
}
await MobileNumber.hasPhonePermission
await MobileNumber.requestPhonePermission
if (isPermissionGranted) {
//Get mobile number
} else {
//Request Phone Permission
}
});
permission_handler has a better implementation of device general permissions.
A simple example would be:
var status = await Permission.phone.status;
if (!status.isGranted) {
status = await Permission.phone.request();
}
if (!status.isGranted) {
// return or throw some error
}
return await MobileNumber.mobileNumber;
final String mobileNumber = await MobileNumber.mobileNumber;
return mobileNumber;
}
final List<SimCard> simCards = await MobileNumber.getSimCards;
return simCards;
}

निर्भरता सूची 2 आइटम
{"sdk":"flutter"}{"sdk":"flutter"}उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗