Giter VIP home page Giter VIP logo

Comments (3)

lukasgit avatar lukasgit commented on July 26, 2024

@tonini46 I am not the original author of this plugin. The current plugin has its limitations, and the issue you are experiencing might be related to the limitations. We are working on re-writing this plugin from the ground up that is clean, secure, flexible, and easy to maintain.

from flutter_contacts.

lukasgit avatar lukasgit commented on July 26, 2024

@tonini46 if you find a resolution to this issue or a workaround, I encourage you to share it here with the community. Thanks

from flutter_contacts.

aloisdeniel avatar aloisdeniel commented on July 26, 2024

Maybe adding pagination would be useful ?

Something like the following:

final total = await ContactsService.contactCount();
for(int i = 0; i < total, i+=40) {
    final total = await ContactsService.getContacts(offset: i, limit: 40);
}

Having a method that only queries phone numbers for example would allow to cache data and query only phones that aren't cached ?

final allPhones = await ContactsService.getPhones();
final missingPhonesFromCache = MyPhoneCache.phoneNumbers.where((p) => !allPhones.contains(p));
final newContacts = await ContactsService.getContacts(phones: missingPhonesFromCache);
MyPhoneCache.insert(newContacts);

Method alternatives with simpler models would be an alternative too :

class ContactName {
 final String name;
 final List<Phone> phones;
 ContactName(this.name, this.phones);
}

List<ContactName> names= await ContactsService.getContactNames();

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.