Add symbol for offline available sheets

This commit is contained in:
2026-07-03 17:46:50 +02:00
parent e3ee24e06b
commit baf20e1ca8
5 changed files with 19 additions and 0 deletions
+2
View File
@@ -7,12 +7,14 @@ class Sheet {
String name;
String composer;
DateTime updatedAt;
bool availableOffline;
Sheet({
required this.uuid,
required this.name,
required this.composer,
required this.updatedAt,
this.availableOffline = false,
});
/// Creates a [Sheet] from a JSON map returned by the API.
+7
View File
@@ -254,6 +254,13 @@ class ApiClient {
return cachedFile;
}
Future<bool> isPdfFileCached(String sheetUuid) async {
final cacheDir = await getTemporaryDirectory();
final cachedFile = File('${cacheDir.path}/$sheetUuid.pdf');
return await cachedFile.exists();
}
// ---------------------------------------------------------------------------
// Annotation Operations
// ---------------------------------------------------------------------------