selectAsset method

void selectAsset(
  1. Asset item
)

Select asset. 选中资源

Implementation

void selectAsset(Asset item) {
  if (selectedAssets.length == maxAssets || selectedAssets.contains(item)) {
    return;
  }
  final List<Asset> set = selectedAssets.toList();
  set.add(item);
  selectedAssets = set;
}