Skip to content

Commit

Permalink
Add api for accessing pack id
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Nov 22, 2024
1 parent acafa3f commit c81edde
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/lib/src/asset.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,11 @@ class ServerAssetManager extends AssetManager {

Iterable<String> getPackIds() => _packs.entries
.map((e) => e.key == kCorePackId ? kCorePackId : e.value.identifier);

String? getPackId(String name) {
if (name == kCorePackId) return kCorePackId;
return _packs[name]?.identifier;
}

String getPackIdOrDefault(String name) => getPackId(name) ?? name;
}

0 comments on commit c81edde

Please sign in to comment.