contact_picker 0.0.2

  • Example
  • Installing
  • Versions
  • 92

ContactPicker plugin for Flutter

pub package

With this plugin a Flutter app can ask its user to select a contact from his/her address book. The information associated with the contact is returned to the app.

This plugin uses the operating system's native UI for selecting contacts and does not require any special permissions from the user.

Currently, the plugin only supports picking phone numbers. However, it should be easy to extend the plugin to request other properties from a contact (e.g. addresses) or to obtain the entire record of a contact (PRs are welcome).

Using the plugin

Follow the instructions in the Installing tab on pub.

After that, instantiate ContactPicker in your Flutter app and call selectContact on it to bring up the UI for selecting a contact. The function returns with the selected Contact object once the user has made a choice (or null if the user didn't select anything).

See example/lib/main.dart for an actual usage example.


  • Fix crash when no contact is selected on Android
  • Fix Dart 2 type error
  • Set SDK constraints to match Flutter beta release


  • Fix README


  • Initial release


// Copyright 2017 Michael Goderbauer. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:contact_picker/contact_picker.dart';

void main() {
  runApp(new MyApp());

class MyApp extends StatefulWidget {
  _MyAppState createState() => new _MyAppState();

class _MyAppState extends State<MyApp> {
  final ContactPicker _contactPicker = new ContactPicker();
  Contact _contact;

  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('Plugin example app'),
        body: new Center(
          child: new Column(
            mainAxisSize: MainAxisSize.min,
            children: <Widget>[
              new MaterialButton(
                child: new Text("CLICK ME"),
                onPressed: () async {
                  Contact contact = await _contactPicker.selectContact();
                  setState(() {
                    _contact = contact;
              new Text(
                _contact == null ? 'No contact selected.' : _contact.toString(),

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  contact_picker: ^0.0.2

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:contact_picker/contact_picker.dart';
Version Uploaded Documentation Archive
0.0.2 Mar 17, 2018 Go to the documentation of contact_picker 0.0.2 Download contact_picker 0.0.2 archive
0.0.1+2 Sep 19, 2017 Go to the documentation of contact_picker 0.0.1+2 Download contact_picker 0.0.1+2 archive
0.0.1+1 Sep 19, 2017 Go to the documentation of contact_picker 0.0.1+1 Download contact_picker 0.0.1+1 archive
0.0.1 Sep 19, 2017 Go to the documentation of contact_picker 0.0.1 Download contact_picker 0.0.1 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While there is nothing inherently wrong with versions of 0.0.*, it usually means that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8