Skip to content

Commit 0df8dd7

Browse files
committed
refactor(settings_state): update SettingsState to use AppSettings model
This commit modifies the `SettingsState` to hold an `AppSettings` object instead of `UserAppSettings`, aligning with the core package model changes. The `props` list is updated accordingly.
1 parent 8cf31b5 commit 0df8dd7

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,79 @@
11
part of 'settings_bloc.dart';
22

33
sealed class SettingsState extends Equatable {
4-
const SettingsState({this.userAppSettings});
4+
const SettingsState({this.appSettings});
55

66
/// The current user application settings. Null if not loaded or unauthenticated.
7-
final UserAppSettings? userAppSettings;
7+
final AppSettings? appSettings;
88

99
@override
10-
List<Object?> get props => [userAppSettings];
10+
List<Object?> get props => [appSettings];
1111
}
1212

1313
/// {@template settings_initial}
1414
/// The initial settings state.
1515
/// {@endtemplate}
1616
final class SettingsInitial extends SettingsState {
1717
/// {@macro settings_initial}
18-
const SettingsInitial({super.userAppSettings});
18+
const SettingsInitial({super.appSettings});
1919
}
2020

2121
/// {@template settings_load_in_progress}
2222
/// State indicating that user settings are being loaded.
2323
/// {@endtemplate}
2424
final class SettingsLoadInProgress extends SettingsState {
2525
/// {@macro settings_load_in_progress}
26-
const SettingsLoadInProgress({super.userAppSettings});
26+
const SettingsLoadInProgress({super.appSettings});
2727
}
2828

2929
/// {@template settings_load_success}
3030
/// State indicating that user settings have been successfully loaded.
3131
/// {@endtemplate}
3232
final class SettingsLoadSuccess extends SettingsState {
3333
/// {@macro settings_load_success}
34-
const SettingsLoadSuccess({required super.userAppSettings});
34+
const SettingsLoadSuccess({required super.appSettings});
3535
}
3636

3737
/// {@template settings_load_failure}
3838
/// State indicating that loading user settings failed.
3939
/// {@endtemplate}
4040
final class SettingsLoadFailure extends SettingsState {
4141
/// {@macro settings_load_failure}
42-
const SettingsLoadFailure(this.exception, {super.userAppSettings});
42+
const SettingsLoadFailure(this.exception, {super.appSettings});
4343

4444
/// The error exception describing the failure.
4545
final HttpException exception;
4646

4747
@override
48-
List<Object?> get props => [exception, userAppSettings];
48+
List<Object?> get props => [exception, appSettings];
4949
}
5050

5151
/// {@template settings_update_in_progress}
5252
/// State indicating that user settings are being updated.
5353
/// {@endtemplate}
5454
final class SettingsUpdateInProgress extends SettingsState {
5555
/// {@macro settings_update_in_progress}
56-
const SettingsUpdateInProgress({required super.userAppSettings});
56+
const SettingsUpdateInProgress({required super.appSettings});
5757
}
5858

5959
/// {@template settings_update_success}
6060
/// State indicating that user settings have been successfully updated.
6161
/// {@endtemplate}
6262
final class SettingsUpdateSuccess extends SettingsState {
6363
/// {@macro settings_update_success}
64-
const SettingsUpdateSuccess({required super.userAppSettings});
64+
const SettingsUpdateSuccess({required super.appSettings});
6565
}
6666

6767
/// {@template settings_update_failure}
6868
/// State indicating that updating user settings failed.
6969
/// {@endtemplate}
7070
final class SettingsUpdateFailure extends SettingsState {
7171
/// {@macro settings_update_failure}
72-
const SettingsUpdateFailure(this.exception, {super.userAppSettings});
72+
const SettingsUpdateFailure(this.exception, {super.appSettings});
7373

7474
/// The error exception describing the failure.
7575
final HttpException exception;
7676

7777
@override
78-
List<Object?> get props => [exception, userAppSettings];
78+
List<Object?> get props => [exception, appSettings];
7979
}

0 commit comments

Comments
 (0)