File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,16 @@ class _SingleFileAssetReader extends AssetReader {
3838 }
3939
4040 Future <bool > canRead (AssetId id) async => true ; //this.id == id;
41- Future <List <int >> readAsBytes (AssetId id) => throw UnimplementedError ();
42- Stream <AssetId > findAssets (Glob glob, {String package}) => Stream .fromIterable ([id]); // throw UnimplementedError();
41+
42+ Stream <AssetId > findAssets (Glob glob, {String package}) => Stream .fromIterable ([id]);
43+
44+ @override
45+ Future <List <int >> readAsBytes (AssetId id) async => utf8.encode (await readAsString (id));
4346
4447 @override
4548 Future <String > readAsString (AssetId id, {Encoding encoding = utf8}) async {
4649 if (id.package != "objectbox" && id.package != "objectbox_generator" ) return "" ;
50+ if (id.path.endsWith (".g.dart" )) return "" ;
4751
4852 String path = id.path;
4953 if (id.package == "objectbox" ) path = "../" + path;
You can’t perform that action at this time.
0 commit comments