Git Product home page Git Product logo

Comments (5)

AbhishekSingh-958 avatar AbhishekSingh-958 commented on July 18, 2024 1

@TomerPacific Try using this line " await FlutterContacts.getContacts(withProperties: true); " . Set "withProperties: true ". I tested it on real device.

from flutter_contacts.

joachim-quis avatar joachim-quis commented on July 18, 2024

Hi @TomerPacific - can you post the code you used?

from flutter_contacts.

TomerPacific avatar TomerPacific commented on July 18, 2024

@joachim-quis -
I am getting contacts using this:

await FlutterContacts.getContacts();

and then I am iterating over the List that it returns like this:

for (Contact contact in users) {
      DateTime? chosenBirthDate = await showDatePicker(context: context,
          initialDate: DateTime(1970, 1, 1),
          firstDate: DateTime(1970, 1, 1),
          lastDate: DateTime.now(),
          initialEntryMode: DatePickerEntryMode.input,
          helpText: "Choose birth date for ${contact.displayName}",
          fieldLabelText: "${contact.displayName}'s birth date"
      );

      if (chosenBirthDate != null) {
        UserBirthday userBirthday = new UserBirthday(contact.displayName,
            chosenBirthDate,
            true,
            contact.phones.isNotEmpty ? contact.phones.first.number : "");
      }
    }

from flutter_contacts.

TomerPacific avatar TomerPacific commented on July 18, 2024

@joachim-quis - any update here? Also tried on a Pixel7 physical device and saw the same behavior.

from flutter_contacts.

TomerPacific avatar TomerPacific commented on July 18, 2024

@AbhishekSingh-958 - You are correct. This should be documented more clearly.

from flutter_contacts.

Related Issues (20)

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.