Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change downloadUrl to future #38

Merged
merged 2 commits into from
Nov 8, 2022

Conversation

amondnet
Copy link
Contributor

@amondnet amondnet commented Oct 18, 2021

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;
  }

@danilofuchs
Copy link

I recommend using FutureOr<String> instead of Future<String> so it is more flexible and does not break existing implementations

@talisk talisk merged commit de8d014 into pd4d10:master Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants