onCloseAssetsPicker method

Future<void> onCloseAssetsPicker()

close picker and return selected AssetModels to the caller

Implementation

Future<void> onCloseAssetsPicker() async {
  final List<AssetModel> assets = List.from(dataStore.selectedAssets.value);
  unawaited(dataStore.pickerController.hide());
  dataStore.mainAssetsCompleter.complete(assets);
  dataStore.selectedAssets.value.clear();
  dataStore.availablePath.value.clear();
}