FlutterContactPicker class
Plugin to interact with contact Pickers Supports Android, Web and iOS
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pickEmailContacts(
{bool askForPermission = true, bool multiple = true}) → Future< List< EmailContact> > - Sister method to pickEmailContact to select multiple contact This will throw an UnsupportedError on all platform except web See Also pickEmailContact
-
pickFullContacts(
{bool askForPermission = true, bool multiple = true}) → Future< List< FullContact> > - Sister method to pickFullContact to select multiple contact This will throw an UnsupportedError on all platform except web See Also pickFullContact
-
pickPhoneContacts(
{bool askForPermission = true, bool multiple = true}) → Future< List< PhoneContact> > - Sister method to pickEmailContact to select multiple contact This will throw an UnsupportedError on all platform except web See Also pickEmailContact
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- available → bool
-
Checks whether this browser supports contact pickers or nor
Only works for web
See https://web.dev/contact-picker/ and https://developer.mozilla.org/en-US/docs/Web/API/Contact_Picker_API#Browser_compatibility for more information
no setter
Static Methods
-
getAvailableProperties(
) → Future< List< String> > - Fetches a list of all available properties of a contact Only works for web See https://web.dev/contact-picker/ for more information
-
hasPermission(
) → Future< bool> -
Checks if the required platform permission to read contacts is granted or not.
On Android 11+ and all xiaomi devices this will check the
Manifest.permission.READ_CONTACTS
permission On Android 10 and prior, iOS and web this will always return true -
pickEmailContact(
{bool askForPermission = true}) → Future< EmailContact> -
Picks an
EmailContact
Requires hasPermission on Android 11+ and xiaomi devices See AlsoEmailContact
See Also pickEmailContact -
pickFullContact(
{bool askForPermission = true}) → Future< FullContact> -
Picks a full contact
This is only supported on Android and on the web platform
See Also
FullContact
See Also pickFullContacts -
pickPhoneContact(
{bool askForPermission = true}) → Future< PhoneContact> -
Picks a
PhoneContact
. Requires hasPermission on Android 11+ and xiaomi devices See AlsoPhoneContact
-
requestPermission(
{bool force = false}) → Future< bool> - Requests the required platform permission to read contacts and returns whether the permission was granted or not