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

PlatformAndroid

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

List of phone number

    List<String> list = await GetPhoneNumber().getListPhoneNumber();

    print('getListPhoneNumber result: list');

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');
37
likes
140
pub points
86%
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.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on get_phone_number