albumPicker static method
Future<List<AssetEntity> ?>
albumPicker(
- BuildContext context, {
- List<
AssetEntity> ? selectedAssets, - RequestType requestType = RequestType.image,
- int maxAssets = 1,
资源选择器(图片/视频)
selectedAssets
默认选中的资源
requestType
选择器选择资源的类型
maxAssets
最多选择的图片数量
Implementation
static Future<List<AssetEntity>?> albumPicker(
BuildContext context, {
List<AssetEntity>? selectedAssets,
RequestType requestType = RequestType.image,
int maxAssets = 1,
}) async {
final List<AssetEntity>? assets = await AssetPicker.pickAssets(context,
selectedAssets: selectedAssets, requestType: requestType, maxAssets: maxAssets);
return assets;
}