something

This commit is contained in:
Dr-Blank 2024-05-08 05:03:49 -04:00
parent dbf4ce1959
commit a720c977c2
No known key found for this signature in database
GPG key ID: 7452CC63F210A266
115 changed files with 8819 additions and 1 deletions

View file

@ -0,0 +1,22 @@
import 'package:hive/hive.dart';
import 'package:whispering_pages/settings/models/models.dart';
// register all models to Hive for serialization
Future registerModels() async {
Hive.registerAdapter<AppSettings>(
'AppSettings',
((json) => AppSettings.fromJson(json)),
);
Hive.registerAdapter<ApiSettings>(
'ApiSettings',
((json) => ApiSettings.fromJson(json)),
);
Hive.registerAdapter<AudiobookShelfServer>(
'AudiobookShelfServer',
((json) => AudiobookShelfServer.fromJson(json)),
);
Hive.registerAdapter<AuthenticatedUser>(
'AuthenticatedUser',
((json) => AuthenticatedUser.fromJson(json)),
);
}