Skip to content

Commit

Permalink
fix: asset lookup for flavors (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnurmi authored Aug 11, 2023
1 parent f52fe6a commit b2e13da
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/ubuntu_utils/lib/src/proxy_asset_bundle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ class ProxyAssetBundle extends AssetBundle {
}

String _findAsset(String assetName, {required String package}) {
if (p.isWithin('packages/$package', assetName)) {
return _findAsset(
p.relative(assetName, from: 'packages/$package'),
package: package,
);
if (p.isWithin('packages/', assetName)) {
final candidate =
_findAsset(p.split(assetName).skip(2).join('/'), package: package);
if (File(candidate).existsSync()) return candidate;
}

// <app>/data/flutter_assets/
Expand Down

0 comments on commit b2e13da

Please sign in to comment.