multiple static method
Future<List<AssetEntity> ?>
multiple(
- BuildContext context, {
- int choose = 0,
- int maxLength = 9,
- RequestType requestType = RequestType.image,
选择图片/视频,最多 9 个
Implementation
static Future<List<AssetEntity>?> multiple(
BuildContext context, {
int choose = 0,
int maxLength = 9,
RequestType requestType = RequestType.image,
}) async {
int gridCount = 4;
final List<AssetEntity>? assets = await AssetPicker.pickAssets(
context,
maxAssets: maxLength - choose,
//最多选择的图片数量
pageSize: 80 * gridCount,
//分页加载时每页加载的资源数量。必须为网格数的倍数。 设置为null可以取消分页。
pathThumbSize: 200,
//选择器的缩略图大小
gridCount: gridCount,
//选择器网格数量
requestType: requestType,
//选择器选择资源的类型
themeColor: HColors.app_accent_5A46BE,
);
return assets;
}