From 44bbfad8d85adbbe4e5afe36fe14232e5de5c5cb Mon Sep 17 00:00:00 2001 From: Sivan Ratson <89018301+Sivan22@users.noreply.github.com> Date: Thu, 21 Nov 2024 15:39:44 +0200 Subject: [PATCH] chore: make sure Settings is initialized --- lib/data/data_providers/file_system_data_provider.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/data/data_providers/file_system_data_provider.dart b/lib/data/data_providers/file_system_data_provider.dart index f9fee53e..82999882 100644 --- a/lib/data/data_providers/file_system_data_provider.dart +++ b/lib/data/data_providers/file_system_data_provider.dart @@ -337,6 +337,9 @@ class FileSystemData { /// Reads metadata from a JSON file and creates a structured mapping of /// book titles to their metadata information. Future>> _getMetadata() async { + if (!Settings.isInitialized) { + await Settings.init(cacheProvider: HiveCache()); + } String metadataString = ''; Map> metadata = {}; try {