get_phone_number 1.1.2 copy "get_phone_number: ^1.1.2" to clipboard
get_phone_number: ^1.1.2 copied to clipboard

outdated

Get real phone number from device - It only works on android device and also need to run in a real device.

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');

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');
33
likes
30
pub points
87%
popularity

Publisher

unverified uploader

Get real phone number from device - It only works on android device and also need to run in a real device.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on get_phone_number