Skip to content

Commit

Permalink
Fix getassets for data
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Jan 8, 2025
1 parent d5fea35 commit 6a33906
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions api/lib/src/models/data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ final class NoteData extends ArchiveData<NoteData> {

@useResult
List<(int, String, String)> _getPagesOrder() =>
getAssets(kPagesArchiveDirectory, true).map((e) {
getAssets('$kPagesArchiveDirectory/', true).map((e) {
if (e.contains('.')) {
final split = e.split('.');
return (
Expand Down Expand Up @@ -319,13 +319,13 @@ final class NoteData extends ArchiveData<NoteData> {
removeAsset('$kPacksArchiveDirectory/$name.bfly');

@useResult
Iterable<String> getPacks() => getAssets(kPacksArchiveDirectory, true);
Iterable<String> getPacks() => getAssets('$kPacksArchiveDirectory/', true);

// Pack specific

@useResult
Iterable<String> getComponents() =>
getAssets(kComponentsArchiveDirectory, true);
getAssets('$kComponentsArchiveDirectory/', true);

@useResult
ButterflyComponent? getComponent(String componentName) {
Expand All @@ -348,7 +348,7 @@ final class NoteData extends ArchiveData<NoteData> {
removeAsset('$kComponentsArchiveDirectory/$name.json');

@useResult
Iterable<String> getStyles() => getAssets(kStylesArchiveDirectory, true);
Iterable<String> getStyles() => getAssets('$kStylesArchiveDirectory/', true);

@useResult
TextStyleSheet? getStyle(String styleName) {
Expand Down Expand Up @@ -383,7 +383,8 @@ final class NoteData extends ArchiveData<NoteData> {
}

@useResult
Iterable<String> getPalettes() => getAssets(kPalettesArchiveDirectory, true);
Iterable<String> getPalettes() =>
getAssets('$kPalettesArchiveDirectory/', true);

@useResult
ColorPalette? getPalette(String paletteName) {
Expand Down

0 comments on commit 6a33906

Please sign in to comment.