onClose method
close picker and return selected assets to the caller
Implementation
Future<void> onClose() async {
final List<XFile> assets = <XFile>[];
unawaited(dataStore.pickerController.hide());
dataStore.selectedAssets.value.forEach((AssetModel element) {
assets.add(element.file);
});
dataStore.selectedAssets.value.clear();
dataStore.availablePath.value.clear();
dataStore.mainCompleter.complete(assets);
}