newContact method

Future<Contact> newContact (
  1. Contact contact
)

//////////////////////////////////////////////// CREATING CONTACTS /// //////////////////////////////////////////////// Creates new contact and return it

Note that the output contact will be different from the input; for example the input won't have an ID, but the output will. If you intend to perform operations on the contact after creation, you should perform them on the output rather than on the input.

Implementation

/// Creates new contact and return it
///
/// Note that the output contact will be different from the input; for example
/// the input won't have an ID, but the output will. If you intend to perform
/// operations on the contact after creation, you should perform them on the
/// output rather than on the input.
static Future<Contact> newContact(Contact contact) async => Contact.fromJson(
    await _channel.invokeMethod('new', contact.toJson(includePhoto: true)));