feat: implement per book settings with player configuration and update methods

This commit is contained in:
Dr-Blank 2024-09-17 23:19:05 -04:00
parent fd42ee2343
commit e7dd4de515
No known key found for this signature in database
GPG key ID: 7452CC63F210A266
19 changed files with 1030 additions and 20 deletions

View file

@ -1,4 +1,5 @@
import 'package:hive/hive.dart';
import 'package:vaani/features/per_book_settings/models/book_settings.dart';
import 'package:vaani/settings/models/models.dart';
// register all models to Hive for serialization
@ -19,4 +20,12 @@ Future registerModels() async {
'AuthenticatedUser',
((json) => AuthenticatedUser.fromJson(json)),
);
Hive.registerAdapter<BookSettings>(
'BookSettings',
((json) => BookSettings.fromJson(json)),
);
Hive.registerAdapter<BookSettings>(
'_\$BookSettingsImpl', // hack because of freezed
((json) => BookSettings.fromJson(json)),
);
}