import 'package:flutter/foundation.dart' show immutable; import 'package:hive_ce/hive.dart'; import 'package:vaani/features/per_book_settings/models/book_settings.dart'; import 'package:vaani/features/settings/models/models.dart'; @immutable class HiveBoxes { const HiveBoxes._(); static late final Box basicBox; /// Box for storing user preferences as [AppSettings] static late final Box userPrefsBox; /// Box for storing [ApiSettings] static late final Box apiSettingsBox; /// stores the a list of [AudiobookShelfServer] static late final Box serverBox; /// stores the a list of [AuthenticatedUser] static late final Box authenticatedUserBox; /// stores the a list of [BookSettings] static late final Box individualBookSettingsBox; static Future init() async { basicBox = await Hive.openBox('basicTypes'); userPrefsBox = await Hive.openBox('userPrefs'); apiSettingsBox = await Hive.openBox('apiSettings'); serverBox = await Hive.openBox('audiobookShelfServer'); authenticatedUserBox = await Hive.openBox('authenticatedUser'); individualBookSettingsBox = await Hive.openBox('bookSettings'); } }