easy_contact_picker 0.0.2 copy "easy_contact_picker: ^0.0.2" to clipboard
easy_contact_picker: ^0.0.2 copied to clipboard

A Flutter contact picker.Writted with pure dart, supported both iOS and Android.

easy_contact_picker #

A Flutter contact picker.Writted with pure dart, supported both iOS and Android.
Get address book permissions before using.

Use this package #

Depend on it #

    easy_contact_picker: ^0.0.2
copied to clipboard

Import it #

import 'package:easy_contact_picker/easy_contact_picker.dart';
copied to clipboard

Add permission #

Android

<uses-permission android:name="android.permission.READ_CONTACTS"/>
copied to clipboard

iOS

info.plist
Privacy - Contacts Usage Description
copied to clipboard
Tick the right box in the Background Modes Background fetch And Remote notification.

Sample
#

1.Open the Native address book.

Future<List<Contact>> selectContacts() async {
    final List result =
    await _channel.invokeMethod('selectContactList');
    if (result == null) {
      return null;
    }
    List<Contact> contacts = new List();
    result.forEach((f){
      contacts.add(new Contact.fromMap(f));
    });
    return contacts;
  }
copied to clipboard
2.Get contact list.
Future<Contact> selectContactWithNative() async {
    final Map<dynamic, dynamic> result =
    await _channel.invokeMethod('selectContactNative');
    if (result == null) {
      return null;
    }
    return new Contact.fromMap(result);
  }
copied to clipboard
5
likes
40
points
55
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.13 - 2025.03.28

A Flutter contact picker.Writted with pure dart, supported both iOS and Android.

Repository (GitHub)

License

MIT (license)

Dependencies

flutter

More

Packages that depend on easy_contact_picker