mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-07 19:49:29 +00:00
something
This commit is contained in:
parent
dbf4ce1959
commit
a720c977c2
115 changed files with 8819 additions and 1 deletions
23
lib/settings/models/api_settings.dart
Normal file
23
lib/settings/models/api_settings.dart
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// a freezed class to store the settings of the app
|
||||
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:whispering_pages/settings/models/audiobookshelf_server.dart';
|
||||
import 'package:whispering_pages/settings/models/authenticated_user.dart';
|
||||
|
||||
part 'api_settings.freezed.dart';
|
||||
part 'api_settings.g.dart';
|
||||
|
||||
/// stores the settings for the active server and user
|
||||
///
|
||||
/// all settings that are needed to interact with the server are stored here
|
||||
@freezed
|
||||
class ApiSettings with _$ApiSettings {
|
||||
const factory ApiSettings({
|
||||
AudiobookShelfServer? activeServer,
|
||||
AuthenticatedUser? activeUser,
|
||||
String? activeLibraryId,
|
||||
}) = _ApiSettings;
|
||||
|
||||
factory ApiSettings.fromJson(Map<String, dynamic> json) =>
|
||||
_$ApiSettingsFromJson(json);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue