Clone this repo:
  1. af5a5bf Bump min required SDK (#28) by Kevin Moore · 5 weeks ago master
  2. 61f275c Updates (#27) by Kevin Moore · 3 months ago
  3. 37e17ce Update test to support IPV6 (#26) by John McDole · 4 months ago
  4. 55f4a92 Update to version 2.1.3 (#25) by John McDole · 4 months ago 2.1.3
  5. d012b2c Fix bug in `readAsBytes` via http when content-length is set. (#24) by Jason Daly · 5 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.