Skip to content

use the new Resource api #794

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 1 commit into from
Aug 7, 2015
Merged

use the new Resource api #794

merged 1 commit into from
Aug 7, 2015

Conversation

devoncarew
Copy link
Member

  • redux of switch to the new Resources api #769 - keep the old resource loading as a backup, until pub global activate generates .packages files
  • use the new Resource API
  • only support SDK 1.12.0 and newer

Uint8List bytes = await _doLoad(path);
return new String.fromCharCodes(bytes);
return new Resource(path).readAsString().catchError((_) async {
var bytes = await _doLoad(path);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a note that we can remove this when a certain issue is closed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do

@devoncarew
Copy link
Member Author

@sethladd

@sethladd
Copy link
Contributor

sethladd commented Aug 7, 2015

Thanks for doing this!

lgtm but can you add a note saying when we can delete the catchError bits?

@devoncarew
Copy link
Member Author

We need to disable the windows build until 1.12 is available on chocolatey (or scoop).

add tracking issue for resource loading
@devoncarew
Copy link
Member Author

and, squashed

devoncarew added a commit that referenced this pull request Aug 7, 2015
@devoncarew devoncarew merged commit 3ab24d8 into master Aug 7, 2015
@sethladd
Copy link
Contributor

sethladd commented Aug 7, 2015

Yay! This is great!

@sethladd sethladd deleted the ddc_resource_api branch August 7, 2015 23:07
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.

2 participants