native_contact_dialog 0.2.2

native_contact_dialog #

A Flutter plugin for ios and android that brings up the native contact dialogs to add, update, or remove a contact from the user's device. Using this plugin, you do not need to enable READ and WRITE access for the user's contacts.

Current Features #

  • Add new Contact

TODO #

  • [ ] Edit existing Contact dialog
  • [ ] Delete existing Contact dialog

Contributing #

Contributions are welcome! If you find a bug or want a feature, please fill an issue.

If you want to contribute code please create a pull request.

Credits #

Heavily inspired by the contacts_service plugin.

0.2.2 #

  • Add compatibility for android sdk 28+

0.2.1 #

  • Switched to swift version 5.0

0.2.0 #

  • Fixed an issue (#3) that caused methods from the url_launcher flutter package to not work on iOS when used alongside this native_contact_dialog plugin.

0.1.2 #

  • Fixed an issue (#3) causing native_contact_dialog/native_contact_dialog.h to not be found.

0.1.1 #

  • Update README and Example pages

0.1.0 #

  • Add new contact dialog for Android and iOS

example/README.md

Usage #

  • No permissions are required for this plugin.
  • Requires iOS 9 or above

Methods #

class NativeContactDialog {

  static Future<String> addContact(Contact contact)

}

Example - Adding a contact #

// import package
import 'package:native_contact_dialog/native_contact_dialog.dart';

// create a contact
final contactToAdd = Contact(...args...);

// open the native add contact dialog
NativeContactDialog.addContact(contactToAdd).then((result) {
    // NOTE: The user could cancel the dialog, but not add
    // them to their addressbook. Whether or not the user decides
    // to add [contactToAdd] to their addressbook, you will end up
    // here.

    print('add contact dialog closed.')
}).catchError((error) {
    // FlutterError, most likely unsupported operating system.
    print('Error adding contact!');
});

Use this package as a library

1. Depend on it

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


dependencies:
  native_contact_dialog: ^0.2.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:native_contact_dialog/native_contact_dialog.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
50
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
75
Learn more about scoring.

We analyzed this package on Jul 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

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

Admin