Clone this repo:
  1. 3b1ee7b Fix bug in readAsString when charset is LATIN-1 and content-length is set. by Lasse Reichstein Holst Nielsen · 4 months ago master
  2. 15728b5 Address a number of open issues. by Lasse R.H. Nielsen · 4 months ago
  3. 39d3a2a Make failing HTTP requests thrown when using dart:io. by Lasse R.H. Nielsen · 4 months ago
  4. 0ffc9c5 Update README.md. by Lasse R.H. Nielsen · 8 months ago 2.0.2
  5. 5ac9f73 Use configurable imports to avoid having two versions of everything. by Lasse R.H. Nielsen · 8 months ago 2.0.1

Resource

Reading data from package contents and files.

A resource is data that can be read into a Dart program at runtime. A resource is identified by a URI. It can be loaded as bytes or data. The resource URI may be a package: URI.

Example:

import 'package:resource/resource.dart' show Resource;
import 'dart:convert' show UTF8;

main() async {
  var resource = new Resource("package:foo/foo_data.txt");
  var string = await resource.readAsString(encoding: UTF8);
  print(string);
}

Learning more

Please check out the API docs.

Features and bugs

Please file feature requests and bugs at the issue tracker.