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
688 stars 314 forks source link

[How to use] How to efficiently find a specific AssetEntity within AssetPathEntity #1220

Open hoyahozz opened 3 hours ago

hoyahozz commented 3 hours ago

Platforms

dart

Description

Hello photo_manager team,

I am looking for guidance on how to efficiently find a specific AssetEntity within an AssetPathEntity, especially when dealing with large albums.

Currently, I am using the getAssetListRange method to retrieve all assets in the album and then checking if the specific AssetEntity exists. However, this approach can be inefficient for large albums.

  1. Is there a more efficient way to check if a specific AssetEntity is present in an AssetPathEntity without loading all assets?
  2. Does the library provide any built-in methods for this purpose?
  3. Are there recommended practices or examples for optimizing searches within AssetPathEntity?

Thank you for your assistance!

My code

No response

Try do it

No response

fluttercandies-dev commented 3 hours ago

AI Summary: The user is seeking an efficient way to determine if a specific AssetEntity exists within an AssetPathEntity without loading all assets, particularly for large albums. They are looking for optimized search methods or best practices within the photo_manager library.