DefaultAssetPickerProvider constructor
DefaultAssetPickerProvider({
- List<
AssetEntity> ? selectedAssets, - RequestType requestType = RequestType.image,
- SortPathDelegate? sortPathDelegate = SortPathDelegate.common,
- FilterOptionGroup? filterOptions,
- int maxAssets = 9,
- int pageSize = 80,
- int pathThumbSize = 80,
- Duration routeDuration = const Duration(milliseconds: 300),
Call getAssetList with route duration when constructing. 构造时根据路由时长延时获取资源
Implementation
DefaultAssetPickerProvider({
List<AssetEntity>? selectedAssets,
this.requestType = RequestType.image,
this.sortPathDelegate = SortPathDelegate.common,
this.filterOptions,
int maxAssets = 9,
int pageSize = 80,
int pathThumbSize = 80,
Duration routeDuration = const Duration(milliseconds: 300),
}) : super(
maxAssets: maxAssets,
pageSize: pageSize,
pathThumbSize: pathThumbSize,
selectedAssets: selectedAssets,
) {
Constants.sortPathDelegate = sortPathDelegate ?? SortPathDelegate.common;
Future<void>.delayed(routeDuration).then(
(dynamic _) async {
await getAssetPathList();
await getAssetList();
},
);
}