Skip to content

contact is added but plugin is throwing exception  #27

@kw2019ltd

Description

@kw2019ltd

trying to add Contact using Contacts.addContact(contact); using flutter_contact: ^0.6.4

  var contact =
      Contact(givenName: 'HHH', displayName: 'dd', identifier: '234234');
      Contacts.addContact(contact);

getting below error but contact is being added see below screen pls fix it

{identifier: 234234, displayName: dd, givenName: HHH, middleName: null, familyName: null, lastModified: null, unifiedContactId: null, singleContactId: null, otherKeys: {}, prefix: null, suffix: null, company: null, jobTitle: null, emails: [], phones: [], dates: [], socialProfiles: [], urls: [], postalAddresses: [], avatar: null, note: null}

I/flutter ( 5100): ══╡ EXCEPTION CAUGHT BY FLUTTER FRAMEWORK ╞═════════════════════════════════════════════════════════
I/flutter ( 5100): The following PlatformException was thrown:
I/flutter ( 5100): PlatformException(notFound, in method getContact: Expected a single result for contact
I/flutter ( 5100): ContactKeys(mode=UNIFIED, unifiedContactId=1226, singleContactId=null, lookupKey=null), but instead
I/flutter ( 5100): found 0, co.sunnyapp.flutter_contact.MethodCallException: notFound: in method getContact: Expected a
I/flutter ( 5100): single result for contact ContactKeys(mode=UNIFIED, unifiedContactId=1226, singleContactId=null,
I/flutter ( 5100): lookupKey=null), but instead found 0)

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions