颤振获取电话号码 [英] Flutter get the phone number

查看:54
本文介绍了颤振获取电话号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取正在运行该应用程序的当前手机的手机号码?

How can I get the mobile phone number of the current phone where the application is running?

例如此插件?直接获取手机号码会很酷.

For example for this plugin? It would be cool to get the mobile phone number directly.

https://github.com/flutter/plugins/pull/329

推荐答案

在dart pub中的这个库似乎可以满足您的需求.检查以下链接的软件包:

this library in dart pub seem to do what you are looking for. check the package linked below:

https://pub.dev/packages/sms_autofill

PhoneFieldHint [仅适用于Android]

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

这篇关于颤振获取电话号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆