Clone this repo:
  1. d3c872a fix new pedantic lints, remove pubspec author (#46) by Kevin Moore · 3 months ago master
  2. 88cb3ad Update resource package, fix analysis hints/lints (#43) by Keerti Parthasarathy · 6 months ago
  3. e8cf38d Delete codereview.settings by Kevin Moore · 8 months ago
  4. 0a45a2d Update pubspec.yaml (#40) by Michael Thomsen · 9 months ago
  5. aaece51 Update changelog format (#41) by Lasse R.H. Nielsen · 9 months ago 2.1.6


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.


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);

Learning more

Please check out the API docs.

Features and bugs

Please file feature requests and bugs at the issue tracker.