Coder Social home page Coder Social logo

josh-burton / contact_picker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from drschlaubi/contact_picker

0.0 0.0 0.0 1.81 MB

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

Home Page: https://pub.dev/packages/fluttercontactpicker

License: BSD 3-Clause "New" or "Revised" License

Ruby 1.31% Objective-C 1.04% Kotlin 31.81% Dart 54.87% Swift 9.01% HTML 1.96%

contact_picker's Introduction

fluttercontactpicker

pub.dev

Interact with native OS contact pickers using Flutter

Note: This plugin requires at least Kotlin 1.5.0 to compile. See (#38 (comment) for more information)

Web demo: https://fcp.mik.wtf/

Contents

Getting Started

Grab contact.

final PhoneContact contact =
                    await FlutterContactPicker.pickPhoneContact();

For more info read the docs or take a look at the example

Features

  • Pick a phone/email contact using the OSs native contact picker
  • Pick a Full contact (except iOS)
  • Support Flutter Web

Permissions

If you target Android 11+ (API 30+) you need to obtain the android.permission.READ_CONTACTS permission, which is declared as a library permission here this permission will be requested automatically if the askForPermission parameter is true.

Alternatively you can request the permission manually with FlutterContactPicker.requestPermission() or check with FlutterContactPicker.hasPermission()

Obtain Full Contact (Android Only)

Note: Unlike Android iOS does not offer a way to directly get a full contact from the ContactPicker therefore this library does not support it. Apple might add it in 2030 so stay tuned

final FullContact contact =
                    await FlutterContactPicker.pickFullContact();

Obtain profile picture

The FullContact class has a photo property if the picked contact has an avatar. You can use the asWidget() method to get a renderable Image widget.

Full documentation: https://pub.dev/documentation/fluttercontactpicker/latest/fluttercontactpicker/fluttercontactpicker-library.html

Web support

This plugin also supports the Web Contact Picker API.

contact_picker's People

Contributors

drschlaubi avatar alkebuware avatar niggelgame avatar daniloadorno avatar deriegle avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.