itemBannedIndicator method

Widget itemBannedIndicator(
  1. BuildContext context,
  2. Asset asset
)

Indicator when the asset cannot be selected. 当资源无法被选中时的遮罩

Implementation

Widget itemBannedIndicator(BuildContext context, Asset asset) {
  return Consumer<AssetPickerProvider<Asset, Path>>(
    builder: (_, AssetPickerProvider<Asset, Path> p, __) {
      if (!p.selectedAssets.contains(asset) && p.selectedMaximumAssets) {
        return Container(
          color: theme.colorScheme.background.withOpacity(.85),
        );
      }
      return const SizedBox.shrink();
    },
  );
}