From 6a33906989a7fac4f8044c873f1e980ceb68eca6 Mon Sep 17 00:00:00 2001 From: CodeDoctorDE Date: Wed, 8 Jan 2025 19:15:52 +0100 Subject: [PATCH] Fix getassets for data --- api/lib/src/models/data.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/api/lib/src/models/data.dart b/api/lib/src/models/data.dart index 4509dd10c6fc..7ee002caacd7 100644 --- a/api/lib/src/models/data.dart +++ b/api/lib/src/models/data.dart @@ -238,7 +238,7 @@ final class NoteData extends ArchiveData { @useResult List<(int, String, String)> _getPagesOrder() => - getAssets(kPagesArchiveDirectory, true).map((e) { + getAssets('$kPagesArchiveDirectory/', true).map((e) { if (e.contains('.')) { final split = e.split('.'); return ( @@ -319,13 +319,13 @@ final class NoteData extends ArchiveData { removeAsset('$kPacksArchiveDirectory/$name.bfly'); @useResult - Iterable getPacks() => getAssets(kPacksArchiveDirectory, true); + Iterable getPacks() => getAssets('$kPacksArchiveDirectory/', true); // Pack specific @useResult Iterable getComponents() => - getAssets(kComponentsArchiveDirectory, true); + getAssets('$kComponentsArchiveDirectory/', true); @useResult ButterflyComponent? getComponent(String componentName) { @@ -348,7 +348,7 @@ final class NoteData extends ArchiveData { removeAsset('$kComponentsArchiveDirectory/$name.json'); @useResult - Iterable getStyles() => getAssets(kStylesArchiveDirectory, true); + Iterable getStyles() => getAssets('$kStylesArchiveDirectory/', true); @useResult TextStyleSheet? getStyle(String styleName) { @@ -383,7 +383,8 @@ final class NoteData extends ArchiveData { } @useResult - Iterable getPalettes() => getAssets(kPalettesArchiveDirectory, true); + Iterable getPalettes() => + getAssets('$kPalettesArchiveDirectory/', true); @useResult ColorPalette? getPalette(String paletteName) {