Skip to content

gmpassos/resource_portable

 
 

Repository files navigation

resource_portable

pub package Dart CI GitHub Tag New Commits Last Commits Pull Requests Code size License

Reading resource data from files in a portable way (VM, Web, Flutter and native).

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 'dart:convert' show utf8;

import 'package:resource_portable/resource.dart' show Resource;

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

Learning more

Please check out the API docs.

Features and bugs

Please file feature requests and bugs at the issue tracker.

Author

Graciliano M. Passos: gmpassos@GitHub.

Original resource package.

  • Note: This package is a portable (Web compatible) fork from original resource package.
  • The usage of this package should be the same of original resource package.

License

Dart free & open-source license.