Clone this repo:
  1. 88cb3ad Update resource package, fix analysis hints/lints (#43) by Keerti Parthasarathy · 13 days ago master
  2. e8cf38d Delete codereview.settings by Kevin Moore · 2 months ago
  3. 0a45a2d Update pubspec.yaml (#40) by Michael Thomsen · 3 months ago
  4. aaece51 Update changelog format (#41) by Lasse R.H. Nielsen · 3 months ago
  5. 2470e01 Bump revision to 2.1.6 instead of 2.1.5+1 (#39) by Todd Volkert · 3 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.