fluttercandies / flutter_photo_manager

A Flutter plugin that provides images, videos, and audio abstraction management APIs without interface integration, available on Android, iOS, macOS and OpenHarmony.
https://pub.dev/packages/photo_manager
Apache License 2.0
653 stars 300 forks source link

[Bug] When trying to fetch 100 images, it returns latest 99 images. only happening in specific devices. #1141

Open nileshmsd12345 opened 4 weeks ago

nileshmsd12345 commented 4 weeks ago

Version

3.0.0

Platforms

Android

Device Model

One plus Nord2 5g android version 11

flutter info

Flutter (Channel stable, 3.19.6, on macOS 14.3.1 23D60 darwin-arm64, locale en-IN)
    • Flutter version 3.19.6 on channel stable at /Users/nileshsahu/developer/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (7 weeks ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

How to reproduce?

Implement a custom gallery using the photo_manager plugin. Use the getAssetPathList method to get the list of galleries. Fetch images using the getAssetListPaged method with a page size of 100. Observe that only the latest images are fetched on certain devices.

Logs

No response

Example code (optional)

final List<AssetPathEntity> galleries =
          await PhotoManager.getAssetPathList(
        onlyAll: true,
        type: RequestType.image,
      );
      final List<AssetEntity> newAssets = await galleries[0].getAssetListPaged(
        page: 0,
        size: 100,
      );

Contact

No response

AlexV525 commented 4 weeks ago

Isn't that indicate the device only has 99 images in the gallery?

nileshmsd12345 commented 4 weeks ago

Isn't that indicate the device only has 99 images in the gallery?

No, that's not the case. when i set the page size to 50, it fetches all the images, at least more than 100. and this is very device specific issue for the record.

AlexV525 commented 4 weeks ago

Can you set a break point and take a screenshot with those variables that includes your requested page size and the returned size?