selectAsset method

void selectAsset(
  1. A item
)

Select asset. 选中资源

Implementation

void selectAsset(A item) {
  if (currentlySelectedAssets.length == maxAssets ||
      currentlySelectedAssets.contains(item)) {
    return;
  }
  final List<A> newList = _currentlySelectedAssets.toList()..add(item);
  currentlySelectedAssets = newList;
}