Add symbol for offline available sheets
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user