You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting a bufferSize for listContacts() each page returns bufferSize+1 contacts. For example, the code below will return a list of 6 contacts instead of 5, with the 6th contact containing mostly blank fields.
This is being run on Android 10 (API 29).
final int bufferSize = 5;
final pagingList = Contacts.listContacts(bufferSize: bufferSize);
if(await pagingList.moveNextPage()) {
final List<Contact> contacts = await pagingList.currentPage;
for(int i =0; i < contacts.length; ++i) {
final Contact contact = contacts[i];
print('CONTACT ($i):\n${contact.toMap()}\n\n');
}
}
flutter doctor
[✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.6 19G2021, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.7)
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.49.1)
[✓] Connected device (1 available) - Samsung Galaxy S9+
• No issues found!
Thanks
The text was updated successfully, but these errors were encountered:
dere-app
changed the title
Each page return bufferSize + 1 contacts
Each page returns bufferSize + 1 contacts
Sep 19, 2020
I can't test it at the moment, but by inspecting the code, replacing "lower than or equals" with "lower than" on line 83 in file contact-from-cursor-ext.kt, should solve the issue.
while (cursor.moveToNext() && contactsById.size <= limit) {
Hello,
When setting a
bufferSize
forlistContacts()
each page returns bufferSize+1 contacts. For example, the code below will return a list of 6 contacts instead of 5, with the 6th contact containing mostly blank fields.This is being run on Android 10 (API 29).
flutter doctor
Thanks
The text was updated successfully, but these errors were encountered: