DefaultAssetPickerProvider constructor
DefaultAssetPickerProvider({
- List<
AssetEntity> ? selectedAssets, - int maxAssets = defaultMaxAssetsCount,
- int pageSize = defaultAssetsPerPage,
- ThumbnailSize pathThumbnailSize = defaultPathThumbnailSize,
- RequestType requestType = RequestType.image,
- SortPathDelegate<
AssetPathEntity> ? sortPathDelegate = SortPathDelegate.common, - bool sortPathsByModifiedDate = false,
- PMFilter? filterOptions,
- Duration initializeDelayDuration = const Duration(milliseconds: 250),
Implementation
DefaultAssetPickerProvider({
super.selectedAssets,
super.maxAssets,
super.pageSize,
super.pathThumbnailSize,
this.requestType = RequestType.image,
this.sortPathDelegate = SortPathDelegate.common,
this.sortPathsByModifiedDate = false,
this.filterOptions,
Duration initializeDelayDuration = const Duration(milliseconds: 250),
}) {
Singleton.sortPathDelegate = sortPathDelegate ?? SortPathDelegate.common;
// Call [getAssetList] with route duration when constructing.
Future<void>.delayed(initializeDelayDuration, () async {
await getPaths(onlyAll: true);
await getPaths(onlyAll: false);
});
}