| Index: runtime/lib/core_patch.dart
|
| diff --git a/runtime/lib/core_patch.dart b/runtime/lib/core_patch.dart
|
| index 2a45ae708efed16d1b8b4276978c5a8cd8b28de5..0358cc28ddd79b8ecfe4959164b4572596cc7245 100644
|
| --- a/runtime/lib/core_patch.dart
|
| +++ b/runtime/lib/core_patch.dart
|
| @@ -205,3 +205,27 @@ class _SyncIterator implements Iterator {
|
| }
|
| }
|
| }
|
| +
|
| +patch class Resource {
|
| + /* patch */ const factory Resource(String uri) = _Resource;
|
| +}
|
| +
|
| +class _Resource implements Resource {
|
| + final String _location;
|
| +
|
| + const _Resource(String uri) : _location = uri;
|
| +
|
| + Uri get uri => Uri.base.resolve(_location);
|
| +
|
| + Stream<List<int>> openRead() {
|
| + throw new UnimplementedError("openRead");
|
| + }
|
| +
|
| + Future<List<int>> readAsBytes() {
|
| + throw new UnimplementedError("readAsBytes");
|
| + }
|
| +
|
| + Future<String> readAsString({Encoding encoding}) {
|
| + throw new UnimplementedError("readAsString");
|
| + }
|
| +}
|
|
|