DefaultAssetPickerProvider constructor

DefaultAssetPickerProvider({
  1. List<AssetEntity>? selectedAssets,
  2. int maxAssets = defaultMaxAssetsCount,
  3. int pageSize = defaultAssetsPerPage,
  4. ThumbnailSize pathThumbnailSize = defaultPathThumbnailSize,
  5. RequestType requestType = RequestType.image,
  6. SortPathDelegate<AssetPathEntity>? sortPathDelegate = SortPathDelegate.common,
  7. bool sortPathsByModifiedDate = false,
  8. PMFilter? filterOptions,
  9. 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);
  });
}