Giter VIP home page Giter VIP logo

sept5288 / flutter-contacts-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from baseflow/flutter-contacts-plugin

0.0 1.0 0.0 124 KB

Contact plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to read, create and update contacts from the address book.

Home Page: https://baseflow.com

License: MIT License

Ruby 4.09% Dart 93.33% Objective-C 0.51% Shell 2.08%

flutter-contacts-plugin's Introduction

Flutter Contacts Plugin

pub package

A Flutter contacts plugin which provides easy access to the platform specific address book.

Branch Build Status
develop Build Status
master Build Status

Features

  • Automatically check and request the necessary permissions to access the platform specific address book;
  • Read contacts from the addres book;
  • [WIP] Store new contacts in the address book;
  • [WIP] Update details of existing contacts;
  • [WIP] Delete existing contacts from the address book.

Usage

To use this plugin, add contacts_plugin as a dependency in your pubspec.yaml file. For example:

dependencies:
  contacts_plugin: '^0.0.3'

NOTE: There's a known issue with integrating plugins that use Swift into a Flutter project created with the Objective-C template. See issue Flutter#16049 for help on integration.

API

Fetch all contacts

To fetch all contacts from the address book make a call to the getContacts method:

import 'package:geolocator/contacts_plugin.dart';

List<Contact> contacts = await ContactsPlugin().getContacts();

Permissions

Android

On Android you'll need to add either the READ_CONTACTS or the WRITE_CONTACTS permissions to your Android Manifest (depending if you need read and/ or write access to the address book). Todo so open the AndroidManifest.xml file and one of the following two lines as direct children of the <manifest> tag:

<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />

iOS

On iOS you'll need to add the NSContactsUsageDescription to your Info.plist file in order to access the device's address book. Simply open your Info.plist file and add the following:

<key>NSContactsUsageDescription</key>
<string>This app needs access to address book.</string>

Issues

Please file any issues, bugs or feature request as an issue on our GitHub page.

Want to contribute

If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug or adding a cool new feature), please carefully review our contribution guide and send us your pull request.

Author

This Contacts plugin for Flutter is developed by Baseflow. You can contact us at [email protected]

flutter-contacts-plugin's People

Contributors

martijn00 avatar mvanbeusekom avatar

Watchers

 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.