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. FilterOptionGroup? filterOptions,
})

Implementation

DefaultAssetPickerProvider({
  super.selectedAssets,
  super.maxAssets,
  super.pageSize,
  super.pathThumbnailSize,
  this.requestType = RequestType.image,
  this.sortPathDelegate = SortPathDelegate.common,
  this.filterOptions,
}) {
  Singleton.sortPathDelegate = sortPathDelegate ?? SortPathDelegate.common;
  // Call [getAssetList] with route duration when constructing.
  Future<void>(() async {
    await getPaths();
    await getAssetsFromCurrentPath();
  });
}