简体   繁体   中英

Get phone number in flutter

i am a flutter developer and i am trying to get the mobile phone number of the current phone where the application is running

i try to do it with this plugin : sms_autofill: ^1.2.0 but that code only shows me a dialog to select a phone number, but for that to happen I have to have added my phone number to my google account and I want to get it from the sim, I need to obtain the phone number automatically because it is a requirement of a client, he does not want the user to be able to type it

final SmsAutoFill _autoFill = SmsAutoFill();
     final completePhoneNumber = await _autoFill.hint;
     print(completePhoneNumber);

您可以尝试使用mobile_number

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM