unpub
unpub copied to clipboard
feat: change downloadUrl to future
If the downloadUrl is future, it will be helpful when implementing other package stores.
For example, I am using gcloud for package store.
@override
FutureOr<String> downloadUrl(String name, String version) async {
var object = await _bucket.info('$name-$version.tar.gz');
final url = object.downloadLink.toString();
return url;
}
I recommend using FutureOr<String> instead of Future<String> so it is more flexible and does not break existing implementations