contact_picker 0.0.1 copy "contact_picker: ^0.0.1" to clipboard
contact_picker: ^0.0.1 copied to clipboard

outdatedDart 1 only

A Flutter plugin for picking a contact from the address book.

example/lib/main.dart

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

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

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

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

  @override
  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(
                  color: Colors.blue,
                  child: new Text("CLICK ME"),
                  onPressed: () async {
                    Contact contact = await _contactPicker.selectContact();
                    setState(() {
                      _contact = contact;
                    });
                  },
                ),
              new Text(_contact == null ? 'No contact selected.' : _contact.toString()),
            ],
          ),
        ),
      ),
    );
  }
}
27
likes
0
pub points
79%
popularity

Publisher

unverified uploader

A Flutter plugin for picking a contact from the address book.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on contact_picker