Last updated:
0 purchases
get phone number
get_phone_number #
Get Phone Number from Android Native
Warning: This library works in only android.
Usage #
Simple function
String phoneNumber = await GetPhoneNumber().get();
print('getPhoneNumber result: $phoneNumber');
copied to clipboard
List of phone number
List<String> list = await GetPhoneNumber().getListPhoneNumber();
print('getListPhoneNumber result: list');
copied to clipboard
Detailed function with android permissions
final module = GetPhoneNumber();
if (!module.isSupport()) {
print('Not supported platform');
}
if (!await module.hasPermission()) {
if (!await module.requestPermission()) {
throw 'Failed to get permission phone number';
}
}
String phoneNumber = await module.getPhoneNumber();
print('getPhoneNumber result: $phoneNumber');
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.