Skip to content

Move templates.dart to use ResourceProvider. #2481

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

Merged
merged 2 commits into from
Jan 15, 2021

Conversation

srawlins
Copy link
Member

  • The top-level functions in resource_loader.dart were wrapped in a class, ResourceLoader, to account for ResourceProvider.
  • Breaking Change: Templates.fromDirectory is made private and now requires
    a ResourceLoader.
  • Templates.createDefault is made @visibleForTesting and now requires a
    ResourceLoader.

This includes a few minor cleanups as well.

* **Breaking Change**: Templates.fromDirectory is made private and now requires
  a ResourceLoader.
* Templates.createDefault is made `@visibleForTesting` and now requires a
  ResourceLoader.

This includes a few minor cleanups as well.
@google-cla google-cla bot added the cla: yes Google CLA check succeeded. label Jan 11, 2021
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 91.547% when pulling 8930201 on srawlins:templates-rp into b956fa3 on dart-lang:master.

@srawlins srawlins requested a review from jcollins-g January 11, 2021 22:44
@srawlins
Copy link
Member Author

I think the new ResourceLoader class could actually just be a set of ~3 extension methods on ResourceProvider. I'm happy to explore that in this CL or in a follow-up.

@srawlins srawlins merged commit 48f5259 into dart-lang:master Jan 15, 2021
@srawlins srawlins deleted the templates-rp branch January 15, 2021 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA check succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants