Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(943)

Side by Side Diff: README.md

Issue 2399123003: Update README.md. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Resource 1 # Resource
2 2
3 Reading data from package contents and files. 3 Reading data from package contents and files.
4 4
5 A resource is data that can be read into a Dart program at runtime. 5 A resource is data that can be read into a Dart program at runtime.
6 A resource is identified by a URI. It can be loaded as bytes or data. 6 A resource is identified by a URI. It can be loaded as bytes or data.
7 The resource URI may be a package: URI. 7 The resource URI may be a package: URI.
8 8
9 Example: 9 Example:
10 10
11 ```dart 11 ```dart
12 import 'package:resource/resource.dart' show Resource; 12 import 'package:resource/resource.dart' show Resource;
13 import 'dart:convert' show UTF8; 13 import 'dart:convert' show UTF8;
14 14
15 main() async { 15 main() async {
16 var resource = new Resource("package:foo/foo_data.txt"); 16 var resource = new Resource("package:foo/foo_data.txt");
17 var string = await resource.readAsString(UTF8); 17 var string = await resource.readAsString(UTF8);
18 print(string); 18 print(string);
19 } 19 }
20 ``` 20 ```
21 21
22 ## Learning more 22 ## Learning more
23 23
24 Please check out the [API docs](https://www.dartdocs.org/documentation/resource/ latest). 24 Please check out the [API docs](https://www.dartdocs.org/documentation/resource/ latest).
25 25
26 ## Features and bugs 26 ## Features and bugs
27 27
28 The current version of `resource.dart` depends on the `dart:io` library,
29 and doesn't work in the browser.
30 Use `package:resource/browser_resource.dart` in the browser until
31 further notice.
32
33 Please file feature requests and bugs at the [issue tracker][tracker]. 28 Please file feature requests and bugs at the [issue tracker][tracker].
34 29
35 [tracker]: https://github.com/dart-lang/resource/issues 30 [tracker]: https://github.com/dart-lang/resource/issues
OLDNEW
« no previous file with comments | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698