getSdkComponent method
Implementation
@override
Future<File> getSdkComponent(String target) async {
final version = versionInfo;
if (version.files.isEmpty) {
throw const UfbtValueError('Empty files list');
}
final file = version.findFile(UfbtFileType.sdkZip, target);
if (file == null) {
throw UfbtValueError(
'Invalid file type: FileType.${UfbtFileType.sdkZip.id.toUpperCase()}',
);
}
if (file.url.isEmpty) {
throw const UfbtValueError('Invalid file url');
}
return fetcher.fetchFile(file.url, downloadDir);
}