Clone this repo:
  1. 61f275c Updates (#27) by Kevin Moore · 4 weeks ago master
  2. 37e17ce Update test to support IPV6 (#26) by John McDole · 7 weeks ago
  3. 55f4a92 Update to version 2.1.3 (#25) by John McDole · 7 weeks ago 2.1.3
  4. d012b2c Fix bug in `readAsBytes` via http when content-length is set. (#24) by Jason Daly · 2 months ago
  5. 3b1ee7b Fix bug in readAsString when charset is LATIN-1 and content-length is set. by Lasse Reichstein Holst Nielsen · 6 months ago

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.